Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 1 Aug 2016 16:27:18 -0600
From:      Warner Losh <imp@bsdimp.com>
To:        Ed Maste <emaste@freebsd.org>
Cc:        "freebsd-toolchain@freebsd.org" <freebsd-toolchain@freebsd.org>
Subject:   Re: Update on using LLVM's lld linker in the FreeBSD base system
Message-ID:  <CANCZdfq7UfHT%2ByMxDDPA_E2iWYh57GjJPB-sML_%2BJ7qbmRhpzw@mail.gmail.com>
In-Reply-To: <CAPyFy2D-j6djHHiXk9D3dmj5xXjKGgoOEnUK7rHvbc=Hc28dxA@mail.gmail.com>
References:  <CAPyFy2D-j6djHHiXk9D3dmj5xXjKGgoOEnUK7rHvbc=Hc28dxA@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, Aug 1, 2016 at 3:40 PM, Ed Maste <emaste@freebsd.org> wrote:
> -N/--omagic, used by some boot loader components. We can achieve the
> same effect with a linker script.

Agreed. Or objcopy even.

> 2. Add the bmake build infrastructure, installing as /usr/bin/ld.lld
> on the same architectures that use Clang (amd64, arm, arm64, i386). I
> don't think there's a need for a WITH_LLD src.conf knob, but will add
> one if desired.

I'm on the fence here. Since it is ld.lld, I'm not sure there's much value
here so long as it falls under one of the clang WITH/WITHOUT symbols.

> 4. Modify the boot loader and kernel builds to avoid using features
> not implemented by lld.

This can be done in parallel starting now. I may take a stab at the boot
loader bits since I think that will be easy.

> 6. Request ports exp-runs and issue a call for testing with 3rd party
> software. Fix issues found during this process.

Experience suggests this may be the long poll :)

> 7. Switch /usr/bin/ld to ld.lld by default in head for the Clang-using
> architectures. Add a WITHOUT_LLD_AS_LD knob to switch back to GNU ld.

For the WITH/WITHOUT things, this is just a matter of changing the default
MK_foo setting, right?

> There is (some) support for mips and powerpc in lld, but I'm not sure
> how well tested it is. RISC-V is not yet supported but there is a
> desire to have a full LLVM-based RISC-V toolchain. I'm not aware of
> any plan with respect to sparc64 in lld. In any case, I do not plan to
> address these architectures in the initial lld work. In the near term
> they will continue to use GNU ld 2.17.50.

OK. How does this square up against the gcc 4.2 removal timelines and
plans? Once gcc is gone, we'll have to use an external toolchain anyway
to build mips at least (though clang is close, it isn't there yet despite Sean
Bruno's wonderful work).

> I'm interested in your comments, questions and concerns about this plan.

What's the timeline for all this stuff, do you think?

Generally, I like it though. My concerns are mostly with ports and gcc plans.
Though it isn't coupled to gcc, I'd suggest that we want to have a joint plan
for both before we get out the axes. Note this is purely a timing argument,
not whether to get them out, just when :)

Warner



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CANCZdfq7UfHT%2ByMxDDPA_E2iWYh57GjJPB-sML_%2BJ7qbmRhpzw>