From: Sami Tolvanen <samitolvanen@google.com>
To: Alex Matveev <alxmtvv@gmail.com>, Andi Kleen <ak@linux.intel.com>,
Ard Biesheuvel <ard.biesheuvel@linaro.org>,
Greg Hackmann <ghackmann@google.com>,
Kees Cook <keescook@chromium.org>,
linux-arm-kernel@lists.infradead.org,
linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org,
Mark Rutland <mark.rutland@arm.com>,
Masahiro Yamada <yamada.masahiro@socionext.com>,
Maxim Kuvyrkov <maxim.kuvyrkov@linaro.org>,
Michal Marek <michal.lkml@markovi.net>,
Nick Desaulniers <ndesaulniers@google.com>,
Yury Norov <ynorov@caviumnetworks.com>,
Matthias Kaehlcke <mka@chromium.org>
Cc: Sami Tolvanen <samitolvanen@google.com>
Subject: [PATCH 3/3] arm64: use -mno-implicit-float instead of -mgeneral-regs-only
Date: Tue, 28 Nov 2017 16:00:11 -0800 [thread overview]
Message-ID: <20171129000011.55235-4-samitolvanen@google.com> (raw)
In-Reply-To: <20171129000011.55235-1-samitolvanen@google.com>
From: Greg Hackmann <ghackmann@google.com>
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.
Signed-off-by: Greg Hackmann <ghackmann@google.com>
Cc: Matthias Kaehlcke <mka@chromium.org>
[added clang-ifversion to enable the workaround only for clang <6.0]
Signed-off-by: Sami Tolvanen <samitolvanen@google.com>
---
arch/arm64/Makefile | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/arch/arm64/Makefile b/arch/arm64/Makefile
index b35788c909f1..d2efb5a0212f 100644
--- a/arch/arm64/Makefile
+++ b/arch/arm64/Makefile
@@ -49,7 +49,10 @@ $(warning Detected assembler with broken .inst; disassembly will be unreliable)
endif
endif
-KBUILD_CFLAGS += -mgeneral-regs-only $(lseinstr) $(brokengasinst)
+# This is a workaround for https://bugs.llvm.org/show_bug.cgi?id=30792.
+KBUILD_CFLAGS += $(call clang-ifversion, -lt, 0600, -mno-implicit-float, -mgeneral-regs-only)
+
+KBUILD_CFLAGS += $(lseinstr) $(brokengasinst)
KBUILD_CFLAGS += -fno-asynchronous-unwind-tables
KBUILD_CFLAGS += $(call cc-option, -mpc-relative-literal-loads)
KBUILD_AFLAGS += $(lseinstr) $(brokengasinst)
--
2.15.0.417.g466bffb3ac-goog
next prev parent reply other threads:[~2017-11-29 0:00 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-11-29 0:00 [PATCH 0/3] Add version macros for clang and fix arm64 for clang <6.0 Sami Tolvanen
2017-11-29 0:00 ` [PATCH 1/3] kbuild: add clang-version.sh Sami Tolvanen
2017-11-29 17:39 ` Nick Desaulniers
2017-11-30 12:09 ` Masahiro Yamada
2017-11-29 0:00 ` [PATCH 2/3] kbuild: add cc-if-name-version and compiler-specific variants Sami Tolvanen
2017-11-29 17:19 ` Nick Desaulniers
2017-11-30 12:21 ` Masahiro Yamada
2017-11-30 17:34 ` Sami Tolvanen
2017-11-29 0:00 ` Sami Tolvanen [this message]
2017-11-29 12:15 ` [PATCH 3/3] arm64: use -mno-implicit-float instead of -mgeneral-regs-only Ard Biesheuvel
2017-11-29 16:22 ` Sami Tolvanen
2017-11-29 17:26 ` Nick Desaulniers
2017-11-30 23:38 ` [PATCH v2 0/2] Add version macros for clang Sami Tolvanen
2017-11-30 23:38 ` [PATCH v2 1/2] kbuild: add clang-version.sh Sami Tolvanen
2017-11-30 23:38 ` [PATCH v2 2/2] kbuild: add __cc-ifversion and compiler-specific variants Sami Tolvanen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20171129000011.55235-4-samitolvanen@google.com \
--to=samitolvanen@google.com \
--cc=ak@linux.intel.com \
--cc=alxmtvv@gmail.com \
--cc=ard.biesheuvel@linaro.org \
--cc=ghackmann@google.com \
--cc=keescook@chromium.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kbuild@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=maxim.kuvyrkov@linaro.org \
--cc=michal.lkml@markovi.net \
--cc=mka@chromium.org \
--cc=ndesaulniers@google.com \
--cc=yamada.masahiro@socionext.com \
--cc=ynorov@caviumnetworks.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox