Launchpad has imported 3 comments from the remote bug at http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50367.
If you reply to an imported comment from within Launchpad, your comment will be sent to the remote bug automatically. Read more about Launchpad's inter-bugtracker facilities at https://help.launchpad.net/InterBugTracking. ------------------------------------------------------------------------ On 2011-09-12T18:24:08+00:00 Krisztian-kocsis-0 wrote: Created attachment 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. Reply at: https://bugs.launchpad.net/binutils/+bug/778292/comments/5 ------------------------------------------------------------------------ On 2011-09-19T21:14:50+00:00 Doko-v wrote: $ 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 Reply at: https://bugs.launchpad.net/binutils/+bug/778292/comments/6 ------------------------------------------------------------------------ On 2011-09-19T21:21:53+00:00 Doko-v wrote: http://sourceware.org/bugzilla/show_bug.cgi?id=13201 Reply at: https://bugs.launchpad.net/binutils/+bug/778292/comments/7 ** Changed in: gcc Status: Unknown => New ** Changed in: gcc Importance: Unknown => Medium -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/778292 Title: undefined reference to `pow' when building with -flto To manage notifications about this bug go to: https://bugs.launchpad.net/binutils/+bug/778292/+subscriptions -- ubuntu-bugs mailing list [email protected] https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
