This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/17480] collect2 on AIX calls static constructors of unreferenced object modules
- From: "lzsiga at axelero dot hu" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Sat, 20 Sep 2014 05:02:59 +0000
- Subject: [Bug c++/17480] collect2 on AIX calls static constructors of unreferenced object modules
- Auto-submitted: auto-generated
- References: <bug-17480-4 at http dot gcc dot gnu dot org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=17480
LÅrinczy Zsigmond <lzsiga at axelero dot hu> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |lzsiga at axelero dot hu
--- Comment #5 from LÅrinczy Zsigmond <lzsiga at axelero dot hu> ---
This bug is still present in 4.6.4, it prevented me from building mysql-5.5.38:
collect2 decided to include constructors from elements of a '*.a' archive that
were not required by the current executable to link -- and in the second
link-pass the unresolved externals of these 'parasite' objects stopped the
linking with error.
Before finding this bug, I've documented this problem here:
http://www.linuxquestions.org/questions/aix-43/overly-zealous-collect2-on-aix-4175519409/
I think collect2 should do what its documentation says it should do: examine
the result of the first linking, and collect the constructors/destructors from
the objects 'ld' actually linked in.