Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 27 Mar 2018 08:20:24 +0200
From:      Antoine Brodin <antoine@freebsd.org>
To:        Ed Maste <emaste@freebsd.org>
Cc:        FreeBSD Current <freebsd-current@freebsd.org>,  "freebsd-toolchain@FreeBSD.org" <freebsd-toolchain@freebsd.org>
Subject:   Re: Heads-up: linker (lld) changes for amd64 coming soon
Message-ID:  <CAALwa8kfdg31-Vt=v78ZHV1Us9_%2BN01PC7cwiKFe81720Hguhw@mail.gmail.com>
In-Reply-To: <CAPyFy2AjEJjryjgGCHAo107mkOUnFbKmkcMVFWQEKKbTEuu8AA@mail.gmail.com>
References:  <CAPyFy2AjEJjryjgGCHAo107mkOUnFbKmkcMVFWQEKKbTEuu8AA@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, Mar 27, 2018 at 4:14 AM, Ed Maste <emaste@freebsd.org> wrote:
> Some changes related to the amd64 linker are nearly ready to be
> committed (within a week or three), so I'm sending this notice to
> request any final comments or concerns before these changes are made.
>
> 1. Kostik (kib@) has a patch to start using kernel ifunc, with the
> first use being Supervisor Mode Access Prevention (SMAP) on amd64.
> This relies on linker support that is available in the in-tree lld and
> in contemporary binutils ld.bfd from ports, but not in the in-tree
> ld.bfd 2.17.50.
>
> Right now we use lld as the default bootstrap linker for amd64 in
> -CURRENT -- that is, the kernel, and userland libraries and binaries
> are linked with lld. To revert to ld.bfd for amd64 the build-time knob
> WITHOUT_LLD_BOOTSTRAP=yes can currently be added to src.conf. When the
> ifunc changes get committed WITHOUT_LLD_BOOTSTRAP=yes will not work
> for amd64 kernels (and will be added to BROKEN_OPTIONS).
>
> 2. WITH_LLD_IS_LD controls whether /usr/bin/ld is ld.bfd or ld.lld,
> and thus the linker used for linking ports. I plan to switch this to
> default on.
>
> Most ports build just fine when lld is the system linker, but a few
> encounter trouble: some of the ports rely on options not supported by
> lld, rely on specific quirks of ld.bfd's implementation, or have a
> buggy linker invocation that is silently ignored by ld.bfd.
>
> The majority of such ports have now been adapted to work with lld or
> configured to use ld.bfd as the linker, but there are a small number
> of failing ports that do not provide a way to use other than the
> default system linker /usr/bin/ld. The outstanding issues can be found
> in the ports exp-run for lld as /usr/bin/ld, PR214864.
>
> Please follow up if you have any concerns or comments about these
> upcoming changes.

Hi,

I have no concerns about 1.
About 2.,  I am concerned that changes breaking a large number of
ports are committed without portmgr@ approval.
If WITH_LLD_IS_LD is committed as is on amd64,  packages for head
won't be published as it doesn't meet our current criteria for
publication.

Antoine



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAALwa8kfdg31-Vt=v78ZHV1Us9_%2BN01PC7cwiKFe81720Hguhw>