Page MenuHomeFreeBSD

Switch GNU ld to be installed as ld.bfd and linked as ld
ClosedPublic

Authored by emaste on Jan 5 2016, 1:23 AM.

Details

Summary

We intend to replace GNU ld with LLVM's lld, and on the path to there we'll experiment with having lld installed or linked as /usr/bin/ld. Thus, install GNU ld primarily as ld.bfd with an eye to making the ld link optional.

Diff Detail

Repository
rS FreeBSD src repository
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

emaste updated this revision to Diff 11934.Jan 5 2016, 1:23 AM
emaste retitled this revision from to Switch GNU ld to be installed as ld.bfd and linked as ld.
emaste updated this object.
emaste edited the test plan for this revision. (Show Details)
emaste added reviewers: dim, davide.
davide accepted this revision.Jan 5 2016, 1:25 AM
davide edited edge metadata.

looks good to me (in principle), and I like this approach. I'm not build system savvy so I'd like dim to sign-off this one.

Thanks!

Davide

This revision is now accepted and ready to land.Jan 5 2016, 1:25 AM
dim accepted this revision.Jan 5 2016, 10:21 PM
dim edited edge metadata.

LGTM, though maybe add an entry to OptionalObsoleteFiles.inc? Is there something like this for binutils? :)

This revision was automatically updated to reflect the committed changes.
In D4790#101906, @dim wrote:

LGTM, though maybe add an entry to OptionalObsoleteFiles.inc?

It's already there:

OLD_FILES+=usr/bin/ld
OLD_FILES+=usr/bin/ld.bfd

we'll need to adjust that later on though (once LLD makes it in) so that ld.bfd is removed in the .if ${MK_BINUTILS} == no case while ld is removed only if there's no linker (if both ${MK_BINUTILS} == no and ${MK_LLD} == no)