diff --git a/var/spack/repos/builtin/packages/berkeleygw/package.py b/var/spack/repos/builtin/packages/berkeleygw/package.py index 980ebbc260..dbd1ea7fc7 100644 --- a/var/spack/repos/builtin/packages/berkeleygw/package.py +++ b/var/spack/repos/builtin/packages/berkeleygw/package.py @@ -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))