Improve PDToolkit support for different compilers (#5322)

* Improve PDToolkit support for different compilers

PDT dependency of TAU profiler doesn't use CC, CXX eb variables and needs command line arguments for compiler identification. If we don't pass compiler id then it uses gcc and result in link time errors while building TAU.  This patch fixes it; tested with PGI and Intel compilers.
This commit is contained in:
Pramod S Kumbhar 2017-09-11 01:16:49 +02:00 committed by Todd Gamblin
parent f5f51118b8
commit 3bb243e8e2

View File

@ -45,8 +45,21 @@ class Pdt(AutotoolsPackage):
version('3.19', '5c5e1e6607086aa13bf4b1b9befc5864')
version('3.18.1', 'e401534f5c476c3e77f05b7f73b6c4f2')
def patch(self):
if self.spec.satisfies('%clang'):
filter_file(r'PDT_GXX=g\+\+ ',
r'PDT_GXX=clang++ ', 'ductape/Makefile')
def configure(self, spec, prefix):
configure('-prefix={0}'.format(prefix))
options = ['-prefix=%s' % prefix]
if self.compiler.name == 'xl':
options.append('-XLC')
elif self.compiler.name == 'intel':
options.append('-icpc')
elif self.compiler.name == 'pgi':
options.append('-pgCC')
configure(*options)
@run_after('install')
def link_arch_dirs(self):