summaryrefslogtreecommitdiff
path: root/var
diff options
context:
space:
mode:
authorSergey Kosukhin <sergey.kosukhin@mpimet.mpg.de>2021-04-15 11:23:37 +0200
committerGitHub <noreply@github.com>2021-04-15 03:23:37 -0600
commit334e4f86852e1ccabae1e5a84b7dbab4ca9e552d (patch)
treed52e556accccc8785026ee859b08c99103b807cb /var
parentdf84a6a853a1d96f6681534ba05cee4993f558f4 (diff)
downloadspack-334e4f86852e1ccabae1e5a84b7dbab4ca9e552d.tar.gz
spack-334e4f86852e1ccabae1e5a84b7dbab4ca9e552d.tar.bz2
spack-334e4f86852e1ccabae1e5a84b7dbab4ca9e552d.tar.xz
spack-334e4f86852e1ccabae1e5a84b7dbab4ca9e552d.zip
hdf5: libtool patch for NAG compiler (#22935)
Diffstat (limited to 'var')
-rw-r--r--var/spack/repos/builtin/packages/hdf5/nag.mpi.libtool.patch62
-rw-r--r--var/spack/repos/builtin/packages/hdf5/package.py5
2 files changed, 67 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/hdf5/nag.mpi.libtool.patch b/var/spack/repos/builtin/packages/hdf5/nag.mpi.libtool.patch
new file mode 100644
index 0000000000..a6fcb1e9a9
--- /dev/null
+++ b/var/spack/repos/builtin/packages/hdf5/nag.mpi.libtool.patch
@@ -0,0 +1,62 @@
+--- a/bin/ltmain.sh
++++ b/bin/ltmain.sh
+@@ -8881,7 +8881,8 @@ func_mode_link ()
+ xlcverstring="$wl-compatibility_version $wl$minor_current $wl-current_version $wl$minor_current.$revision"
+ verstring="-compatibility_version $minor_current -current_version $minor_current.$revision"
+ # On Darwin other compilers
+- case $CC in
++ func_cc_basename $CC
++ case $func_cc_basename_result in
+ nagfor*)
+ verstring="$wl-compatibility_version $wl$minor_current $wl-current_version $wl$minor_current.$revision"
+ ;;
+--- a/configure
++++ b/configure
+@@ -12817,6 +12817,15 @@ func_cc_basename ()
+ compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
+ distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
+ \-*) ;;
++ mpicc | *[\\/]mpicc | \
++ mpic++ | *[\\/]mpic++ | mpicxx | *[\\/]mpicxx | mpiCC | *[\\/]mpiCC | \
++ mpif77 | *[\\/]mpif77 | mpif90 | *[\\/]mpif90 | mpifort | *[\\/]mpifort )
++ # OpenMPI or MPICH wrapper
++ mpi_cc_temp=
++ mpi_show=`$cc_temp -show 2>/dev/null`
++ test $? -eq 0 && mpi_cc_temp=`$ECHO "$mpi_show" | cut -d' ' -f1`
++ test -z $mpi_cc_temp >/dev/null 2>&1 || cc_temp=$mpi_cc_temp
++ break;;
+ *) break;;
+ esac
+ done
+@@ -33230,6 +33239,15 @@ func_cc_basename ()
+ compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
+ distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
+ \-*) ;;
++ mpicc | *[\\/]mpicc | \
++ mpic++ | *[\\/]mpic++ | mpicxx | *[\\/]mpicxx | mpiCC | *[\\/]mpiCC | \
++ mpif77 | *[\\/]mpif77 | mpif90 | *[\\/]mpif90 | mpifort | *[\\/]mpifort )
++ # OpenMPI or MPICH wrapper
++ mpi_cc_temp=
++ mpi_show=`$cc_temp -show 2>/dev/null`
++ test $? -eq 0 && mpi_cc_temp=`$ECHO "$mpi_show" | cut -d' ' -f1`
++ test -z $mpi_cc_temp >/dev/null 2>&1 || cc_temp=$mpi_cc_temp
++ break;;
+ *) break;;
+ esac
+ done
+@@ -36300,6 +36318,15 @@ func_cc_basename ()
+ compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
+ distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
+ \-*) ;;
++ mpicc | *[\\/]mpicc | \
++ mpic++ | *[\\/]mpic++ | mpicxx | *[\\/]mpicxx | mpiCC | *[\\/]mpiCC | \
++ mpif77 | *[\\/]mpif77 | mpif90 | *[\\/]mpif90 | mpifort | *[\\/]mpifort )
++ # OpenMPI or MPICH wrapper
++ mpi_cc_temp=
++ mpi_show=`$cc_temp -show 2>/dev/null`
++ test $? -eq 0 && mpi_cc_temp=`$ECHO "$mpi_show" | cut -d' ' -f1`
++ test -z $mpi_cc_temp >/dev/null 2>&1 || cc_temp=$mpi_cc_temp
++ break;;
+ *) break;;
+ esac
+ done
diff --git a/var/spack/repos/builtin/packages/hdf5/package.py b/var/spack/repos/builtin/packages/hdf5/package.py
index 60fe9dcdfa..90022c81fb 100644
--- a/var/spack/repos/builtin/packages/hdf5/package.py
+++ b/var/spack/repos/builtin/packages/hdf5/package.py
@@ -146,6 +146,11 @@ class Hdf5(AutotoolsPackage):
patch('hdf5_1.8_gcc10.patch', when='@:1.8.21',
sha256='0e20187cda3980a4fdff410da92358b63de7ebef2df1d7a425371af78e50f666')
+ # Libtool fails to recognize NAG compiler behind the MPI wrappers and apply
+ # correct linker flags enabling shared libraries. # We support only versions
+ # based on Libtool 2.4.6.
+ patch('nag.mpi.libtool.patch', when='@1.8.18:%nag+fortran+mpi+shared')
+
# The argument 'buf_size' of the C function 'h5fget_file_image_c' is
# declared as intent(in) though it is modified by the invocation. As a
# result, aggressive compilers such as Fujitsu's may do a wrong