This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug lto/50367] New: -flto and -Wl,--as-needed combination removes some needed libraries
- From: "krisztian.kocsis at optimaster dot eu" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Mon, 12 Sep 2011 18:24:08 +0000
- Subject: [Bug lto/50367] New: -flto and -Wl,--as-needed combination removes some needed libraries
- Auto-submitted: auto-generated
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50367
Bug #: 50367
Summary: -flto and -Wl,--as-needed combination removes some
needed libraries
Classification: Unclassified
Product: gcc
Version: 4.6.1
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: lto
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: krisztian.kocsis@optimaster.eu
Created attachment 25250
--> http://gcc.gnu.org/bugzilla/attachment.cgi?id=25250
Verbose linker output.
When I try to build udev with gcc-4.6.1, the accelerometer module fails to link
because of undefined references to sqrt, atan, etc. Unfortunately -lm is
explicitly specified. If I remove -flto or -Wl,--as-needed, the module links
successfully.
Verbose linker output is attached.