Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 668462 - sys-devel/gcc add DEFAULT_LINKER="gold bfd" use flags
Summary: sys-devel/gcc add DEFAULT_LINKER="gold bfd" use flags
Status: RESOLVED NEEDINFO
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal enhancement (vote)
Assignee: Gentoo Toolchain Maintainers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-10-12 13:24 UTC by C. Wijtmans
Modified: 2019-02-12 23:08 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description C. Wijtmans 2018-10-12 13:24:07 UTC
add these use flags so its easy to switch linker. 
also enable gold by default on linux profiles.
Comment 1 Sergei Trofimovich (RETIRED) gentoo-dev 2018-10-13 15:19:49 UTC
1. There are already a few ways to switch linker:
- 'binutils-config --linker ld.gold' on binutils level.
- CFLAGS/CXXFLAGS=-fuse-ld=gold

2. What is DEFAULT_LINKER="gold bfd"? Something you pass to configure?

   In gcc/doc/install.texi only see --with-ld= option. It accepts single linker name, not a list of linkers. And assignd is to DEFAULT_LINKR variable in gcc/configure.ac.

   You can pass EXTRA_ECONF=--with-ld=${CTARGET}-ld.gold to get the similar effect.

Why another mechanism is needed?

Enabling gold by default will need extensive testing. But we can think of it if new mechanism is needed at all.
Comment 2 C. Wijtmans 2019-01-27 16:05:20 UTC
Had 0 issues with gold. It creates smaller binaries and makes compiling faster. It should be a use flag that is enabled by default in profile.
Comment 3 Sergei Trofimovich (RETIRED) gentoo-dev 2019-01-27 17:34:39 UTC
Please answer questions in #comment1.