GNU bug report logs -
#12880
Incorrect handling -Wl,--no-as-needed with libtool 2.4.2
Previous Next
To reply to this bug, email your comments to 12880 AT debbugs.gnu.org.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-libtool <at> gnu.org
:
bug#12880
; Package
libtool
.
(Tue, 13 Nov 2012 21:01:01 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Quanah Gibson-Mount <quanah <at> zimbra.com>
:
New bug report received and forwarded. Copy sent to
bug-libtool <at> gnu.org
.
(Tue, 13 Nov 2012 21:01:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
I've noticed that libtool re-orders -Wl,-no-as-needed incorrectly.
For example:
/bin/bash ./libtool --tag=CC --mode=link gcc -Wall -Wno-format -pipe
-O3 -DNDEBUG -Wl,--no-as-needed -lm -avoid-version -shrext .so -L. -o
libmod_convert.la -rpath /usr/local/lib libmod_convert_la-mod_convert.lo
libconverter.a -ldl
The purpose of this is to force linking of -lm into the resulting object.
However, when libtool re-orders this linking command and passes it to gcc,
the result is:
libtool: link: gcc -shared -fPIC -DPIC
.libs/libmod_convert_la-mod_convert.o -lm -L. libconverter.a -ldl -O3
-Wl,--no-as-needed -Wl,-soname -Wl,libmod_convert.so -o
.libs/libmod_convert.so
As you can see, the -Wl,--no-as-needed flag is moved *after* the call to
link in libm.
I could not find any way in which to get libtool to correctly pass the
linking flags to gcc. A search via google seems to indicate this is a long
standing known issue with libtool, as there is an extensive log in the
debian bug reporter about it.
Since there is no bug reporter for libtool that I could find, I have no
idea if it was ever reported upstream, although I would have thought so by
now.
build <at> zre-ubuntu12-64:~/builds/UBUNTU12_64/main/20121113050101_NETWORK/ZimbraConvertd/src/c$
./libtool --version
libtool (GNU libtool) 2.4.2
I finally restored to completely disabling gcc as-needed in my gcc spec
file so that the library would be built properly.
Thanks,
Quanah
--
Quanah Gibson-Mount
Sr. Member of Technical Staff
Zimbra, Inc
A Division of VMware, Inc.
--------------------
Zimbra :: the leader in open source messaging and collaboration
This bug report was last modified 12 years and 304 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.