HomeFreeBSD

MFC r343606: Enable lld as the system linker on i386

Description

MFC r343606: Enable lld as the system linker on i386

The migration to LLVM's lld linker has been in progress for quite some
time - I opened an LLVM tracking bug (23214) in April 2015 to track
issues using lld as FreeBSD's linker, and requested the first exp-run
using lld as /usr/bin/ld in November 2016.

In 12.0 LLD is the system linker on amd64, arm64, and armv7. i386 was
not switched [for 12.0] as there were additional ports failures not found
on amd64. Those have largely been addressed now, although there are a
small number of issues that are still being worked on. In some of these
cases having lld as the system linker makes it easier for developers and
third parties to investigate failures.

Thanks to antoine@ for handling the exp-runs and to everyone in the
FreeBSD and LLVM communites who have fixed issues with lld to get us to
this point.

Note for 12.1: There are still some issues to resolve in the ports tree,
but having the bootstrap linker (to build the kernel and installed
userland) be lld and the installed system linker (/usr/bin/ld) be GNU ld
causes other problems. In addition having having a different linker
configuration for i386 and amd64 in the same release causes some grief
for the ports team. So, switch to lld as the system linker on i386 in
stable/12 and plan to address remaining ports issues before 12.1.

PR: 214864 [exp-run]
Discussed with: jbeich, antoine
Relnotes: Yes
Sponsored by: The FreeBSD Foundation

Details

Provenance
emasteAuthored on
Parents
rS350296: MFC r350098, r350100-r350101
Branches
Unknown
Tags
Unknown