diff options
Diffstat (limited to 'var')
-rw-r--r-- | var/spack/repos/builtin/packages/flang/package.py | 5 | ||||
-rw-r--r-- | var/spack/repos/builtin/packages/llvm-flang/package.py | 5 |
2 files changed, 10 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/flang/package.py b/var/spack/repos/builtin/packages/flang/package.py index f0f49ae506..4fd754eab3 100644 --- a/var/spack/repos/builtin/packages/flang/package.py +++ b/var/spack/repos/builtin/packages/flang/package.py @@ -71,6 +71,11 @@ class Flang(CMakePackage, CudaPackage): spec['python'].command.path) ] + # Make sure llvm-flang can find GCC's libstdc++ + if self.compiler.name == "gcc": + gcc_prefix = ancestor(self.compiler.cc, 2) + options.append('-DGCC_INSTALL_PREFIX=' + gcc_prefix) + if '+cuda' in spec: options.append('-DFLANG_OPENMP_GPU_NVIDIA=ON') else: diff --git a/var/spack/repos/builtin/packages/llvm-flang/package.py b/var/spack/repos/builtin/packages/llvm-flang/package.py index 99948fd76f..d5b9370169 100644 --- a/var/spack/repos/builtin/packages/llvm-flang/package.py +++ b/var/spack/repos/builtin/packages/llvm-flang/package.py @@ -195,6 +195,11 @@ class LlvmFlang(CMakePackage, CudaPackage): args.append('-DLIBOMP_FORTRAN_MODULES=ON') args.append('-DLIBOMP_ENABLE_SHARED=TRUE') + # Make sure llvm-flang can find GCC's libstdc++ + if self.compiler.name == "gcc": + gcc_prefix = ancestor(self.compiler.cc, 2) + args.append('-DGCC_INSTALL_PREFIX=' + gcc_prefix) + # used by libomptarget for NVidia gpu if '+cuda' in spec: args.append('-DOPENMP_ENABLE_LIBOMPTARGET=ON') |