branch: master commit f0507df8a780e3fda3eef05bce2c74ec8d032c8e Author: Ileana Dumitrescu <ileanadumitresc...@gmail.com> AuthorDate: Thu Jun 20 16:57:26 2024 +0300
m4: Disable chained fixups for macOS Append '-no_fixup_chains' flag to disable chained fixups since it is not compatible with '-undefined dynamic_lookup'. * m4/libtool.m4: AC_VAR_APPEND will handle appending the option to the variable, which allows the '+=' extension to be used by shells that provide this capability for more efficient scaling. Also, bump minimum required version of autoconf from 2.62 to 2.64. * tests/no-executables.at: Set cache variable for link test. * NO-THANKS: Add thanks for Carlo Cabrera and Dave Allured. --- NO-THANKS | 2 ++ m4/libtool.m4 | 24 ++++++++++++++++++++++-- tests/no-executables.at | 1 + 3 files changed, 25 insertions(+), 2 deletions(-) diff --git a/NO-THANKS b/NO-THANKS index 6b6a2415..9e0264bb 100644 --- a/NO-THANKS +++ b/NO-THANKS @@ -75,12 +75,14 @@ Andreas Stieger andreas.stie...@gmx.de Brent Leback brent.leb...@st.com Camilo La Rota camilo.lar...@ens-lyon.fr Carl D. Roth r...@cse.ucsc.edu +Carlo Cabrera carlo.antonio.cabr...@gmail.com Chris P. Ross cr...@eng.us.uu.net Christian Rössel christian.roes...@gmx.de Christopher Hulbert cchgroupm...@gmail.com Craig Tierney craig.tier...@noaa.gov Dan McMahill mcmah...@mtl.mit.edu Daniel Richard G. sk...@iskunk.org +Dave Allured dave.allu...@noaa.gov Dave Yost d...@yost.com Dimitri Papadopoulos d...@sfr.fr Donn Washburn n5...@comcast.net diff --git a/m4/libtool.m4 b/m4/libtool.m4 index 1187330a..bd6c9947 100644 --- a/m4/libtool.m4 +++ b/m4/libtool.m4 @@ -60,7 +60,7 @@ esac # LT_INIT([OPTIONS]) # ------------------ AC_DEFUN([LT_INIT], -[AC_PREREQ([2.62])dnl We use AC_PATH_PROGS_FEATURE_CHECK +[AC_PREREQ([2.64])dnl We use AC_PATH_PROGS_FEATURE_CHECK AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl AC_BEFORE([$0], [LT_LANG])dnl AC_BEFORE([$0], [LT_OUTPUT])dnl @@ -974,6 +974,7 @@ _lt_linker_boilerplate=`cat conftest.err` $RM -r conftest* ])# _LT_LINKER_BOILERPLATE + # _LT_REQUIRED_DARWIN_CHECKS # ------------------------- m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[ @@ -1024,6 +1025,21 @@ m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[ rm -f conftest.* fi]) + # Feature test to disable chained fixups since it is not + # compatible with '-undefined dynamic_lookup' + AC_CACHE_CHECK([for -no_fixup_chains linker flag], + [lt_cv_support_no_fixup_chains], + [ save_LDFLAGS=$LDFLAGS + LDFLAGS="$LDFLAGS -Wl,-no_fixup_chains" + AC_LINK_IFELSE( + [AC_LANG_PROGRAM([],[])], + lt_cv_support_no_fixup_chains=yes, + lt_cv_support_no_fixup_chains=no + ) + LDFLAGS=$save_LDFLAGS + ] + ) + AC_CACHE_CHECK([for -exported_symbols_list linker flag], [lt_cv_ld_exported_symbols_list], [lt_cv_ld_exported_symbols_list=no @@ -1073,7 +1089,11 @@ _LT_EOF 10.[[012]],*|,*powerpc*-darwin[[5-8]]*) _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; *) - _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;; + _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' + if test yes = "$lt_cv_support_no_fixup_chains"; then + AS_VAR_APPEND([_lt_dar_allow_undefined], [' $wl-no_fixup_chains']) + fi + ;; esac ;; esac diff --git a/tests/no-executables.at b/tests/no-executables.at index 46225a6f..7530fe36 100644 --- a/tests/no-executables.at +++ b/tests/no-executables.at @@ -50,6 +50,7 @@ AM_PROG_GCJ lt_cv_shlibpath_overrides_runpath=no lt_cv_archive_cmds_need_lc=no lt_cv_cc_needs_belf=no +lt_cv_support_no_fixup_chains=no lt_cv_ld_exported_symbols_list=no lt_cv_prog_compiler_static_works=no lt_cv_aix_libpath=/usr/lib:/lib