public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug lto/50367] New: -flto and -Wl,--as-needed combination removes some needed libraries
@ 2011-09-12 18:25 krisztian.kocsis at optimaster dot eu
2011-09-19 22:04 ` [Bug lto/50367] " doko at gcc dot gnu.org
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: krisztian.kocsis at optimaster dot eu @ 2011-09-12 18:25 UTC (permalink / raw)
To: gcc-bugs
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.
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug lto/50367] -flto and -Wl,--as-needed combination removes some needed libraries
2011-09-12 18:25 [Bug lto/50367] New: -flto and -Wl,--as-needed combination removes some needed libraries krisztian.kocsis at optimaster dot eu
@ 2011-09-19 22:04 ` doko at gcc dot gnu.org
2011-09-19 22:13 ` doko at gcc dot gnu.org
2011-09-20 6:24 ` amodra at gmail dot com
2 siblings, 0 replies; 4+ messages in thread
From: doko at gcc dot gnu.org @ 2011-09-19 22:04 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50367
Matthias Klose <doko at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |doko at gcc dot gnu.org
--- Comment #1 from Matthias Klose <doko at gcc dot gnu.org> 2011-09-19 21:14:50 UTC ---
$ cat test-flto.c
#include <math.h>
#include <stdio.h>
int main()
{
printf("%le\n", gamma(42));
return 0;
}
$ gcc -Wl,--as-needed -flto test-flto.c -lm
/tmp/ccXjDUDX.ltrans0.ltrans.o: In function `main':
ccXjDUDX.ltrans0.o:(.text+0xd): undefined reference to `gamma'
collect2: ld returned 1 exit status
$ gcc -B/usr/lib/gold-ld/ -Wl,--as-needed -flto -o test-flto test-flto.c -lm
does work
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug lto/50367] -flto and -Wl,--as-needed combination removes some needed libraries
2011-09-12 18:25 [Bug lto/50367] New: -flto and -Wl,--as-needed combination removes some needed libraries krisztian.kocsis at optimaster dot eu
2011-09-19 22:04 ` [Bug lto/50367] " doko at gcc dot gnu.org
@ 2011-09-19 22:13 ` doko at gcc dot gnu.org
2011-09-20 6:24 ` amodra at gmail dot com
2 siblings, 0 replies; 4+ messages in thread
From: doko at gcc dot gnu.org @ 2011-09-19 22:13 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50367
--- Comment #2 from Matthias Klose <doko at gcc dot gnu.org> 2011-09-19 21:21:53 UTC ---
http://sourceware.org/bugzilla/show_bug.cgi?id=13201
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug lto/50367] -flto and -Wl,--as-needed combination removes some needed libraries
2011-09-12 18:25 [Bug lto/50367] New: -flto and -Wl,--as-needed combination removes some needed libraries krisztian.kocsis at optimaster dot eu
2011-09-19 22:04 ` [Bug lto/50367] " doko at gcc dot gnu.org
2011-09-19 22:13 ` doko at gcc dot gnu.org
@ 2011-09-20 6:24 ` amodra at gmail dot com
2 siblings, 0 replies; 4+ messages in thread
From: amodra at gmail dot com @ 2011-09-20 6:24 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50367
Alan Modra <amodra at gmail dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
CC| |amodra at gmail dot com
Resolution| |INVALID
--- Comment #3 from Alan Modra <amodra at gmail dot com> 2011-09-20 02:07:39 UTC ---
Not a gcc bug.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2011-09-20 2:08 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-09-12 18:25 [Bug lto/50367] New: -flto and -Wl,--as-needed combination removes some needed libraries krisztian.kocsis at optimaster dot eu
2011-09-19 22:04 ` [Bug lto/50367] " doko at gcc dot gnu.org
2011-09-19 22:13 ` doko at gcc dot gnu.org
2011-09-20 6:24 ` amodra at gmail dot com
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).