Re: Buildowrld tries to use old ld, and fails

From: Ed Maste <emaste_at_freebsd.org>
Date: Tue, 25 Sep 2018 09:02:48 -0400
On 25 September 2018 at 02:55,  <soralx_at_cydem.org> wrote:
>
>> The normal procedure shouldn't need any LD= overrides; is there
>> something unique in your build? Any src.conf settings?
>
> Indeed, I had "WITHOUT_LLD_BOOTSTRAP=yes" in src.conf. Not sure how
> that line made it into this file on a number of my systems... perhaps
> an artifact of old -CURRENT upgrade procedure that I've forgotten about.

Glad to hear it's resolved now.

> I was just following a note 20180510 from UPDATING. It worked before.
> And there are no newer entries overruling the old note, so I thought
> it should still work as before...

Ah, indeed. In addition to that note now being obsolete (and no
superseding note) there's another issue: the LD= suggestion applied
only to buildkernel (but perhaps was not sufficiently clear).

> Strange that overriding LD works when pointing to ld from binutils, but
> not always with ld.lld linker; for example, 'stand/i386/mbr/' ignores
> "LD=ld.lld", but not "LD=/usr/local/bin/ld".

This is a side effect of the linker feature detection. What's
happening here is that when lld is detected the build adds the
-no-rosegment flag, so when LD=ld.lld is in use the flag is added,
then the linker invoked from the compiler driver doesn't handle the
flag. When LD=/usr/local/bin/ld the flag is not added at all.

I will see about an update for UPDATING.
Received on Tue Sep 25 2018 - 11:03:14 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:41:18 UTC