Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F105592180
D20261.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D20261.diff
View Options
Index: head/share/mk/bsd.compat.mk
===================================================================
--- head/share/mk/bsd.compat.mk
+++ head/share/mk/bsd.compat.mk
@@ -47,11 +47,20 @@
.else
LIB32CPUFLAGS= -mcpu=${COMPAT_CPUTYPE}
.endif
+
+.if ${COMPAT_COMPILER_TYPE} == "gcc"
LIB32CPUFLAGS+= -m32
+.else
+LIB32CPUFLAGS+= -target powerpc-unknown-freebsd13.0
+
+# Use BFD to workaround ld.lld issues on PowerPC 32 bit
+LIB32CPUFLAGS+= -fuse-ld=${LD_BFD}
+.endif
+
LIB32_MACHINE= powerpc
LIB32_MACHINE_ARCH= powerpc
LIB32WMAKEFLAGS= \
- LD="${XLD} -m elf32ppc_fbsd"
+ LD="${LD_BFD} -m elf32ppc_fbsd"
.elif ${COMPAT_ARCH:Mmips64*} != ""
HAS_COMPAT=32
Index: head/share/mk/bsd.cpu.mk
===================================================================
--- head/share/mk/bsd.cpu.mk
+++ head/share/mk/bsd.cpu.mk
@@ -412,3 +412,17 @@
# These come from make.conf or the command line or the environment.
CFLAGS += ${CFLAGS.${MACHINE_ARCH}}
CXXFLAGS += ${CXXFLAGS.${MACHINE_ARCH}}
+
+
+# Defines a variable for Binutils linker, to be used to workaround some
+# issue with LLVM LLD (i.e. support for PowerPC32 bit on PowerPC64)
+#
+# This is an unavoidable cross coupling with Makefile.inc1 and
+# normal builds works when CROSS_BINUTILS_PREFIX and could be removed
+# when LLD PowerPC 32 bit support is completed
+.if defined(CROSS_BINUTILS_PREFIX)
+LD_BFD=${LOCALBASE}/bin/${CROSS_BINUTILS_PREFIX}-ld.bfd
+.else
+LD_BFD=${OBJTOP}/tmp/usr/bin/ld.bfd
+.endif
+
Index: head/stand/defs.mk
===================================================================
--- head/stand/defs.mk
+++ head/stand/defs.mk
@@ -99,6 +99,10 @@
# or powerpc64.
.if ${MACHINE_ARCH} == "powerpc64"
CFLAGS+= -m32 -mcpu=powerpc
+# Use ld.bfd to workaround ld.lld issues on PowerPC 32 bit
+.if "${COMPILER_TYPE}" == "clang" && "${LINKER_TYPE}" == "lld"
+CFLAGS+= -fuse-ld=${LD_BFD}
+.endif
.endif
# For amd64, there's a bit of mixed bag. Some of the tree (i386, lib*32) is
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Thu, Dec 19, 1:41 AM (22 h, 7 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
15497316
Default Alt Text
D20261.diff (1 KB)
Attached To
Mode
D20261: [PowerPC64] Use ld.bfd to build LIB32 and STAND - when using llvm
Attached
Detach File
Event Timeline
Log In to Comment