From e07bcf718cb7ef5846f6ec78fc79d384e3e392b3 Mon Sep 17 00:00:00 2001 From: Greg Hackmann Date: Mon, 10 Apr 2017 11:23:25 -0700 Subject: [PATCH] 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: I89fda12d826783ffe18142ba048ff10bd769e240 Signed-off-by: Greg Hackmann Signed-off-by: Matthias Kaehlcke --- arch/arm64/Makefile | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/arch/arm64/Makefile b/arch/arm64/Makefile index ab2298155a22..f736cda53f6f 100644 --- a/arch/arm64/Makefile +++ b/arch/arm64/Makefile @@ -37,7 +37,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-asynchronous-unwind-tables KBUILD_CFLAGS += $(call cc-option, -mpc-relative-literal-loads) KBUILD_CFLAGS += -fno-pic