parallel-netcdf: patch for PGI on Cray (#18972)
This commit is contained in:
parent
b7ed6b4fe0
commit
5a49c2bcaf
@ -0,0 +1,10 @@
|
||||
--- a/m4/libtool.m4
|
||||
+++ b/m4/libtool.m4
|
||||
@@ -5282,7 +5282,6 @@ _LT_EOF
|
||||
tmp_sharedflag='-shared'
|
||||
case $cc_basename,$host_cpu in
|
||||
pgcc*) # Portland Group C compiler
|
||||
- _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive'
|
||||
tmp_addflag=' $pic_flag'
|
||||
;;
|
||||
pgf77* | pgf90* | pgf95* | pgfortran*)
|
@ -0,0 +1,26 @@
|
||||
--- a/configure
|
||||
+++ b/configure
|
||||
@@ -11858,7 +11858,6 @@ _LT_EOF
|
||||
tmp_sharedflag='-shared'
|
||||
case $cc_basename,$host_cpu in
|
||||
pgcc*) # Portland Group C compiler
|
||||
- whole_archive_flag_spec='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive'
|
||||
tmp_addflag=' $pic_flag'
|
||||
;;
|
||||
pgf77* | pgf90* | pgf95* | pgfortran*)
|
||||
@@ -21326,7 +21325,6 @@ _LT_EOF
|
||||
tmp_sharedflag='-shared'
|
||||
case $cc_basename,$host_cpu in
|
||||
pgcc*) # Portland Group C compiler
|
||||
- whole_archive_flag_spec_F77='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive'
|
||||
tmp_addflag=' $pic_flag'
|
||||
;;
|
||||
pgf77* | pgf90* | pgf95* | pgfortran*)
|
||||
@@ -25066,7 +25064,6 @@ _LT_EOF
|
||||
tmp_sharedflag='-shared'
|
||||
case $cc_basename,$host_cpu in
|
||||
pgcc*) # Portland Group C compiler
|
||||
- whole_archive_flag_spec_FC='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive'
|
||||
tmp_addflag=' $pic_flag'
|
||||
;;
|
||||
pgf77* | pgf90* | pgf95* | pgfortran*)
|
@ -17,6 +17,8 @@ class ParallelNetcdf(AutotoolsPackage):
|
||||
url = "https://parallel-netcdf.github.io/Release/pnetcdf-1.11.0.tar.gz"
|
||||
list_url = "https://parallel-netcdf.github.io/wiki/Download.html"
|
||||
|
||||
maintainers = ['skosukhin']
|
||||
|
||||
def url_for_version(self, version):
|
||||
if version >= Version('1.11.0'):
|
||||
url = "https://parallel-netcdf.github.io/Release/pnetcdf-{0}.tar.gz"
|
||||
@ -53,12 +55,42 @@ def url_for_version(self, version):
|
||||
|
||||
depends_on('perl', type='build')
|
||||
|
||||
conflicts('+shared', when='@:1.9%nag+fortran')
|
||||
# Suport for shared libraries was introduced in version 1.9.0
|
||||
conflicts('+shared', when='@:1.8')
|
||||
conflicts('+burstbuffer', when='@:1.10')
|
||||
|
||||
# Before 1.10.0, C utility programs (e.g. ncmpigen) were linked without
|
||||
# explicit specification of the Fortran runtime libraries, which is
|
||||
# required when libpnetcdf.so contains Fortran symbols. Libtool sets the
|
||||
# required linking flags implicitly but only if the Fortran compiler
|
||||
# produces verbose output with the '-v' flag (and, due to a bug in Libtool,
|
||||
# when CXX is not set to 'no'; see macro _LT_LANG_FC_CONFIG in libtool.m4
|
||||
# for more details). The latter is not the case for NAG. Starting 1.10.0,
|
||||
# the required linking flags are explicitly set in the makefiles and
|
||||
# detected using macro AC_FC_LIBRARY_LDFLAGS, which means that we can
|
||||
# override the verbose output flag for Fortran compiler on the command line
|
||||
# (see below).
|
||||
conflicts('+shared', when='@:1.9%nag+fortran')
|
||||
|
||||
# https://github.com/Parallel-NetCDF/PnetCDF/pull/59
|
||||
patch('nag_libtool.patch', when='@1.9:1.12.1%nag')
|
||||
|
||||
# We could apply the patch unconditionally. However, it fixes a problem
|
||||
# that manifests itself only when we build shared libraries with Spack on
|
||||
# a Cray system with PGI compiler. Based on the name of the $CC executable,
|
||||
# Libtool "thinks" that it works with PGI compiler directly but on a Cray
|
||||
# system it actually works with the Cray's wrapper. PGI compiler (at least
|
||||
# since the version 15.7) "understands" two formats of the
|
||||
# '--whole-archive' argument. Unluckily, Cray's wrapper "understands" only
|
||||
# one of them but Libtool switches to another one. The following patch
|
||||
# discards the switching.
|
||||
patch('cray_pgi_libtool_release.patch',
|
||||
when='@1.8:999%pgi+shared platform=cray')
|
||||
# Given that the bug manifests itself in rather specific conditions, it is
|
||||
# not reported upstream.
|
||||
patch('cray_pgi_libtool_master.patch',
|
||||
when='@master%pgi+shared platform=cray')
|
||||
|
||||
@property
|
||||
def libs(self):
|
||||
libraries = ['libpnetcdf']
|
||||
|
Loading…
Reference in New Issue
Block a user