diff options
author | Sergey Kosukhin <skosukhin@gmail.com> | 2018-11-14 16:40:16 +0100 |
---|---|---|
committer | Peter Scheibel <scheibel1@llnl.gov> | 2018-11-14 09:40:16 -0600 |
commit | 75e86a61fef9ad020839e49ff7785bb1bc41f5af (patch) | |
tree | a7434de96d3347f382f3c46ec74a46578f0a2d2f /var | |
parent | 6a08eb88b15ab2cf378d49b4dcf9927732b1dc9f (diff) | |
download | spack-75e86a61fef9ad020839e49ff7785bb1bc41f5af.tar.gz spack-75e86a61fef9ad020839e49ff7785bb1bc41f5af.tar.bz2 spack-75e86a61fef9ad020839e49ff7785bb1bc41f5af.tar.xz spack-75e86a61fef9ad020839e49ff7785bb1bc41f5af.zip |
netcdf-fortran: add LDFLAGS to fix contents of libnetcdff.la. (#9647)
Diffstat (limited to 'var')
-rw-r--r-- | var/spack/repos/builtin/packages/netcdf-fortran/package.py | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/var/spack/repos/builtin/packages/netcdf-fortran/package.py b/var/spack/repos/builtin/packages/netcdf-fortran/package.py index d622ef025a..92572bb5aa 100644 --- a/var/spack/repos/builtin/packages/netcdf-fortran/package.py +++ b/var/spack/repos/builtin/packages/netcdf-fortran/package.py @@ -28,9 +28,16 @@ class NetcdfFortran(AutotoolsPackage): if name in ['cflags', 'fflags'] and '+pic' in self.spec: flags.append(self.compiler.pic_flag) elif name == 'cppflags': - flags.append('-I' + self.spec['netcdf'].prefix.include) - - return (None, None, flags) + flags.append(self.spec['netcdf'].headers.cpp_flags) + elif name == 'ldflags': + # We need to specify LDFLAGS to get correct dependency_libs + # in libnetcdff.la, so packages that use libtool for linking + # could correctly link to all the dependencies even when the + # building takes place outside of Spack environment, i.e. + # without Spack's compiler wrappers. + flags.append(self.spec['netcdf'].libs.search_flags) + + return None, None, flags @property def libs(self): |