From d74021d65b104beb34c3a0d4c65f149dd6882876 Mon Sep 17 00:00:00 2001 From: Bryan Drewery Date: Wed, 20 Jun 2018 16:10:02 +0000 Subject: [PATCH] Rework how the ld link is handled in WORLDTMP from r322811. LLD_BOOTSTRAP (build) is independent of LLD_IS_LD (installed) so they should not be based on each other. This is related to upcoming WITH_SYSTEM_LINKER work. Reviewed by: emaste Sponsored by: Dell EMC Differential Revision: https://reviews.freebsd.org/D15836 --- Makefile.inc1 | 2 +- gnu/usr.bin/binutils/ld/Makefile | 7 +++---- usr.bin/clang/lld/Makefile | 3 ++- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Makefile.inc1 b/Makefile.inc1 index 907faea94b75..4776f7a176ab 100644 --- a/Makefile.inc1 +++ b/Makefile.inc1 @@ -586,7 +586,7 @@ TMAKE= \ # TOOLS_PREFIX set in BMAKE XMAKE= ${BMAKE} \ TARGET=${TARGET} TARGET_ARCH=${TARGET_ARCH} \ - MK_GDB=no MK_LLD_IS_LD=${MK_LLD_BOOTSTRAP} MK_TESTS=no + MK_GDB=no MK_TESTS=no # kernel-tools stage KTMAKEENV= INSTALL="sh ${.CURDIR}/tools/install.sh" \ diff --git a/gnu/usr.bin/binutils/ld/Makefile b/gnu/usr.bin/binutils/ld/Makefile index c1a14ab57aa1..5ac308b3dd2c 100644 --- a/gnu/usr.bin/binutils/ld/Makefile +++ b/gnu/usr.bin/binutils/ld/Makefile @@ -7,8 +7,10 @@ ELF_SCR_EXT= x xbn xc xd xdc xdw xn xr xs xsc xsw xu xw .PATH: ${SRCDIR}/ld PROG= ld.bfd -.if ${MK_LLD_IS_LD} == "no" +.if (!defined(TOOLS_PREFIX) && ${MK_LLD_IS_LD} == "no") || \ + (defined(TOOLS_PREFIX) && ${MK_LLD_BOOTSTRAP} == "no") MAN= ld.1 +LINKS= ${BINDIR}/ld.bfd ${BINDIR}/ld .else MAN= ld.bfd.1 CLEANFILES+= ld.bfd.1 @@ -57,9 +59,6 @@ CLEANFILES+= ldemul-list.h stringify.sed FILES= ${LDSCRIPTS:S|^|ldscripts/|} FILESDIR= ${SCRIPTDIR} -.if ${MK_LLD_IS_LD} == "no" -LINKS= ${BINDIR}/ld.bfd ${BINDIR}/ld -.endif HOST= ${TARGET_TUPLE} LIBSEARCHPATH= \"=/lib\":\"=/usr/lib\" diff --git a/usr.bin/clang/lld/Makefile b/usr.bin/clang/lld/Makefile index 3c795a496104..8bdfe114e576 100644 --- a/usr.bin/clang/lld/Makefile +++ b/usr.bin/clang/lld/Makefile @@ -8,7 +8,8 @@ LLD_SRCS= ${LLVM_SRCS}/tools/lld PACKAGE= lld PROG_CXX= ld.lld -.if ${MK_LLD_IS_LD} != "no" +.if (!defined(TOOLS_PREFIX) && ${MK_LLD_IS_LD} != "no") || \ + (defined(TOOLS_PREFIX) && ${MK_LLD_BOOTSTRAP} != "no") SYMLINKS= ${PROG_CXX} ${BINDIR}/ld MLINKS= ld.lld.1 ld.1 .endif