On 11.04.2018 20:55, Jakub Jelinek wrote:
> On Wed, Apr 11, 2018 at 06:07:17PM +0200, Matthias Klose wrote:
>> On 11.04.2018 12:31, Jakub Jelinek wrote:
>>> Hi!
>>> As discussed, using --as-needed and --no-as-needed is dangerous, because
>>> it results in --no-as-needed even for libraries after -lgcc_s, even when the
>>> default is --as-needed or --as-needed has been specified earlier on the
>>> command line.
>>> If the linker supports --push-state/--pop-state, we should IMHO use it.
>>> Bootstrapped/regtested on x86_64-linux and i686-linux, ok for stage1?
>>> Or is this something we want in GCC8 too?
>> this is problematic for binutils versions with --push-state/--pop-state 
>> support
>> in the BFD linker but not in gold, and then using -fuse-ld=gold.  So maybe 
>> the
>> version check for the BFD linker should only succeed for the first binutils
>> version which also has -push-state/--pop-state support in gold.
> Does anybody use -fuse-ld=gold?

grep the build log of your favorite distro, unless these are not beautified and
not showing any command line options.

For Debian/Ubuntu it's haskell using gold by default, and some upstreams like
systemd turns it on by default, assuming it has the same quality on any

Reply via email to