summaryrefslogtreecommitdiff
path: root/util
diff options
context:
space:
mode:
authorArthur Heymans <arthur@aheymans.xyz>2024-02-23 16:44:37 +0100
committerFelix Singer <service+coreboot-gerrit@felixsinger.de>2024-03-30 10:13:53 +0000
commit97ed403650c3fdbf47c14ca71d4c0b0d55a25a44 (patch)
tree5d75f42724adb1bac5080fb9b6cf9a3a3e3479b0 /util
parente9e31eb4b9c122f40fc053bc84c7d2232687d344 (diff)
util/xcompile: Use a more complete clang target
When the compiler is used as a linker frontend clang tries to match the target string with what it supports internally. If it's not sufficiently complete it will forward linking to GCC which is not desirable. This is necessary when doing LTO with clang. Change-Id: Ie9356a2bc0f5b77e934cc16482d6ccb1961195dc Signed-off-by: Arthur Heymans <arthur@aheymans.xyz> Reviewed-on: https://review.coreboot.org/c/coreboot/+/80730 Reviewed-by: Felix Singer <service+coreboot-gerrit@felixsinger.de> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'util')
-rwxr-xr-xutil/xcompile/xcompile4
1 files changed, 2 insertions, 2 deletions
diff --git a/util/xcompile/xcompile b/util/xcompile/xcompile
index 68b3705d77..ad4361db53 100755
--- a/util/xcompile/xcompile
+++ b/util/xcompile/xcompile
@@ -466,7 +466,7 @@ test_architecture() {
for clang_arch in $TCLIST invalid; do
for clang_prefix in $search $XGCCPATH "$GENERIC_COMPILER_PREFIX"; do
- testcc "${clang_prefix}clang" "-target ${clang_arch}-$TABI -c" && break 2
+ testcc "${clang_prefix}clang" "-target ${clang_arch}-none-unknown-${TABI} -c" && break 2
done
done
@@ -475,7 +475,7 @@ test_architecture() {
# but that's more of a clang limitation. Let's be optimistic
# that this will change in the future.
CLANG="${clang_prefix}clang"
- CLANG_TARGET="-target ${clang_arch}-${TABI}"
+ CLANG_TARGET="-target ${clang_arch}-none-unknown-${TABI}"
CFLAGS_CLANG="$CLANG_TARGET $CFLAGS_CLANG"
CPPFLAGS_CLANG="$CLANG_TARGET $CPPFLAGS_CLANG"
fi