]> git.ipfire.org Git - thirdparty/libtool.git/commitdiff
m4: Disable chained fixups for macOS
authorIleana Dumitrescu <ileanadumitrescu95@gmail.com>
Thu, 20 Jun 2024 13:57:26 +0000 (16:57 +0300)
committerIleana Dumitrescu <ileanadumitrescu95@gmail.com>
Fri, 19 Jul 2024 16:26:09 +0000 (19:26 +0300)
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
m4/libtool.m4
tests/no-executables.at

index 6b6a24153553d6a790b46fcd97c1235d96f1a651..9e0264bbdb134f8759d8831acb2c848fb4976334 100644 (file)
--- a/NO-THANKS
+++ b/NO-THANKS
@@ -75,12 +75,14 @@ Andreas Stieger             Andreas.Stieger@gmx.de
 Brent Leback                   brent.leback@st.com
 Camilo La Rota                 camilo.larota@ens-lyon.fr
 Carl D. Roth                   roth@cse.ucsc.edu
+Carlo Cabrera                  carlo.antonio.cabrera@gmail.com
 Chris P. Ross                  cross@eng.us.uu.net
 Christian Rössel              christian.roessel@gmx.de
 Christopher Hulbert            cchgroupmail@gmail.com
 Craig Tierney                  Craig.Tierney@noaa.gov
 Dan McMahill                   mcmahill@mtl.mit.edu
 Daniel Richard G.              skunk@iSKUNK.ORG
+Dave Allured                   dave.allured@noaa.gov
 Dave Yost                      Dave@Yost.com
 Dimitri Papadopoulos           dpo@sfr.fr
 Donn Washburn                  n5xwb@comcast.net
index 1187330a155b843002e8a783ae8f3d2a2129abd8..bd6c99476a5e5a3ec59d5728eba27d79f4d4577e 100644 (file)
@@ -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
index 46225a6f6efdb62e7d0e34c11da45b2b32ecc959..7530fe366fb29f92a4cd4dff4da9a925ee844aa9 100644 (file)
@@ -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