Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 25 Nov 2016 14:37:49 -0500
From:      Ed Maste <emaste@freebsd.org>
To:        "src-committers@freebsd.org" <src-committers@freebsd.org>,  "svn-src-all@freebsd.org" <svn-src-all@freebsd.org>,  "svn-src-head@freebsd.org" <svn-src-head@freebsd.org>
Subject:   Re: svn commit: r309142 - in head: . gnu/usr.bin/binutils/ld share/mk tools/build/options usr.bin/clang/lld
Message-ID:  <CAPyFy2DHGRd%2BGn9YDqy1nNsAoWBE8fhrQ7zxT=J5j8bf41yF3A@mail.gmail.com>
In-Reply-To: <201611251315.uAPDFSVL029907@repo.freebsd.org>
References:  <201611251315.uAPDFSVL029907@repo.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On 25 November 2016 at 08:15, Ed Maste <emaste@freebsd.org> wrote:
> Author: emaste
> Date: Fri Nov 25 13:15:28 2016
> New Revision: 309142
> URL: https://svnweb.freebsd.org/changeset/base/309142
>
> Log:
>   Add WITH_LLD_AS_LD build knob
>
>   If set it installs LLD as /usr/bin/ld.  LLD (as of version 3.9) is not
>   capable of linking the world and kernel, but can self-host and link many
>   substantial applications. GNU ld continues to be used for the world and
>   kernel build, regardless of how this knob is set.

There was some confusion on IRC about this, so let me clarify.

LLD 3.9 can link many applications on FreeBSD, including itself,
Clang, etc. It cannot link (all of) the FreeBSD kernel and world.
Additional changes have been made in LLD's subversion repo (after the
3.9 release), including improved linker script expression handling and
symbol version map support. These changes are needed to build FreeBSD
with lld.

With a recent LLD built from source it's possible to build a working
FreeBSD kernel and world excluding the boot loaders. I tested at
FreeBSD r309151 and LLD r287869.

The WITH_LLD_AS_LD knob does not affect buildworld. It will still
build a bootstrap GNU ld and use it to link all of the userland to be
installed. When WITH_LLD_AS_LD=yes installworld will install lld as
/usr/bin/ld in the resulting system. The knob is being made available
now for testing and experimentation, and to provide a linker in arm64
images that can be used to bootstrap either GNU ld or a later version
of LLD.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAPyFy2DHGRd%2BGn9YDqy1nNsAoWBE8fhrQ7zxT=J5j8bf41yF3A>