On 04/07/2024 20:55, Gary V. Vaughan wrote:


On Jul 2, 2024, at 12:01 PM, Václav Haisman <vhais...@gmail.com> wrote:

On 28. 06. 24 0:41, Ozkan Sezer wrote:
[Sorry, I seem to have deleted the mailing list message from my inbox]
Regarding -no_fixup_chains patch i.e.
 
http://git.savannah.gnu.org/gitweb/?p=libtool.git;a=commitdiff;h=3d1baeeef90a6b9e16c545babe833f28dca155a7
Is '+=' universally supported?? Maybe change to something like the following??

Is there a reason not to use AS_VAR_APPEND? (https://www.gnu.org/software/autoconf/manual/autoconf-2.69/html_node/Polymorphic-Variables.html)

diff --git a/m4/libtool.m4 b/m4/libtool.m4
index 381d4cb..31f1be0 100644
--- a/m4/libtool.m4
+++ b/m4/libtool.m4
@@ -1032,3 +1032,3 @@
       [ save_LDFLAGS=$LDFLAGS
-        LDFLAGS+=" -Wl,-no_fixup_chains"
+        LDFLAGS="$LDFLAGS -Wl,-no_fixup_chains"
         AC_LINK_IFELSE(
@@ -1093,3 +1093,3 @@ _LT_EOF
           if test yes = "$lt_cv_support_no_fixup_chains"; then
-            _lt_dar_allow_undefined+=' $wl-no_fixup_chains'
+            _lt_dar_allow_undefined='$_lt_dar_allow_undefined
$wl-no_fixup_chains'
           fi

AS_VAR_APPEND goes through a lot of setup at Libtool build-time, and eventually ends up calling a shell function as_fn_append at runtime anyway.   Since Libtool includes funclib.sh, it would be simpler to use func_append in this case: https://github.com/gnulib-modules/bootstrap/blob/master/build-aux/funclib.sh#L532-L549 <https://github.com/gnulib-modules/bootstrap/blob/master/build-aux/funclib.sh#L532-L549>

It is simpler than AS_VAR_APPEND, and it still includes the ability
to utilize the '+=' extension, which I do prefer. I have attached a proposed patch for this implementation. Unless there is an issue with
including the functionality of funclib.sh in libtool.m4, I will apply
this patch early next week.

The actual issue with appending the '-no_fixup_chains' option should
be fixed at this point, so I will close that [1].

[1] https://savannah.gnu.org/support/index.php?111069

--
Ileana Dumitrescu

GPG Public Key: FA26 CA78 4BE1 8892 7F22 B99F 6570 EA01 146F 7354
From f3028d64b899acef3056a477dbc9bc64320adcb0 Mon Sep 17 00:00:00 2001
From: Ileana Dumitrescu <ileanadumitresc...@gmail.com>
Date: Fri, 5 Jul 2024 17:44:55 +0300
Subject: [PATCH] m4: Utilize bootstrap's func_append

* m4/libtool.m4: Instead of a conditional for using -no_fixup_chains,
  func_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.
---
 m4/libtool.m4 | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/m4/libtool.m4 b/m4/libtool.m4
index e9eef32f..0b00154a 100644
--- a/m4/libtool.m4
+++ b/m4/libtool.m4
@@ -1089,10 +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'
           if test yes = "$lt_cv_support_no_fixup_chains"; then
-            _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup $wl-no_fixup_chains'
-          else
-            _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup'
+            # Include functionality from bootstrap script funclib.sh
+            . $ac_aux_dir/funclib.sh
+            func_append _lt_dar_allow_undefined ' $wl-no_fixup_chains'
           fi
         ;;
       esac
-- 
2.45.1

Attachment: OpenPGP_0x6570EA01146F7354.asc
Description: OpenPGP public key

Attachment: OpenPGP_signature.asc
Description: OpenPGP digital signature

Reply via email to