summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMasahiro Yamada <masahiroy@kernel.org>2020-04-08 10:36:22 +0900
committerBruno Martins <bgcngm@gmail.com>2022-10-28 15:57:24 +0100
commit6634f9f63efe0d1e4e4c4942bf3061ffb0aff65b (patch)
treed913f88bd22cd10f5e3c3e1066d780deb85aaadd
parentb891e8fdc46636722509c1b9341d4ca09232578f (diff)
BACKPORT: kbuild: replace AS=clang with LLVM_IAS=1
commit 7e20e47c70f810d678d02941fa3c671209c4ca97 upstream. The 'AS' variable is unused for building the kernel. Only the remaining usage is to turn on the integrated assembler. A boolean flag is a better fit for this purpose. AS=clang was added for experts. So, I replaced it with LLVM_IAS=1, breaking the backward compatibility. Suggested-by: Nick Desaulniers <ndesaulniers@google.com> Signed-off-by: Masahiro Yamada <masahiroy@kernel.org> Reviewed-by: Nathan Chancellor <natechancellor@gmail.com> Reviewed-by: Nick Desaulniers <ndesaulniers@google.com> Signed-off-by: Nick Desaulniers <ndesaulniers@google.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> (cherry-picked from commit 7e20e47c70f810d678d02941fa3c671209c4ca97) Change-Id: I1dcf901b2543ee6a95cfffddd2ced50b0a1ae14c
-rw-r--r--Documentation/kbuild/llvm.txt5
-rw-r--r--Makefile2
2 files changed, 6 insertions, 1 deletions
diff --git a/Documentation/kbuild/llvm.txt b/Documentation/kbuild/llvm.txt
index d469accd5fa3..51c009baa35a 100644
--- a/Documentation/kbuild/llvm.txt
+++ b/Documentation/kbuild/llvm.txt
@@ -50,11 +50,14 @@ LLVM Utilities
LLVM has substitutes for GNU binutils utilities. These can be invoked as
additional parameters to [make]{.title-ref}.
-> make CC=clang AS=clang LD=ld.lld AR=llvm-ar NM=llvm-nm STRIP=llvm-strip \\
+> make CC=clang LD=ld.lld AR=llvm-ar NM=llvm-nm STRIP=llvm-strip \\
> OBJCOPY=llvm-objcopy OBJDUMP=llvm-objdump OBJSIZE=llvm-size \\
> READELF=llvm-readelf HOSTCC=clang HOSTCXX=clang++ HOSTAR=llvm-ar \\
> HOSTLD=ld.lld
+Currently, the integrated assembler is disabled by default. You can pass
+`LLVM_IAS=1` to enable it.
+
Getting Help
------------
diff --git a/Makefile b/Makefile
index 25d45832d9e6..79490928b72f 100644
--- a/Makefile
+++ b/Makefile
@@ -622,7 +622,9 @@ endif
ifneq ($(GCC_TOOLCHAIN),)
CLANG_FLAGS += --gcc-toolchain=$(GCC_TOOLCHAIN)
endif
+ifneq ($(LLVM_IAS),1)
CLANG_FLAGS += -no-integrated-as
+endif
CLANG_FLAGS += -Werror=unknown-warning-option
CLANG_FLAGS += $(call cc-option, -Wno-misleading-indentation)
CLANG_FLAGS += $(call cc-option, -Wno-bool-operation)