svn commit: r514354 - head/Mk
Piotr Kubaj
pkubaj at FreeBSD.org
Sat Oct 12 20:49:36 UTC 2019
Author: pkubaj
Date: Sat Oct 12 20:49:35 2019
New Revision: 514354
URL: https://svnweb.freebsd.org/changeset/ports/514354
Log:
Mk/bsd.port.mk: use GNU LD from ports on powerpc64 elfv2 when GNU LD is required
The reason is that on elfv2 systems we still have ld.bfd in base, but it's only used for 32-bit binaries (LLD currently doesn't support linking 32-bit PPC binaries).
ld.bfd from base supports only elfv1 and using it breaks linking many ports that set LLD_UNSAFE. Use Binutils from ports in such case.
PR: 239743
Submitted by: jbeich
Approved by: portmgr
Differential Revision: https://reviews.freebsd.org/D21996
Modified:
head/Mk/bsd.port.mk
Modified: head/Mk/bsd.port.mk
==============================================================================
--- head/Mk/bsd.port.mk Sat Oct 12 20:29:09 2019 (r514353)
+++ head/Mk/bsd.port.mk Sat Oct 12 20:49:35 2019 (r514354)
@@ -1842,6 +1842,11 @@ PKG_DEPENDS+= ${LOCALBASE}/sbin/pkg:${PKG_ORIGIN}
.if defined(LLD_UNSAFE) && ${/usr/bin/ld:L:tA} == /usr/bin/ld.lld
LDFLAGS+= -fuse-ld=bfd
BINARY_ALIAS+= ld=${LD}
+. if ${ARCH} == powerpc64
+# Base ld.bfd can't do ELFv2 which powerpc64 with Clang in base uses
+USE_BINUTILS= yes
+LDFLAGS+= -B${LOCALBASE}/bin
+. endif
. if !defined(USE_BINUTILS)
. if exists(/usr/bin/ld.bfd)
LD= /usr/bin/ld.bfd
More information about the svn-ports-all
mailing list