bug-binutils
[Top][All Lists]
Advanced

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

[Bug ld/24873] gcc -flto objects result in --start-group … --end-group f


From: amodra at gmail dot com
Subject: [Bug ld/24873] gcc -flto objects result in --start-group … --end-group failure to include --as-needed libraries
Date: Sat, 03 Aug 2019 03:36:43 +0000

https://sourceware.org/bugzilla/show_bug.cgi?id=24873

Alan Modra <amodra at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |amodra at gmail dot com
            Summary|ld.bfd fails if -lm is      |gcc -flto objects result in
                   |included only once within   |--start-group … --end-group
                   |--start-group … --end-group |failure to include
                   |                            |--as-needed libraries

--- Comment #2 from Alan Modra <amodra at gmail dot com> ---
What isn't obvious from the bug description until you go looking at the
reference given in comment #1, is that this bug is about linking gcc -flto
objects.  I've updated the subject line to reflect this.  Adding LTO recompiled
objects back into the link is *seriously* complicated.  We might not be able to
fix this problem.

ld.gold succeeds because gold doesn't check that you've added necessary DSOs on
the command line.  (Of course, you have in fact mentioned -lm on the command
line but ld.bfd is getting confused.)

Without looking at a testcase I can't answer why using two -lm works, and
perhaps the link would work if a single -lm was used at the location of the
second -lm.

-- 
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]