Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F159367189
D20261.id57505.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.id57505.diff
View Options
Index: Makefile.libcompat.inc1
===================================================================
--- Makefile.libcompat.inc1
+++ Makefile.libcompat.inc1
@@ -1,18 +1,29 @@
+#
# $FreeBSD$
+#
# Currently LLD support for PowerPC 32-bit is not complete,
# so falling back to ld.bfd
.if ${TARGET_ARCH} == "powerpc64" && ${LINKER_TYPE} == "lld"
-.if defined(CROSS_TOOLCHAIN)
-.if !defined(CROSS_BINUTILS_PREFIX)
-.error 32 bit binaries on PowerPC64 requires binutils linker ld.bfd. Please set CROSS_BINUTILS_PREFIX.
-.else
+
+# cross build with toolchain file and NOT defined binutils prefix
+.if ("${HOST_ARCH}" != "${TARGET_ARCH}") && defined(CROSS_TOOLCHAIN) && !defined(CROSS_BINUTILS_PREFIX)
+.info 32 bit binaries on PowerPC64 requires binutils linker ld.bfd. Please set CROSS_BINUTILS_PREFIX.
+
+# cross build with toolchain file and defined binutils prefix
+.elif ("${HOST_ARCH}" != "${TARGET_ARCH}") && defined(CROSS_TOOLCHAIN) && defined(CROSS_BINUTILS_PREFIX)
LIB32LD?=${LOCALBASE}/bin/${CROSS_BINUTILS_PREFIX}-ld.bfd
-.endif # if !defined(CROSS_BINUTILS_PREFIX)
+
+# cross build without using toolchain file (using builtin cross toolchain)
+.elif ("${HOST_ARCH}" != "${TARGET_ARCH}")
+LIB32LD?=${WORLDTMP}/usr/bin/ld.bfd
+
.else # Native build
LIB32LD?=ld.bfd
.endif
+
.info LIB32: using ${LIB32LD} as linker for LIB32
.endif
+# for other platforms (or when LIB32LD is not set), just use the main linker
LIB32LD?=${XLD}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, Jun 14, 8:50 AM (1 m, 23 s ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
33946847
Default Alt Text
D20261.id57505.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