summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorSergey Kosukhin <sergey.kosukhin@mpimet.mpg.de>2020-03-03 22:13:38 +0100
committerGitHub <noreply@github.com>2020-03-03 13:13:38 -0800
commitb472c1380331cc414582f8f5bcb9045e468457c9 (patch)
tree582db7a7b55e219be8eb77eea9d6e8762f0ce30b /lib
parent370e7c211d9dcdf559f55dee24ae38bfcc74c009 (diff)
downloadspack-b472c1380331cc414582f8f5bcb9045e468457c9.tar.gz
spack-b472c1380331cc414582f8f5bcb9045e468457c9.tar.bz2
spack-b472c1380331cc414582f8f5bcb9045e468457c9.tar.xz
spack-b472c1380331cc414582f8f5bcb9045e468457c9.zip
Fix FCFLAGS handling for Autotools packages (#14788)
Spack's fflags are meant for both f77 and fc. Therefore, they must be passed as FFLAGS and FCFLAGS to the configure scripts of Autotools-based packages.
Diffstat (limited to 'lib')
-rwxr-xr-xlib/spack/env/cc2
-rw-r--r--lib/spack/spack/build_systems/autotools.py6
2 files changed, 7 insertions, 1 deletions
diff --git a/lib/spack/env/cc b/lib/spack/env/cc
index 73c5759dfe..f2b8bf577f 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 c21b8dad71..5b4f223d41 100644
--- a/lib/spack/spack/build_systems/autotools.py
+++ b/lib/spack/spack/build_systems/autotools.py
@@ -263,6 +263,12 @@ class AutotoolsPackage(PackageBase):
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