Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F103266984
D36981.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
D36981.diff
View Options
diff --git a/lib/clang/llvm.build.mk b/lib/clang/llvm.build.mk
--- a/lib/clang/llvm.build.mk
+++ b/lib/clang/llvm.build.mk
@@ -30,21 +30,26 @@
CFLAGS+= -DNDEBUG
.endif
+# Note that using TARGET_ARCH here is essential for a functional native-xtools
+# build! For native-xtools, we're building binaries that will work on the
+# *host* machine (MACHINE_ARCH), but they should default to producing binaries
+# for the *target* machine (TARGET_ARCH).
+TARGET_ARCH?= ${MACHINE_ARCH}
BUILD_ARCH?= ${MACHINE_ARCH}
# Armv6 and armv7 uses hard float abi, unless the CPUTYPE has soft in it.
# arm (for armv4 and armv5 CPUs) always uses the soft float ABI.
# For all other targets, we stick with 'unknown'.
-.if ${MACHINE_ARCH:Marmv[67]*} && (!defined(CPUTYPE) || ${CPUTYPE:M*soft*} == "")
+.if ${TARGET_ARCH:Marmv[67]*} && (!defined(CPUTYPE) || ${CPUTYPE:M*soft*} == "")
TARGET_TRIPLE_ABI= -gnueabihf
-.elif ${MACHINE_ARCH:Marm*}
+.elif ${TARGET_ARCH:Marm*}
TARGET_TRIPLE_ABI= -gnueabi
.else
TARGET_TRIPLE_ABI=
.endif
VENDOR= unknown
-LLVM_TARGET_TRIPLE?= ${MACHINE_ARCH:C/amd64/x86_64/:C/[hs]f$//:S/mipsn32/mips64/}-${VENDOR}-freebsd${OS_REVISION}${TARGET_TRIPLE_ABI}
+LLVM_TARGET_TRIPLE?= ${TARGET_ARCH:C/amd64/x86_64/:C/[hs]f$//:S/mipsn32/mips64/}-${VENDOR}-freebsd${OS_REVISION}${TARGET_TRIPLE_ABI}
LLVM_BUILD_TRIPLE?= ${BUILD_ARCH:C/amd64/x86_64/:C/[hs]f$//:S/mipsn32/mips64/}-${VENDOR}-freebsd${OS_REVISION}
CFLAGS+= -DLLVM_DEFAULT_TARGET_TRIPLE=\"${LLVM_TARGET_TRIPLE}\"
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Nov 23, 8:33 PM (15 h, 57 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
14794123
Default Alt Text
D36981.diff (1 KB)
Attached To
Mode
D36981: Revert "Avoid using TARGET_ARCH in llvm.build.mk"
Attached
Detach File
Event Timeline
Log In to Comment