Skip to content

Commit 5cf2d0c

Browse files
greghackmannpundiramit
authored andcommitted
ANDROID: HACK: arm64: use -mno-implicit-float instead of -mgeneral-regs-only
LLVM bug 30792 causes clang's AArch64 backend to crash compiling arch/arm64/crypto/aes-ce-cipher.c. Replacing -mgeneral-regs-only with -mno-implicit-float is the suggested workaround. Drop this patch once the clang bug has been fixed. Change-Id: I7c7bb9315a281970698120a6d2a9fcd126aad65e Signed-off-by: Greg Hackmann <ghackmann@google.com> Signed-off-by: Matthias Kaehlcke <mka@chromium.org>
1 parent d97498d commit 5cf2d0c

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

arch/arm64/Makefile

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,14 @@ $(warning LSE atomics not supported by binutils)
3030
endif
3131
endif
3232

33-
KBUILD_CFLAGS += -mgeneral-regs-only $(lseinstr)
33+
ifeq ($(cc-name),clang)
34+
# This is a workaround for https://bugs.llvm.org/show_bug.cgi?id=30792.
35+
# TODO: revert when this is fixed in LLVM.
36+
KBUILD_CFLAGS += -mno-implicit-float
37+
else
38+
KBUILD_CFLAGS += -mgeneral-regs-only
39+
endif
40+
KBUILD_CFLAGS += $(lseinstr)
3441
KBUILD_CFLAGS += -fno-pic
3542
KBUILD_CFLAGS += $(call cc-option, -mpc-relative-literal-loads)
3643
KBUILD_CFLAGS += -fno-asynchronous-unwind-tables

0 commit comments

Comments
 (0)