bug-binutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug ld/12557] gcc & Firefox fail to build with -flto and --as-needed LD


From: hjl.tools at gmail dot com
Subject: [Bug ld/12557] gcc & Firefox fail to build with -flto and --as-needed LDFLAGS
Date: Fri, 02 Sep 2011 13:58:28 +0000

http://sourceware.org/bugzilla/show_bug.cgi?id=12557

--- Comment #32 from H.J. Lu <hjl.tools at gmail dot com> 2011-09-02 13:58:28 
UTC ---
(In reply to comment #31)
> Simple testcase
> 
> double x;
> int main()
> {
>   return x*x*x*x;
> }
> 
> > gcc-4.6 -o t t.o -O -ffast-math -flto
> > gcc-4.6 -o t t.o -flto
> /tmp/ccIqK5i6.ltrans0.ltrans.o: In function `main':
> ccIqK5i6.ltrans0.o:(.text+0x19): undefined reference to `pow'
> collect2: ld returned 1 exit status
> > gcc-4.6 -o t t.o -flto -lm
> > gcc-4.6 -o t t.o -flto -Wl,--as-needed -lm
> 
> which works for me with the 2.21.1 release.

This looks like a GCC bug to me. If GCC turns 
x*x*x*x into pow, it should add -lm.

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]