summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGreg Hackmann <ghackmann@google.com>2017-04-10 11:23:25 -0700
committerGreg Hackmann <ghackmann@google.com>2017-10-16 15:00:12 -0700
commit20ea95166e628343b388139f1b521c50f5fd0b44 (patch)
treed8a09a88205e5aaf9de30c655cfa0dab88fe1d05
parentf0907aa15ed9f9c7541bb244ed3f52c376ced19c (diff)
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>
-rw-r--r--arch/arm64/Makefile9
1 files changed, 8 insertions, 1 deletions
diff --git a/arch/arm64/Makefile b/arch/arm64/Makefile
index 98c69f13cb09..c3bc092fc128 100644
--- a/arch/arm64/Makefile
+++ b/arch/arm64/Makefile
@@ -30,7 +30,14 @@ $(warning LSE atomics not supported by binutils)
endif
endif
-KBUILD_CFLAGS += -mgeneral-regs-only $(lseinstr)
+ifeq ($(cc-name),clang)
+# This is a workaround for https://bugs.llvm.org/show_bug.cgi?id=30792.
+# TODO: revert when this is fixed in LLVM.
+KBUILD_CFLAGS += -mno-implicit-float
+else
+KBUILD_CFLAGS += -mgeneral-regs-only
+endif
+KBUILD_CFLAGS += $(lseinstr)
KBUILD_CFLAGS += -fno-pic
KBUILD_CFLAGS += -fno-asynchronous-unwind-tables
KBUILD_CFLAGS += $(call cc-option, -mpc-relative-literal-loads)