Arthur Heymans has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/80730?usp=email )
Change subject: util/xcompile: Use a more complete clang target ......................................................................
util/xcompile: Use a more complete clang target
When the compilers 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 --- M util/xcompile/xcompile 1 file changed, 2 insertions(+), 2 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/30/80730/1
diff --git a/util/xcompile/xcompile b/util/xcompile/xcompile index 1eecc7e..989b4b7 100755 --- a/util/xcompile/xcompile +++ b/util/xcompile/xcompile @@ -462,7 +462,7 @@
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
@@ -471,7 +471,7 @@ # but that's more of a clang limitation. Let's be optimistic # that this will change in the future. CLANG="${clang_prefix}clang" - CFLAGS_CLANG="-target ${clang_arch}-${TABI} $CFLAGS_CLANG" + CFLAGS_CLANG="-target ${clang_arch}-none-unknown-${TABI} $CFLAGS_CLANG" fi }