berkeleygw: update FCPP flags for gcc (#42848)
Compilation with the old flags fails on PowerPC (power8le) due to syntax errors in the output from the preprocessor. Compilation with the extended set of flags works both on PowerPC and x86_64. The correct set of flags was suggested from the berkeleygw developers: https://groups.google.com/a/berkeleygw.org/g/help/c/ewi3RZgOyeE/m/jSIoe45PAgAJ Uses spack-provided compiler prefix to call cpp when compiling berkeleygw with gcc.
This commit is contained in:
parent
8d9d721f07
commit
9802649716
1 changed files with 5 additions and 1 deletions
|
@ -232,7 +232,11 @@ def build(self, spec, prefix):
|
|||
f90_flags += " -fallow-argument-mismatch"
|
||||
buildopts.append("COMPFLAG=-DGNU")
|
||||
buildopts.append("MOD_OPT=-J ")
|
||||
buildopts.append("FCPP=cpp -C -nostdinc")
|
||||
# std c11 prevents problems with linebreaks and fortran comments
|
||||
# containing // (which is interpreted as C++ style comment)
|
||||
buildopts.append(
|
||||
"FCPP=%s -C -nostdinc -std=c11" % join_path(self.compiler.prefix, "bin", "cpp")
|
||||
)
|
||||
if "+mpi" in spec:
|
||||
buildopts.append("F90free=%s %s" % (spec["mpi"].mpifc, f90_flags))
|
||||
buildopts.append("C_COMP=%s %s" % (spec["mpi"].mpicc, c_flags))
|
||||
|
|
Loading…
Reference in a new issue