Page MenuHomeFreeBSD

do not require binutils port if using lld as ld
ClosedPublic

Authored by emaste on Apr 7 2017, 6:32 PM.

Details

Summary

r279908 added logic to Makefile.inc1 to automatically set CROSS_BINUTILS_PREFIX for architectures not supported by in-tree binutils -- arm64 when this was introduced, and subsequently riscv64 in addition.

LLVM's LLD linker is now included in the base system, and is capable of linking world and kernel. Thus, avoid setting CROSS_BINUTILS_PREFIX and requiring the binutils port if WITH_LLD_IS_LD is set.

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 added a comment.Apr 7 2017, 6:36 PM

We should introduce MK_LLD_BOOTSTRAP and then test for that instead. Right now MK_LLD_IS_LD controls both the linker to build world/kernel, and the linker installed in that world.

Note that MK_CLANG_BOOTSTRAP effectively requires MK_CLANG_IS_CC and I think the same limitation is acceptable with LLD, so it should be fine to start with this version.

emaste added a subscriber: kan.Apr 7 2017, 6:36 PM
kan accepted this revision.Apr 7 2017, 6:47 PM

.. works for me. Get that in, chase perfection at own schedule later...

This revision is now accepted and ready to land.Apr 7 2017, 6:47 PM
This revision was automatically updated to reflect the committed changes.