GNU bug report logs - #15646
Multiple bugs related to -no-undefined and -nostdlib

Previous Next

Package: libtool;

Reported by: Andy Lutomirski <luto <at> amacapital.net>

Date: Fri, 18 Oct 2013 17:27:01 UTC

Severity: normal

To reply to this bug, email your comments to 15646 AT debbugs.gnu.org.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-libtool <at> gnu.org:
bug#15646; Package libtool. (Fri, 18 Oct 2013 17:27:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to Andy Lutomirski <luto <at> amacapital.net>:
New bug report received and forwarded. Copy sent to bug-libtool <at> gnu.org. (Fri, 18 Oct 2013 17:27:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Andy Lutomirski <luto <at> amacapital.net>
To: bug-libtool <at> gnu.org
Subject: Multiple bugs related to -no-undefined and -nostdlib
Date: Fri, 18 Oct 2013 10:02:15 -0700
Hi-

I recently played with the build system for capnproto
(http://kentonv.github.io/capnproto/), and I think I found at least
three bugs in libtool:

1. -no-undefined is completely broken on Linux (and probably almost
every other non-Windows system).  It should pass -Wl,--no-undefined to
gcc for the link stage when building shared libraries.  It doesn't.
(This appears to be 100% consistent and reproducible.)

When I sent in a patch to work around that (by adding
-Wl,--no-undefined explicitly), other things broke.  So far, I've
discovered:

2. When building a c++ shared library with -pthread, g++ gets called
with -nostdlib [1], and libtool forgets to add -lpthread.  This can be
reproduced on Fedora 19 if you build this and remove the -lpthread
addition:

https://github.com/kentonv/capnproto/commit/798ff87b1b7e0a2da96355a34fa6e0aa10aaae85

3. There are reports of -nostdlib getting used without -lc on Solaris.
 This also breaks if --no-undefined is fixed.

[1] I cannot fathom why libtool thinks that -nostdlib is a good idea,
but I have no intention of adding to that argument.  This bug is about
that fact that -nostdlib is used incorrectly.  It could be fixed
either by removing it or by adding the missing libraries that are
supposed to be implied.

--Andy


-- 
Andy Lutomirski
AMA Capital Management, LLC




This bug report was last modified 10 years and 197 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.