mpich: remove libtool patches (#30769)

This commit is contained in:
Sergey Kosukhin 2022-06-14 16:29:22 +02:00 committed by GitHub
parent f8a6799e67
commit a05e729e1b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 0 additions and 208 deletions

View File

@ -1,29 +0,0 @@
--- a/configure
+++ b/configure
@@ -11563,6 +11563,8 @@ _LT_EOF
lf95*) # Lahey Fortran 8.1
whole_archive_flag_spec=
tmp_sharedflag='--shared' ;;
+ nagfor*) # NAGFOR 5.3
+ 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= ;;
@@ -19036,6 +19038,8 @@ _LT_EOF
lf95*) # Lahey Fortran 8.1
whole_archive_flag_spec_F77=
tmp_sharedflag='--shared' ;;
+ nagfor*) # NAGFOR 5.3
+ 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= ;;
@@ -22116,6 +22120,8 @@ _LT_EOF
lf95*) # Lahey Fortran 8.1
whole_archive_flag_spec_FC=
tmp_sharedflag='--shared' ;;
+ nagfor*) # NAGFOR 5.3
+ 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= ;;

View File

@ -1,71 +0,0 @@
--- a/confdb/ltmain.sh
+++ b/confdb/ltmain.sh
@@ -180,6 +180,20 @@ func_basename ()
func_basename_result=`$ECHO "${1}" | $SED "$basename"`
} # func_basename may be replaced by extended shell implementation
+# Calculate cc_basename. Skip known compiler wrappers and cross-prefix.
+func_cc_basename ()
+{
+ for cc_temp in $*""; do
+ case $cc_temp in
+ compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
+ distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
+ \-*) ;;
+ *) break;;
+ esac
+ done
+ func_cc_basename_result=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"`
+}
+
# func_dirname_and_basename file append nondir_replacement
# perform func_basename and func_dirname in a single function
@@ -6419,6 +6433,13 @@ func_mode_link ()
# Convert "-framework foo" to "foo.ltframework"
if test -n "$inherited_linker_flags"; then
tmp_inherited_linker_flags=`$ECHO "$inherited_linker_flags" | $SED 's/-framework \([^ $]*\)/\1.ltframework/g'`
+
+ # Additionally convert " -pthread" to " -Wl,-pthread" for nagfor
+ func_cc_basename $CC
+ case $func_cc_basename_result in
+ nagfor*) tmp_inherited_linker_flags=`$ECHO "$tmp_inherited_linker_flags" | $SED 's/ -pthread/ -Wl,-pthread/g'` ;;
+ esac
+
for tmp_inherited_linker_flag in $tmp_inherited_linker_flags; do
case " $new_inherited_linker_flags " in
*" $tmp_inherited_linker_flag "*) ;;
@@ -8001,6 +8022,13 @@ EOF
;;
esac
+ # Time to revert the changes made for nagfor.
+ func_cc_basename $CC
+ case $func_cc_basename_result in
+ nagfor*)
+ new_inherited_linker_flags=`$ECHO " $new_inherited_linker_flags" | $SED 's% -Wl,-pthread% -pthread%g'` ;;
+ esac
+
# move library search paths that coincide with paths to not yet
# installed libraries to the beginning of the library search list
new_libs=
--- a/configure
+++ b/configure
@@ -11614,6 +11614,8 @@ _LT_EOF
whole_archive_flag_spec=
tmp_sharedflag='--shared' ;;
nagfor*) # NAGFOR 5.3
+ 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'
+ compiler_needs_object=yes
tmp_sharedflag='-Wl,-shared' ;;
xl[cC]* | bgxl[cC]* | mpixl[cC]*) # IBM XL C 8.0 on PPC (deal with xlf below)
tmp_sharedflag='-qmkshrobj'
@@ -19246,6 +19248,8 @@ _LT_EOF
whole_archive_flag_spec_FC=
tmp_sharedflag='--shared' ;;
nagfor*) # NAGFOR 5.3
+ 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'
+ compiler_needs_object_FC=yes
tmp_sharedflag='-Wl,-shared' ;;
xl[cC]* | bgxl[cC]* | mpixl[cC]*) # IBM XL C 8.0 on PPC (deal with xlf below)
tmp_sharedflag='-qmkshrobj'

View File

@ -1,11 +0,0 @@
--- a/configure
+++ b/configure
@@ -22237,6 +22237,8 @@ _LT_EOF
whole_archive_flag_spec_F77=
tmp_sharedflag='--shared' ;;
nagfor*) # NAGFOR 5.3
+ 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'
+ compiler_needs_object_F77=yes
tmp_sharedflag='-Wl,-shared' ;;
xl[cC]* | bgxl[cC]* | mpixl[cC]*) # IBM XL C 8.0 on PPC (deal with xlf below)
tmp_sharedflag='-qmkshrobj'

View File

