From owner-svn-ports-all@freebsd.org Tue Aug 22 18:55:01 2017 Return-Path: Delivered-To: svn-ports-all@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 B57A3DDC547; Tue, 22 Aug 2017 18:55:01 +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 84B6170910; Tue, 22 Aug 2017 18:55:01 +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 v7MIt0V2050872; Tue, 22 Aug 2017 18:55:00 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v7MIt0gd050871; Tue, 22 Aug 2017 18:55:00 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201708221855.v7MIt0gd050871@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Tue, 22 Aug 2017 18:55:00 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r448576 - head/Mk X-SVN-Group: ports-head X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: head/Mk X-SVN-Commit-Revision: 448576 X-SVN-Commit-Repository: ports MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the ports tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 Aug 2017 18:55:01 -0000 Author: emaste (src committer) Date: Tue Aug 22 18:55:00 2017 New Revision: 448576 URL: https://svnweb.freebsd.org/changeset/ports/448576 Log: Add LLD_UNSAFE to force use of ld.bfd when ld is lld By default the compiler will find /usr/bin/ld for the linker. If a port sets LLD_UNSAFE and /usr/bin/ld is ld.lld, then add -fuse-ld=bfd to force the use of the binutils BFD linker (from the base system, if available, or by setting USE_BINUTILS). This change is based on an earlier, similar patch from bapt, with the addition of the -fuse-ld flag. PR: 214864 Reviewed by: bapt Approved by: portmgr (bapt) Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D12064 Modified: head/Mk/bsd.port.mk Modified: head/Mk/bsd.port.mk ============================================================================== --- head/Mk/bsd.port.mk Tue Aug 22 18:22:05 2017 (r448575) +++ head/Mk/bsd.port.mk Tue Aug 22 18:55:00 2017 (r448576) @@ -1737,6 +1737,20 @@ PKG_DEPENDS+= ${LOCALBASE}/sbin/pkg:${PKG_ORIGIN} .include "${PORTSDIR}/Mk/bsd.gcc.mk" .endif +_TEST_LD=/usr/bin/ld +.if defined(LLD_UNSAFE) && ${_TEST_LD:tA} == "/usr/bin/ld.lld" +LDFLAGS+= -fuse-ld=bfd +. if !defined(USE_BINUTILS) +. if exists(/usr/bin/ld.bfd) +LD= /usr/bin/ld.bfd +CONFIGURE_ENV+= LD=${LD} +MAKE_ENV+= LD=${LD} +. else +USE_BINUTILS= yes +. endif +. endif +.endif + .if defined(USE_BINUTILS) && !defined(DISABLE_BINUTILS) BUILD_DEPENDS+= ${LOCALBASE}/bin/as:devel/binutils BINUTILS?= ADDR2LINE AR AS CPPFILT GPROF LD NM OBJCOPY OBJDUMP RANLIB \