svn commit: r457295 - head/Mk/Uses
Ed Maste
emaste at FreeBSD.org
Tue Dec 26 17:20:17 UTC 2017
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:
More information about the svn-ports-head
mailing list