From: Ileana Dumitrescu Date: Tue, 25 Jun 2024 14:09:52 +0000 (+0300) Subject: m4: Update disabling chained fixups for macOS X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=3d1baeeef90a6b9e16c545babe833f28dca155a7;p=thirdparty%2Flibtool.git m4: Update disabling chained fixups for macOS This is an update for commit 001d22d7d587e85a911c71c4d0c798ede8014b77. * m4/libtool.m4: Replace version testing with a feature test for the '-no_fixup_chains' flag. * tests/no-executables.at: Set cache variable for link test. --- diff --git a/m4/libtool.m4 b/m4/libtool.m4 index a1fcdf7ae..381d4cb35 100644 --- a/m4/libtool.m4 +++ b/m4/libtool.m4 @@ -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+=" -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 @@ -1069,28 +1085,14 @@ _LT_EOF darwin1.*) _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; darwin*) - # $MACOSX_DEPLOYMENT_TARGET seems to be deprecated as a darwin - # environment variable case $MACOSX_DEPLOYMENT_TARGET,$host in 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' ;; - esac - # Disable chained fixups since it is not compatible with - # '-undefined dynamic_lookup' - macos_version=`sw_vers -productVersion` - case $macos_version in - 11.[[3-7]]*|1[[2-4]]*) - xcode_version=`pkgutil --pkg-info=com.apple.pkg.CLTools_Executables` - case $xcode_version in - *version:\ 1[[3-5]]*) - _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup $wl-no_fixup_chains' ;; - *) - ;; - esac - ;; - *) + _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' + if test yes = "$lt_cv_support_no_fixup_chains"; then + _lt_dar_allow_undefined+=' $wl-no_fixup_chains' + fi ;; esac ;; diff --git a/tests/no-executables.at b/tests/no-executables.at index 46225a6f6..7530fe366 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