|
5 | 5 | # Copyright (c) 2013 Mellanox Technologies, Inc.
|
6 | 6 | # All rights reserved.
|
7 | 7 | # Copyright (c) 2013-2014 Intel, Inc. All rights reserved.
|
8 |
| -# Copyright (c) 2015-2016 Research Organization for Information Science |
9 |
| -# and Technology (RIST). All rights reserved. |
| 8 | +# Copyright (c) 2015-2020 Research Organization for Information Science |
| 9 | +# and Technology (RIST). All rights reserved. |
10 | 10 | # Copyright (c) 2015 IBM Corporation. All rights reserved.
|
11 | 11 | #
|
12 | 12 | # $COPYRIGHT$
|
@@ -1068,12 +1068,41 @@ sub patch_autotools_output {
|
1068 | 1068 | # Fix consequence of broken libtool.m4
|
1069 | 1069 | # see http://lists.gnu.org/archive/html/bug-libtool/2015-07/msg00002.html and
|
1070 | 1070 | # https://github.com/open-mpi/ompi/issues/751
|
1071 |
| - push(@verbose_out, $indent_str . "Patching configure for libtool.m4 bug\n"); |
| 1071 | + push(@verbose_out, $indent_str . "Patching configure for -L/-R libtool.m4 bug\n"); |
1072 | 1072 | # patch for libtool < 2.4.3
|
1073 | 1073 | $c =~ s/# Some compilers place space between "-\{L,R\}" and the path.\n # Remove the space.\n if test \$p = \"-L\" \|\|/# Some compilers place space between "-\{L,-l,R\}" and the path.\n # Remove the spaces.\n if test \$p = \"-L\" \|\|\n test \$p = \"-l\" \|\|/g;
|
1074 | 1074 | # patch for libtool >= 2.4.3
|
1075 | 1075 | $c =~ s/# Some compilers place space between "-\{L,R\}" and the path.\n # Remove the space.\n if test x-L = \"\$p\" \|\|\n test x-R = \"\$p\"\; then/# Some compilers place space between "-\{L,-l,R\}" and the path.\n # Remove the spaces.\n if test x-L = \"x\$p\" \|\|\n test x-l = \"x\$p\" \|\|\n test x-R = \"x\$p\"\; then/g;
|
1076 | 1076 |
|
| 1077 | + # Fix OS X Big Sur (11.0.x) support |
| 1078 | + # From https://lists.gnu.org/archive/html/libtool-patches/2020-06/msg00001.html |
| 1079 | + push(@verbose_out, $indent_str . "Patching configure for MacOS Big Sur libtool.m4 bug\n"); |
| 1080 | + # Some versions of Libtool use ${wl} consistently, but others did |
| 1081 | + # not (e.g., they used $wl). Make the regexp be able to handle |
| 1082 | + # both. Additionally, the case string searching for 10.[012]* |
| 1083 | + # changed over time. So make sure it can handle both of the case |
| 1084 | + # strings that we're aware of. |
| 1085 | + my $WL = '(\$\{wl\}|\$wl)'; |
| 1086 | + my $SOMETIMES = '(\[,.\])*'; |
| 1087 | + my $search_string = 'darwin\*\) # darwin 5.x on |
| 1088 | + # if running on 10.5 or later, the deployment target defaults |
| 1089 | + # to the OS version, if on x86, and 10.4, the deployment |
| 1090 | + # target defaults to 10.4. Don\'t you love it\? |
| 1091 | + case \$\{MACOSX_DEPLOYMENT_TARGET-10.0\},\$host in |
| 1092 | + 10.0,\*86\*-darwin8\*\|10.0,\*-darwin\[91\]\*\) |
| 1093 | + _lt_dar_allow_undefined=\'' . $WL . '-undefined ' . $WL . 'dynamic_lookup\' ;; |
| 1094 | + 10.\[012\]' . $SOMETIMES . '\*\) |
| 1095 | + _lt_dar_allow_undefined=\'' . $WL . '-flat_namespace ' . $WL . '-undefined ' . $WL . 'suppress\' ;; |
| 1096 | + 10.\*\)'; |
| 1097 | + my $replace_string = 'darwin*) |
| 1098 | + # Open MPI patched for Darwin / MacOS Big Sur. See |
| 1099 | + # http://lists.gnu.org/archive/html/bug-libtool/2015-07/msg00001.html |
| 1100 | + case ${MACOSX_DEPLOYMENT_TARGET},$host in |
| 1101 | + 10.[012],*|,*powerpc*) |
| 1102 | + _lt_dar_allow_undefined=\'${wl}-flat_namespace ${wl}-undefined ${wl}suppress\' ;; |
| 1103 | + *)'; |
| 1104 | + $c =~ s/$search_string/$replace_string/g; |
| 1105 | + |
1077 | 1106 | # Only write out verbose statements and a new configure if the
|
1078 | 1107 | # configure content actually changed
|
1079 | 1108 | return
|
|
0 commit comments