diff options
author | Sreenivasa Murthy Kolam <67086238+srekolam@users.noreply.github.com> | 2021-01-21 22:43:28 +0530 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-01-21 18:13:28 +0100 |
commit | 85ea52acd17090097f19d8f5d54142ee4f9002b5 (patch) | |
tree | 95a96f2e08827256db97d43ca2972ac0c915e98b /var | |
parent | 6e258ca6ca33f31ec10c7296ff94cdb7829227d4 (diff) | |
download | spack-85ea52acd17090097f19d8f5d54142ee4f9002b5.tar.gz spack-85ea52acd17090097f19d8f5d54142ee4f9002b5.tar.bz2 spack-85ea52acd17090097f19d8f5d54142ee4f9002b5.tar.xz spack-85ea52acd17090097f19d8f5d54142ee4f9002b5.zip |
fix build failure due to #20759 change (#21185)
Diffstat (limited to 'var')
-rw-r--r-- | var/spack/repos/builtin/packages/llvm-amdgpu/package.py | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/var/spack/repos/builtin/packages/llvm-amdgpu/package.py b/var/spack/repos/builtin/packages/llvm-amdgpu/package.py index 80a9139cd2..e351dc6b2b 100644 --- a/var/spack/repos/builtin/packages/llvm-amdgpu/package.py +++ b/var/spack/repos/builtin/packages/llvm-amdgpu/package.py @@ -33,6 +33,9 @@ class LlvmAmdgpu(CMakePackage): depends_on('z3', type='link') depends_on('zlib', type='link') depends_on('ncurses+termlib', type='link') + # openmp dependencies + depends_on("perl-data-dumper", type=("build"), when='+openmp') + depends_on("hwloc", when='+openmp') depends_on('libelf', type='link', when='+openmp') # Will likely only be fixed in LLVM 12 upstream @@ -62,7 +65,16 @@ class LlvmAmdgpu(CMakePackage): ] if self.compiler.name == "gcc": - gcc_prefix = ancestor(self.compiler.cc, 2) + compiler = Executable(self.compiler.cc) + gcc_output = compiler('-print-search-dirs', output=str, error=str) + + for line in gcc_output.splitlines(): + if line.startswith("install:"): + # Get path and strip any whitespace + # (causes oddity with ancestor) + gcc_prefix = line.split(":")[1].strip() + gcc_prefix = ancestor(gcc_prefix, 4) + break args.append("-DGCC_INSTALL_PREFIX=" + gcc_prefix) return args |