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])
 



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])