@ -1,69 +0,0 @@
--- a/confdb/ltmain.sh
+++ b/confdb/ltmain.sh
@@ -7867,6 +7867,13 @@ func_mode_link ()
# Convert "-framework foo" to "foo.ltframework"
if test -n "$inherited_linker_flags"; then
tmp_inherited_linker_flags=`$ECHO "$inherited_linker_flags" | $SED 's/-framework \([^ $]*\)/\1.ltframework/g'`
+
+ # Additionally convert " -pthread" to " -Wl,-pthread" for nagfor
+ func_cc_basename $CC
+ case $func_cc_basename_result in
+ nagfor*) tmp_inherited_linker_flags=`$ECHO "$tmp_inherited_linker_flags" | $SED 's/ -pthread/ -Wl,-pthread/g'` ;;
+ esac
+
for tmp_inherited_linker_flag in $tmp_inherited_linker_flags; do
case " $new_inherited_linker_flags " in
*" $tmp_inherited_linker_flag "*) ;;
@@ -8886,7 +8893,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"
;;
@@ -9498,6 +9506,13 @@ EOF
;;
esac
+ # Time to revert the changes made for nagfor.
+ func_cc_basename $CC
+ case $func_cc_basename_result in
+ nagfor*)
+ new_inherited_linker_flags=`$ECHO " $new_inherited_linker_flags" | $SED 's% -Wl,-pthread% -pthread%g'` ;;
+ esac
+
# move library search paths that coincide with paths to not yet
# installed libraries to the beginning of the library search list
new_libs=
--- a/configure
+++ b/configure
@@ -12583,6 +12583,8 @@ _LT_EOF
whole_archive_flag_spec=
tmp_sharedflag='--shared' ;;
nagfor*) # NAGFOR 5.3
+ 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'
+ compiler_needs_object=yes
tmp_sharedflag='-Wl,-shared' ;;
xl[cC]* | bgxl[cC]* | mpixl[cC]*) # IBM XL C 8.0 on PPC (deal with xlf below)
tmp_sharedflag='-qmkshrobj'
@@ -20684,6 +20686,8 @@ _LT_EOF
whole_archive_flag_spec_FC=
tmp_sharedflag='--shared' ;;
nagfor*) # NAGFOR 5.3
+ 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'
+ compiler_needs_object_FC=yes
tmp_sharedflag='-Wl,-shared' ;;
xl[cC]* | bgxl[cC]* | mpixl[cC]*) # IBM XL C 8.0 on PPC (deal with xlf below)
tmp_sharedflag='-qmkshrobj'
@@ -23958,6 +23962,8 @@ _LT_EOF
whole_archive_flag_spec_F77=
tmp_sharedflag='--shared' ;;
nagfor*) # NAGFOR 5.3
+ 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'
+ compiler_needs_object_F77=yes
tmp_sharedflag='-Wl,-shared' ;;
xl[cC]* | bgxl[cC]* | mpixl[cC]*) # IBM XL C 8.0 on PPC (deal with xlf below)
tmp_sharedflag='-qmkshrobj'

View File

@ -163,23 +163,6 @@ class Mpich(AutotoolsPackage, CudaPackage, ROCmPackage):
sha256='5f48d2dd8cc9f681cf710b864f0d9b00c599f573a75b1e1391de0a3d697eba2d',
when='@3.3:3.3.0')
# This patch for Libtool 2.4.2 enables shared libraries for NAG and is
# applied by MPICH starting version 3.1.
patch('nag_libtool_2.4.2_0.patch', when='@:3.0%nag')
# This patch for Libtool 2.4.2 fixes the problem with '-pthread' flag and
# enables convenience libraries for NAG. Starting version 3.1, the order of
# checks for FC and F77 is changed, therefore we need to apply the patch in
# two steps (the patch files can be merged once the support for versions
# 3.1 and older is dropped).
patch('nag_libtool_2.4.2_1.patch', when='@:3.1.3%nag')
patch('nag_libtool_2.4.2_2.patch', when='@:3.1.3%nag')
# This patch for Libtool 2.4.6 does the same as the previous two. The
# problem is not fixed upstream yet and the upper version constraint is
# given just to avoid application of the patch to the develop version.
patch('nag_libtool_2.4.6.patch', when='@3.1.4:3.3%nag')
depends_on('findutils', type='build')
depends_on('pkgconfig', type='build')
@ -248,17 +231,6 @@ class Mpich(AutotoolsPackage, CudaPackage, ROCmPackage):
# see https://github.com/pmodels/mpich/pull/5031
conflicts('%clang@:7', when='@3.4:3.4.1')
@run_after('configure')
def patch_cce(self):
# Configure misinterprets output from the cce compiler
# Patching configure instead should be possible, but a first
# implementation failed in obscure ways that were not worth
# tracking down when this worked
if self.spec.satisfies('%cce'):
filter_file('-L -L', '', 'config.lt', string=True)
filter_file('-L -L', '', 'libtool', string=True)
filter_file('-L -L', '', 'config.status', string=True)
@classmethod
def determine_version(cls, exe):
output = Executable(exe)(output=str, error=str)