|
From: | Petteri Räty |
Subject: | Re: why does libtool reorder -Wl, arguments to the end making -Wl, --as-needed unusable |
Date: | Mon, 03 Mar 2008 02:02:09 +0200 |
User-agent: | Thunderbird 2.0.0.9 (X11/20080301) |
Albert Chin kirjoitti:
On Thu, Feb 28, 2008 at 03:17:54PM +0200, Petteri Räty wrote:address@hidden /mnt/checkouts/classpath/native/jni/qt-peer $ make make all-am make[1]: Entering directory `/mnt/checkouts/classpath/native/jni/qt-peer'/bin/sh ../../../libtool --tag=CXX --mode=link g++ -DQT_SHARED -I/usr/include/qt4 -I/usr/include/qt4/QtCore -I/usr/include/qt4/QtGui -g -O2 -module -version-info 0:0:0 -no-undefined -avoid-version -Wl,--as-needed -o libqtpeer.la -rpath /usr/local/classpath/lib/classpath ... [snip snip]--as-needed needs to come before the object files and libs to be effective but libtool moves it to the end. This happens with both 1.5.26 and cvs head.The fact that libtool reorders _any_ of the command-line is a bug. I think Ralf has a fix for this but I don't think it'll happen until 2.1 or 2.2.
Still there in libtool 2.2 address@hidden ~/cpp/libtooltest $ ./libtool --version ltmain.sh (GNU libtool) 2.2 Written by Gordon Matzigkeit <address@hidden>, 1996 Copyright (C) 2008 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. address@hidden ~/cpp/libtooltest $ rm libfoobar.la address@hidden ~/cpp/libtooltest $ make/bin/sh ./libtool --tag=CXX --mode=link g++ -g -O2 -Wl,--as-needed -o libfoobar.la -rpath /usr/local/lib foo.lo -lpulse libtool: link: rm -fr .libs/libfoobar.a .libs/libfoobar.la .libs/libfoobar.lai .libs/libfoobar.so .libs/libfoobar.so.0 .libs/libfoobar.so.0.0.0 libtool: link: g++ -shared -nostdlib /usr/lib/gcc/i686-pc-linux-gnu/4.2.3/../../../crti.o /usr/lib/gcc/i686-pc-linux-gnu/4.2.3/crtbeginS.o .libs/foo.o /usr/lib/libpulse.so -L/usr/lib /usr/lib/libSM.so /usr/lib/libICE.so /usr/lib/libX11.so /usr/lib/libXau.so /usr/lib/libXdmcp.so -lcap -lrt -ldl -latomic_ops -L/usr/lib/gcc/i686-pc-linux-gnu/4.2.3 -L/usr/lib/gcc/i686-pc-linux-gnu/4.2.3/../../../../i686-pc-linux-gnu/lib -L/usr/lib/gcc/i686-pc-linux-gnu/4.2.3/../../.. -lstdc++ -lm -lc -lgcc_s /usr/lib/gcc/i686-pc-linux-gnu/4.2.3/crtendS.o /usr/lib/gcc/i686-pc-linux-gnu/4.2.3/../../../crtn.o -Wl,--as-needed -Wl,-soname -Wl,libfoobar.so.0 -o .libs/libfoobar.so.0.0.0 libtool: link: (cd ".libs" && rm -f "libfoobar.so.0" && ln -s "libfoobar.so.0.0.0" "libfoobar.so.0") libtool: link: (cd ".libs" && rm -f "libfoobar.so" && ln -s "libfoobar.so.0.0.0" "libfoobar.so")
libtool: link: ar cru .libs/libfoobar.a foo.o libtool: link: ranlib .libs/libfoobar.alibtool: link: ( cd ".libs" && rm -f "libfoobar.la" && ln -s "../libfoobar.la" "libfoobar.la" )
[Prev in Thread] | Current Thread | [Next in Thread] |