diff --git a/lib/spack/env/cc b/lib/spack/env/cc index 73c5759dfe144c5d2ed70ac5d864f2c8448d0bb7..f2b8bf577f55658a75182db309b75681f39b70b8 100755 --- a/lib/spack/env/cc +++ b/lib/spack/env/cc @@ -43,7 +43,7 @@ parameters=( # The compiler input variables are checked for sanity later: # SPACK_CC, SPACK_CXX, SPACK_F77, SPACK_FC # The default compiler flags are passed from these variables: -# SPACK_CFLAGS, SPACK_CXXFLAGS, SPACK_FCFLAGS, SPACK_FFLAGS, +# SPACK_CFLAGS, SPACK_CXXFLAGS, SPACK_FFLAGS, # SPACK_LDFLAGS, SPACK_LDLIBS # Debug env var is optional; set to "TRUE" for debug logging: # SPACK_DEBUG diff --git a/lib/spack/spack/build_systems/autotools.py b/lib/spack/spack/build_systems/autotools.py index c21b8dad71becbde0f4c0b79ac5627ffba5da927..5b4f223d417ba7bf375cfe479de01974799072dc 100644 --- a/lib/spack/spack/build_systems/autotools.py +++ b/lib/spack/spack/build_systems/autotools.py @@ -263,6 +263,12 @@ def flags_to_build_system_args(self, flags): if values: values_str = '{0}={1}'.format(flag.upper(), ' '.join(values)) self.configure_flag_args.append(values_str) + # Spack's fflags are meant for both F77 and FC, therefore we + # additionaly set FCFLAGS if required. + values = flags.get('fflags', None) + if values: + values_str = 'FCFLAGS={0}'.format(' '.join(values)) + self.configure_flag_args.append(values_str) def configure(self, spec, prefix): """Runs configure with the arguments specified in