From owner-svn-ports-all@freebsd.org Tue Dec 26 17:20:17 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 41879EA3916; Tue, 26 Dec 2017 17:20:17 +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 E5FE37F11F; Tue, 26 Dec 2017 17:20:16 +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 vBQHKGB1094022; Tue, 26 Dec 2017 17:20:16 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vBQHKGgL094021; Tue, 26 Dec 2017 17:20:16 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201712261720.vBQHKGgL094021@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Tue, 26 Dec 2017 17:20:16 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r457295 - head/Mk/Uses X-SVN-Group: ports-head X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: head/Mk/Uses X-SVN-Commit-Revision: 457295 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.25 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, 26 Dec 2017 17:20:17 -0000 Author: emaste (src committer) Date: Tue Dec 26 17:20:15 2017 New Revision: 457295 URL: https://svnweb.freebsd.org/changeset/ports/457295 Log: libtool.mk: pass through LDFLAGS -fuse-ld=* Some ports depend on permissive or broken behaviour from the GNU BFD linker, ld.bfd. Clang and GCC support a -fuse-ld= flag to choose a specific linker, and as we migrate to installing lld as the base system /usr/bin/ld we'll want to make use of -fuse-ld=bfd to use bfd for ports that fail to link, or fail to run when linked with lld. An upstream libtool change[1] from Feb 2016 supports passing through -fuse-ld=, but it has not yet made it into a release. Patch an equivalent change into ltmain.sh via Mk/Uses/libtool.mk. Original proposal just patched ltmain.sh in devel/libtool. That would address ports that run libtoolize via autoreconf, including lang/mono which is one of the ports that fails to link with lld and responsible for many downstream skipped ports. Patching ltmain.sh via libtool.mk (tijl's suggestion) handles that case as well as ports that include their own copy of ltmain.sh. A later change may patch devel/libtool so that -fuse-ld works if using a ports-installed libtool to build software outside of the ports tree; the change in this commit is intended to address building in the ports tree. [1] http://git.savannah.gnu.org/cgit/libtool.git/commit/?id=f9970d99293faf908fdc153a653fa5781095fb7a PR: 214864, 224514 Reviewed by: tijl Approved by: portmgr (antoine) Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D13589 Modified: head/Mk/Uses/libtool.mk Modified: head/Mk/Uses/libtool.mk ============================================================================== --- head/Mk/Uses/libtool.mk Tue Dec 26 16:53:32 2017 (r457294) +++ head/Mk/Uses/libtool.mk Tue Dec 26 17:20:15 2017 (r457295) @@ -65,7 +65,7 @@ patch-libtool: -e '/if.*prog.*linkmode.*relink !=.*mode/s/if.*;/if :;/'\ -e '/if.*linkmode.*prog.*mode.* = relink/s/||.*;/;/' \ -e '/if.*prog.*linkmode.*relink = .*mode/s/||.*;/;/' \ - -e 's/|-p|-pg|/|-B*|-fstack-protector*|-p|-pg|/' + -e 's/|-p|-pg|/|-B*|-fstack-protector*|-fuse-ld=*|-p|-pg|/' _USES_stage+= 790:patch-lafiles patch-lafiles: