update to the last comment: the ld.gold linker does the link, but the output misses the dependency on libm and therefore cannot be executed. What a mess! (The ld.gold even fails for the -lbar -lm (no -lfoo) case with this, while the standard ld at least then produces correct output. My conclusion: the current behavior of ld for --as-needed is at least not very consistent (why should -lbar -lm work, when -lfoo -lbar -lm should not?! Shouldn't be the key idea of --as-needed to remove the dependency on -lfoo, and of -lfoo only?)
-- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/945927 Title: ld incorrectly gives 'undefined reference' To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/binutils/+bug/945927/+subscriptions -- ubuntu-bugs mailing list [email protected] https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
