]> git.ipfire.org Git - thirdparty/libtool.git/commitdiff
libtool: Fix test 170 in Cygwin/Mingw32
authorIleana Dumitrescu <ileanadumitrescu95@gmail.com>
Fri, 9 Aug 2024 15:39:45 +0000 (18:39 +0300)
committerIleana Dumitrescu <ileanadumitrescu95@gmail.com>
Tue, 27 Aug 2024 15:17:46 +0000 (18:17 +0300)
Test 170 in bug_62343.at is failing to link object files with a library
file. This is fixed by choosing the correct architecture version of a
compiler by using the 'CXX' macro.

tests/bug_62343.at: Replace 'g++' with 'CXX' macro

tests/bug_62343.at

index 75ceafd3bbc691c0acc38296563d23b515c1a066..6aab18f5f98db41fcc154749eccadbb3f4ce59aa 100644 (file)
@@ -42,7 +42,7 @@ int main() {
 # 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
+$CXX -no-canonical-prefixes -c x.cpp
 
 result=$?
 
@@ -50,7 +50,7 @@ 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([$LIBTOOL --mode=compile --tag=CXX $CXX -no-canonical-prefixes -c x.cpp], [0], [stdout], [stderr])
 
 AT_CHECK([$GREP -- '-no-canonical-prefixes' stdout], [0], [ignore])
 
@@ -63,7 +63,7 @@ case $host_os in
     ;;
 esac
 
-AT_CHECK([$LIBTOOL --mode=link --tag=CXX g++ -no-canonical-prefixes $host_flags -o libx.la -rpath /usr/lib64/ x.lo], [0], [stdout], [stderr])
+AT_CHECK([$LIBTOOL --mode=link --tag=CXX $CXX -no-canonical-prefixes $host_flags -o libx.la -rpath /usr/lib64/ x.lo], [0], [stdout], [stderr])
 
 AT_CHECK([$GREP -- '-no-canonical-prefixes' stdout], [0], [ignore])