summaryrefslogtreecommitdiff
path: root/var
diff options
context:
space:
mode:
Diffstat (limited to 'var')
-rw-r--r--var/spack/repos/builtin/packages/netcdf-fortran/nag.patch31
-rw-r--r--var/spack/repos/builtin/packages/netcdf-fortran/package.py4
2 files changed, 35 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/netcdf-fortran/nag.patch b/var/spack/repos/builtin/packages/netcdf-fortran/nag.patch
new file mode 100644
index 0000000000..458c18813e
--- /dev/null
+++ b/var/spack/repos/builtin/packages/netcdf-fortran/nag.patch
@@ -0,0 +1,31 @@
+diff --git a/configure b/configure
+index 06ac8b0..d518a1a 100755
+--- a/configure
++++ b/configure
+@@ -10657,6 +10657,8 @@ _LT_EOF
+ lf95*) # Lahey Fortran 8.1
+ whole_archive_flag_spec=
+ tmp_sharedflag='--shared' ;;
++ nagfor*)
++ tmp_sharedflag='-Wl,-shared' ;;
+ xl[cC]* | bgxl[cC]* | mpixl[cC]*) # IBM XL C 8.0 on PPC (deal with xlf below)
+ tmp_sharedflag='-qmkshrobj'
+ tmp_addflag= ;;
+@@ -14252,6 +14254,8 @@ _LT_EOF
+ lf95*) # Lahey Fortran 8.1
+ whole_archive_flag_spec_F77=
+ tmp_sharedflag='--shared' ;;
++ nagfor*)
++ tmp_sharedflag='-Wl,-shared' ;;
+ xl[cC]* | bgxl[cC]* | mpixl[cC]*) # IBM XL C 8.0 on PPC (deal with xlf below)
+ tmp_sharedflag='-qmkshrobj'
+ tmp_addflag= ;;
+@@ -17142,6 +17146,8 @@ _LT_EOF
+ lf95*) # Lahey Fortran 8.1
+ whole_archive_flag_spec_FC=
+ tmp_sharedflag='--shared' ;;
++ nagfor*)
++ tmp_sharedflag='-Wl,-shared' ;;
+ xl[cC]* | bgxl[cC]* | mpixl[cC]*) # IBM XL C 8.0 on PPC (deal with xlf below)
+ tmp_sharedflag='-qmkshrobj'
+ tmp_addflag= ;;
diff --git a/var/spack/repos/builtin/packages/netcdf-fortran/package.py b/var/spack/repos/builtin/packages/netcdf-fortran/package.py
index a923bb0e81..725804d22c 100644
--- a/var/spack/repos/builtin/packages/netcdf-fortran/package.py
+++ b/var/spack/repos/builtin/packages/netcdf-fortran/package.py
@@ -36,6 +36,10 @@ class NetcdfFortran(AutotoolsPackage):
depends_on('netcdf')
+ # The default libtool.m4 is too old to handle NAG compiler properly:
+ # https://github.com/Unidata/netcdf-fortran/issues/94
+ patch('nag.patch', when='@:4.4.4%nag')
+
def configure_args(self):
return ['CPPFLAGS=-I' + self.spec['netcdf'].prefix.include]