diff options
author | wspear <wjspear@gmail.com> | 2022-07-27 10:04:06 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-07-27 10:04:06 -0700 |
commit | 02151565e919fc7c1d17a99924e729f897d5bce9 (patch) | |
tree | 59bb83d2ecf99f913a8425a6086e1195815cbc44 /var | |
parent | 3db87f207e66af30ee136f97f7162fef48439861 (diff) | |
download | spack-02151565e919fc7c1d17a99924e729f897d5bce9.tar.gz spack-02151565e919fc7c1d17a99924e729f897d5bce9.tar.bz2 spack-02151565e919fc7c1d17a99924e729f897d5bce9.tar.xz spack-02151565e919fc7c1d17a99924e729f897d5bce9.zip |
Tau must get GCC path from environment on Cray (#31751)
* Tau must get GCC path from environment on Cray
self.compiler doesn't provide the path to the gcc compiler when using cray cc and the spack internal compiler overrides the location in PATH. If possible get the location from the GCC_PATH variable instead.
* Fix flake8 issues
* Update package.py
Diffstat (limited to 'var')
-rw-r--r-- | var/spack/repos/builtin/packages/tau/package.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/tau/package.py b/var/spack/repos/builtin/packages/tau/package.py index a1069a1517..6a45739df4 100644 --- a/var/spack/repos/builtin/packages/tau/package.py +++ b/var/spack/repos/builtin/packages/tau/package.py @@ -146,10 +146,16 @@ class Tau(Package): # 4 - if no -cc=<compiler> -cxx=<compiler> is passed tau is built with # system compiler silently # (regardless of what %<compiler> is used in the spec) + # 5 - On cray gnu compilers are not provied by self.compilers + # Checking GCC_PATH will work if spack loads the gcc module # # In the following we give TAU what he expects and put compilers into # PATH compiler_path = os.path.dirname(self.compiler.cc) + if not compiler_path and self.compiler.cc_names[0] == "gcc": + compiler_path = os.environ.get('GCC_PATH', '') + if compiler_path: + compiler_path = compiler_path + "/bin/" os.environ['PATH'] = ':'.join([compiler_path, os.environ['PATH']]) compiler_options = ['-c++=%s' % self.compiler.cxx_names[0], |