Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 25 Sep 2018 09:02:48 -0400
From:      Ed Maste <emaste@freebsd.org>
To:        soralx@cydem.org
Cc:        FreeBSD Current <freebsd-current@freebsd.org>
Subject:   Re: Buildowrld tries to use old ld, and fails
Message-ID:  <CAPyFy2BKiaEBMitvCejuT8UkoF2bq7XDeciwVU-m63hb2YVZ8A@mail.gmail.com>
In-Reply-To: <20180924235555.759b418d@mscad14>
References:  <20180923181818.7f3cb925@mscad14> <CAPyFy2CSSN8TO3ym22F5cu4pV40ai9-9rnxeKSPq2jo%2B=PE_fA@mail.gmail.com> <20180924235555.759b418d@mscad14>

next in thread | previous in thread | raw e-mail | index | archive | help
On 25 September 2018 at 02:55,  <soralx@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.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAPyFy2BKiaEBMitvCejuT8UkoF2bq7XDeciwVU-m63hb2YVZ8A>