mirror of
git://git.savannah.gnu.org/libtool.git
synced 2025-02-17 15:10:02 +08:00
libtool: Add no-undefined flag based on host OS
Without the no-undefined flag, the test will fail on Mingw and Cygwin, so the flag will be appended for windows compilation. With the flag, the test will fail on NetBSD, so the flag is removed. * tests/bug_62343.at: Add no-undefined flag for windows-based compilation and remove otherwise.
This commit is contained in:
parent
e40ba04af7
commit
eeee0216ed
@ -54,7 +54,16 @@ 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])
|
||||
host_flags=:
|
||||
case $host_os in
|
||||
cygwin* | mingw* | windows*)
|
||||
host_flags=-no-undefined
|
||||
;;
|
||||
*)
|
||||
;;
|
||||
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([$GREP -- '-no-canonical-prefixes' stdout], [0], [ignore])
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user