From owner-svn-src-head@freebsd.org Sun Apr 9 01:35:21 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3B247D34B04; Sun, 9 Apr 2017 01:35:21 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 13005B8; Sun, 9 Apr 2017 01:35:20 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v391ZKRE064490; Sun, 9 Apr 2017 01:35:20 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v391ZJ6p064486; Sun, 9 Apr 2017 01:35:19 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201704090135.v391ZJ6p064486@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Sun, 9 Apr 2017 01:35:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r316647 - in head: . share/mk tools/build/options X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 09 Apr 2017 01:35:21 -0000 Author: emaste Date: Sun Apr 9 01:35:19 2017 New Revision: 316647 URL: https://svnweb.freebsd.org/changeset/base/316647 Log: Introduce LLD_BOOTSTRAP to control lld as bootstrap linker Add WITH_LLD_BOOTSTRAP and WITHOUT_LLD_BOOTSTRAP knobs, similar to the Clang bootstrap knobs. Reviewed by: dim Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D10249 Added: head/tools/build/options/WITHOUT_LLD_BOOTSTRAP (contents, props changed) head/tools/build/options/WITH_LLD_BOOTSTRAP (contents, props changed) Modified: head/Makefile.inc1 head/share/mk/src.opts.mk Modified: head/Makefile.inc1 ============================================================================== --- head/Makefile.inc1 Sat Apr 8 21:57:59 2017 (r316646) +++ head/Makefile.inc1 Sun Apr 9 01:35:19 2017 (r316647) @@ -171,7 +171,7 @@ CROSS_BINUTILS_PREFIX?=${CROSS_TOOLCHAIN # riscv64-binutils port or package. .if !make(showconfig) .if !empty(BROKEN_OPTIONS:MBINUTILS_BOOTSTRAP) && \ - ${MK_LLD_IS_LD} == "no" && \ + ${MK_LLD_BOOTSTRAP} == "no" && \ !defined(CROSS_BINUTILS_PREFIX) CROSS_BINUTILS_PREFIX=/usr/local/${TARGET_ARCH}-freebsd/bin/ .if !exists(${CROSS_BINUTILS_PREFIX}) @@ -1665,9 +1665,10 @@ ${_bt}-usr.bin/yacc: ${_bt}-lib/liby _gensnmptree= usr.sbin/bsnmpd/gensnmptree .endif -# We need to build tblgen when we're building clang either as -# the bootstrap compiler, or as the part of the normal build. -.if ${MK_CLANG_BOOTSTRAP} != "no" || ${MK_CLANG} != "no" +# We need to build tblgen when we're building clang or lld, either as +# bootstrap tools, or as the part of the normal build. +.if ${MK_CLANG_BOOTSTRAP} != "no" || ${MK_CLANG} != "no" || \ + ${MK_LLD_BOOTSTRAP} != "no" || ${MK_LLD} != "no" _clang_tblgen= \ lib/clang/libllvmminimal \ usr.bin/clang/llvm-tblgen \ @@ -1828,9 +1829,6 @@ _elftctools= lib/libelftc \ # cross-build on a FreeBSD 10 host: _elftctools+= usr.bin/addr2line .endif -.if ${MK_LLD_IS_LD} != "no" -_lld= usr.bin/clang/lld -.endif .elif ${TARGET_ARCH} != ${MACHINE_ARCH} && ${MK_ELFTOOLCHAIN_BOOTSTRAP} != "no" # If cross-building with an external binutils we still need to build strip for # the target (for at least crunchide). @@ -1841,6 +1839,11 @@ _elftctools= lib/libelftc \ .if ${MK_CLANG_BOOTSTRAP} != "no" _clang= usr.bin/clang +.endif +.if ${MK_LLD_BOOTSTRAP} != "no" +_lld= usr.bin/clang/lld +.endif +.if ${MK_CLANG_BOOTSTRAP} != "no" || ${MK_LLD_BOOTSTRAP} != "no" _clang_libs= lib/clang .endif .if ${MK_GCC_BOOTSTRAP} != "no" Modified: head/share/mk/src.opts.mk ============================================================================== --- head/share/mk/src.opts.mk Sat Apr 8 21:57:59 2017 (r316646) +++ head/share/mk/src.opts.mk Sun Apr 9 01:35:19 2017 (r316647) @@ -250,9 +250,9 @@ __DEFAULT_YES_OPTIONS+=LLVM_LIBUNWIND __DEFAULT_NO_OPTIONS+=LLVM_LIBUNWIND .endif .if ${__T} == "aarch64" -__DEFAULT_YES_OPTIONS+=LLD_IS_LD +__DEFAULT_YES_OPTIONS+=LLD_BOOTSTRAP LLD_IS_LD .else -__DEFAULT_NO_OPTIONS+=LLD_IS_LD +__DEFAULT_NO_OPTIONS+=LLD_BOOTSTRAP LLD_IS_LD .endif .if ${__T} == "aarch64" || ${__T} == "amd64" __DEFAULT_YES_OPTIONS+=LLDB Added: head/tools/build/options/WITHOUT_LLD_BOOTSTRAP ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/build/options/WITHOUT_LLD_BOOTSTRAP Sun Apr 9 01:35:19 2017 (r316647) @@ -0,0 +1,5 @@ +.\" $FreeBSD$ +Set to not build the LLD linker during the bootstrap phase of +the build. +To be able to build the system, either Binutils or LLD bootstrap must be +enabled unless an alternate linker is provided via XLD. Added: head/tools/build/options/WITH_LLD_BOOTSTRAP ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/build/options/WITH_LLD_BOOTSTRAP Sun Apr 9 01:35:19 2017 (r316647) @@ -0,0 +1,2 @@ +.\" $FreeBSD$ +Set to build the LLD linker during the bootstrap phase of the build.