summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorMasahiro Yamada <masahiroy@kernel.org>2021-08-05 18:01:02 +0300
committerMasahiro Yamada <masahiroy@kernel.org>2021-08-10 03:13:25 +0300
commit52cc02b910284d6bddba46cce402044ab775f314 (patch)
tree2f2c4f7433d7f43200a976781bd1ae5c4438be50 /Makefile
parente08831baa032e62786d88b68e26c54389e2486b6 (diff)
downloadlinux-52cc02b910284d6bddba46cce402044ab775f314.tar.xz
kbuild: check CONFIG_AS_IS_LLVM instead of LLVM_IAS
LLVM_IAS is the user interface to set the -(no-)integrated-as flag, and it should be used only for that purpose. LLVM_IAS is checked in some places to determine the assembler type, but it is not precise. For example, $ make CC=gcc LLVM_IAS=1 ... will use the GNU assembler (i.e. binutils) since LLVM_IAS=1 is effective only when $(CC) is clang. Of course, 'CC=gcc LLVM_IAS=1' is an odd combination, but the build system can be more robust against such insane input. Commit ba64beb17493a ("kbuild: check the minimum assembler version in Kconfig") introduced CONFIG_AS_IS_GNU/LLVM, which is more precise because Kconfig checks the version string from the assembler in use. Signed-off-by: Masahiro Yamada <masahiroy@kernel.org> Reviewed-by: Nick Desaulniers <ndesaulniers@google.com> Reviewed-by: Nathan Chancellor <nathan@kernel.org>
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile2
1 files changed, 1 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index f5419ce69ce8..891866af0787 100644
--- a/Makefile
+++ b/Makefile
@@ -843,7 +843,7 @@ else
DEBUG_CFLAGS += -g
endif
-ifneq ($(LLVM_IAS),1)
+ifndef CONFIG_AS_IS_LLVM
KBUILD_AFLAGS += -Wa,-gdwarf-2
endif