branch development updated: libtool: Remove no-undefined flag from test

2024-06-08 Thread Ileana Dumitrescu
This is an automated email from the git hooks/post-receive script.

ildumi pushed a commit to branch development
in repository libtool.

The following commit(s) were added to refs/heads/development by this push:
 new 7854e410 libtool: Remove no-undefined flag from test
7854e410 is described below

commit 7854e41011dfb252a3cebf6c6f0431408b67628f
Author: Ileana Dumitrescu 
AuthorDate: Sat Jun 8 11:43:59 2024 +0300

libtool: Remove no-undefined flag from test

The addition of the no-undefined flag was causing the test to fail on
NetBSD. Removing the flag fixed the test.

* tests/bug_62343.at: Removed the no-undefined flag from the compilation
  command.
---
 tests/bug_62343.at | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tests/bug_62343.at b/tests/bug_62343.at
index f6053dc6..43a74b6f 100644
--- a/tests/bug_62343.at
+++ b/tests/bug_62343.at
@@ -54,7 +54,7 @@ AT_CHECK([$LIBTOOL --mode=compile --tag=CXX g++ 
-no-canonical-prefixes -c x.cpp]
 
 AT_CHECK([$GREP -- '-no-canonical-prefixes' stdout], [0], [ignore])
 
-AT_CHECK([$LIBTOOL --mode=link --tag=CXX g++ -no-undefined 
-no-canonical-prefixes -o libx.la -rpath /usr/lib64/ x.lo], [0], [stdout], 
[stderr])
+AT_CHECK([$LIBTOOL --mode=link --tag=CXX g++ -no-canonical-prefixes -o libx.la 
-rpath /usr/lib64/ x.lo], [0], [stdout], [stderr])
 
 AT_CHECK([$GREP -- '-no-canonical-prefixes' stdout], [0], [ignore])
 



[sr #111069] libtool: patch: Fix dynamic_lookup warnings from new Mac linker

2024-06-08 Thread Ileana Dumitrescu
Follow-up Comment #8, sr #111069 (group libtool):

Thanks for the discussion.

If you could modify this patch to include a linker version check that should
be sufficient. I do not think a feature test is necessary since the behaviour
seems rigidly defined between linker versions, and these fixup chains are only
implemented for the macOS linker.

[comment #7 comment #7:]
> [comment #6 comment #6:]
> > It would be better to understand whether what libtool is doing is
incompatible with chained fixups, and if so, fix that so that it works with
chained fixups.
> libtool passes `-undefined dynamic_lookup` to the linker, which is
incompatible with chained fixups.

It seems like fixup chains are already disabled by default since `-undefined
dynamic_lookup` is always passed. Accepting this patch with a linker test
should result in no new regressions to Libtool and the removal of the warnings
for certain macOS versions.

[comment #7 comment #7:]
> Though, if the idea is to keep chained fixups, then libtool must stop
passing
> `-undefined dynamic_lookup` to the linker. This has the possibility of
> producing undesirable consequences for many downstream projects, however.

Unfortunately I do not know what the downstream consequences would be, so
Libtool will keep `-undefined dynamic_lookup` for now and continue to disable
fixup chains. If someone could characterise the consequences for removing
`-undefined dynamic_lookup, this could be revisited.


___

Reply to this item at:

  

___
Message sent via Savannah
https://savannah.gnu.org/




branch development updated: libtool: Check if -no-canonical-prefixes supported

2024-06-08 Thread Ileana Dumitrescu
This is an automated email from the git hooks/post-receive script.

ildumi pushed a commit to branch development
in repository libtool.

The following commit(s) were added to refs/heads/development by this push:
 new e40ba04a libtool: Check if -no-canonical-prefixes supported
e40ba04a is described below

commit e40ba04af725eb49db6d61471a4804efe682e423
Author: Ileana Dumitrescu 
AuthorDate: Fri Jun 7 20:02:55 2024 +0300

libtool: Check if -no-canonical-prefixes supported

The compiler fails with the -no-canonical-prefixes flag in certain
environments. Check if the flag is supported in the current environment
and skip the test if it is not supported.

* tests/bug_62343.at: Skip test if -no-canonical-prefixes is unsupported
  in the current environment.
---
 tests/bug_62343.at | 25 ++---
 1 file changed, 22 insertions(+), 3 deletions(-)

diff --git a/tests/bug_62343.at b/tests/bug_62343.at
index 05839dc4..f6053dc6 100644
--- a/tests/bug_62343.at
+++ b/tests/bug_62343.at
@@ -29,13 +29,32 @@ AT_CHECK([$LIBTOOL --config | $EGREP 
'^build_libtool_libs=no' && (exit 77)], 1)
 
 AT_DATA([x.cpp],
 [[
-void f(int *p) { *p = 21; }
+#include 
+
+int main() {
+std::cout << "Hello, World!" << std::endl;
+return 0;
+}
 ]])
 
+# The -no-canonical-prefixes flag sometimes fails at the compiler level
+# depending on how the environment is set up, or which other flags have to be 
passed.
+# So first try to compile without libtool first to test if the current 
environment
+# supports the -no-canonical-prefixes flag. If it doesn't, skip the test.
+
+g++ -no-canonical-prefixes -c x.cpp
+
+result=$?
 
-AT_CHECK([$LIBTOOL --mode=compile --tag=CXX g++ -c x.cpp], [0], [stdout], 
[stderr])
+if test 0 -ne "$result"; then
+AT_SKIP_IF([:])
+fi
+
+AT_CHECK([$LIBTOOL --mode=compile --tag=CXX g++ -no-canonical-prefixes -c 
x.cpp], [0], [stdout], [stderr])
+
+AT_CHECK([$GREP -- '-no-canonical-prefixes' stdout], [0], [ignore])
 
-AT_CHECK([$LIBTOOL --mode=link --tag=CXX g++ -o libx.la -no-canonical-prefixes 
-rpath /usr/lib64/ x.lo], [0], [stdout], [stderr])
+AT_CHECK([$LIBTOOL --mode=link --tag=CXX g++ -no-undefined 
-no-canonical-prefixes -o libx.la -rpath /usr/lib64/ x.lo], [0], [stdout], 
[stderr])
 
 AT_CHECK([$GREP -- '-no-canonical-prefixes' stdout], [0], [ignore])