[PATCH] tests: Fix grep warning about stray \ before /

2022-12-21 Thread Frederic Berat
From: Frédéric Bérat 

Recent version of grep emit a warning if stray \ is found before /.
This leads to the link-order test failure.

 * tests/link-order.at: Remove unneeded \ before /
---
 tests/link-order.at | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/tests/link-order.at b/tests/link-order.at
index 3f01a00d..a145347f 100644
--- a/tests/link-order.at
+++ b/tests/link-order.at
@@ -99,12 +99,12 @@ aix* | interix*) ;;  # These systems have different path 
syntax
   case $hardcode_direct$hardcode_direct_absolute in
   yesno)
 AT_CHECK([if $EGREP relinking stderr; then
- $EGREP " .*\/new\/lib/libb$shared_ext .*\/old\/lib/libcee$shared_ext" 
stdout
+ $EGREP " .*/new/lib/libb$shared_ext .*/old/lib/libcee$shared_ext" 
stdout
else :; fi], [0], [ignore], [], [echo "wrong link order"])
 ;;
   *)
 AT_CHECK([if $EGREP relinking stderr; then
- $EGREP " -L.*\/new\/lib -lb -L.*\/old\/lib -lcee" stdout
+ $EGREP " -L.*/new/lib -lb -L.*/old/lib -lcee" stdout
else :; fi], [0], [ignore], [], [echo "wrong link order"])
 ;;
   esac
-- 
2.38.1




[PATCH] ltmain.in: Keep compiler generated deps

2022-02-17 Thread Frederic Berat
Hello,

This patch is a follow-up from the proposal posted on the mailing list,
titled opt_duplicate_compiler_generated_deps [1].

Fred.

[1] https://lists.gnu.org/archive/html/libtool/2022-02/msg1.html

-- 8< --

On Linux, postdeps may be defined as "-lstdc++ -lm -lgcc_s -lc -lgcc_s",
which is later stripped to "-lstdc++ -lm -lc -lgcc_s" leading to
undefined symbol references.

Since this behavior has been observed on quite a lot of systems now, it
appears that de-duplicating compiler generated deps generates more harm
than benefits.

Therefore, instead of adding one more exception, unconditionally keep compiler
generated deps by default for all hosts.
---
 build-aux/ltmain.in | 14 +++---
 1 file changed, 3 insertions(+), 11 deletions(-)

diff --git a/build-aux/ltmain.in b/build-aux/ltmain.in
index a5f21a1d..8d1b1687 100644
--- a/build-aux/ltmain.in
+++ b/build-aux/ltmain.in
@@ -518,17 +518,9 @@ libtool_validate_options ()
 # preserve --debug
 test : = "$debug_cmd" || func_append preserve_args " --debug"
 
-case $host in
-  # Solaris2 added to fix 
http://debbugs.gnu.org/cgi/bugreport.cgi?bug=16452
-  # see also: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59788
-  *cygwin* | *mingw* | *pw32* | *cegcc* | *solaris2* | *os2*)
-# don't eliminate duplications in $postdeps and $predeps
-opt_duplicate_compiler_generated_deps=:
-;;
-  *)
-opt_duplicate_compiler_generated_deps=$opt_preserve_dup_deps
-;;
-esac
+# Keeping compiler generated deps duplicates doesn't harm, and is necessary
+# in a majority of systems.
+opt_duplicate_compiler_generated_deps=:
 
 $opt_help || {
   # Sanity checks first:
-- 
2.34.1