summaryrefslogtreecommitdiff
path: root/util
diff options
context:
space:
mode:
authorArthur Heymans <arthur@aheymans.xyz>2024-04-03 15:05:39 +0200
committerArthur Heymans <arthur@aheymans.xyz>2024-10-02 09:19:15 +0000
commit00783211c06419ec984f8b47115267e5af9104e9 (patch)
tree6e7d4754303c2a9dd83595e37930522ea523be94 /util
parent8eb59d8122d2e0b27760e98133731ede159f229f (diff)
arch/arm64: Use -mno-implicit-float with clang
This fixes building inline assembly that uses SIMD registers. This is for instance the case in the vboot library. Change-Id: I24fa9d9f81430ea3ecd40de4304a10c6e235fece Signed-off-by: Arthur Heymans <arthur@aheymans.xyz> Reviewed-on: https://review.coreboot.org/c/coreboot/+/81658 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Julius Werner <jwerner@chromium.org>
Diffstat (limited to 'util')
-rwxr-xr-xutil/xcompile/xcompile5
1 files changed, 5 insertions, 0 deletions
diff --git a/util/xcompile/xcompile b/util/xcompile/xcompile
index 13ed48be52..3fb0cb7591 100755
--- a/util/xcompile/xcompile
+++ b/util/xcompile/xcompile
@@ -256,6 +256,11 @@ detect_special_flags() {
testld "$GCC" "$FLAGS_GCC" "${GCCPREFIX}ld${LINKER_SUFFIX}" \
"$LDFLAGS --fix-cortex-a53-843419" && \
LDFLAGS_ARM64_A53_ERRATUM_843419+=" --fix-cortex-a53-843419"
+ # https://bugs.llvm.org/show_bug.cgi?id=30792
+ # LLVM/clang runs into problems when encountering SIMD registers in assembly
+ # with -mgeneral-regs-only. -mno-implicit-float achieves the same though.
+ CFLAGS_GCC="$CFLAGS_GCC -mgeneral-regs-only" &&
+ CFLAGS_CLANG="$CFLAGS_CLANG -mno-implicit-float"
;;
riscv)
testcc "$GCC" "$FLAGS_GCC -march=rv64iadc_zicsr_zifencei" &&