diff options
Diffstat (limited to 'var')
-rw-r--r-- | var/spack/repos/builtin/packages/aocc/package.py | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/aocc/package.py b/var/spack/repos/builtin/packages/aocc/package.py index 229a37bb53..f246af4635 100644 --- a/var/spack/repos/builtin/packages/aocc/package.py +++ b/var/spack/repos/builtin/packages/aocc/package.py @@ -91,3 +91,13 @@ class Aocc(Package): def install(self, spec, prefix): print("Installing AOCC Compiler ... ") install_tree(".", prefix) + + @run_after("install") + def cfg_files(self): + # Add path to gcc/g++ such that clang/clang++ can always find a full gcc installation + # including libstdc++.so and header files. + if self.spec.satisfies("%gcc") and self.compiler.cxx is not None: + compiler_options = "--gcc-toolchain={}".format(self.compiler.prefix) + for compiler in ["clang", "clang++"]: + with open(join_path(self.prefix.bin, "{}.cfg".format(compiler)), "w") as f: + f.write(compiler_options) |