Skip to content

Commit 52cc02b

Browse files
committed
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 ba64beb ("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 <[email protected]> Reviewed-by: Nick Desaulniers <[email protected]> Reviewed-by: Nathan Chancellor <[email protected]>
1 parent e08831b commit 52cc02b

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -843,7 +843,7 @@ else
843843
DEBUG_CFLAGS += -g
844844
endif
845845

846-
ifneq ($(LLVM_IAS),1)
846+
ifndef CONFIG_AS_IS_LLVM
847847
KBUILD_AFLAGS += -Wa,-gdwarf-2
848848
endif
849849

arch/riscv/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ endif
4141
ifeq ($(CONFIG_LD_IS_LLD),y)
4242
KBUILD_CFLAGS += -mno-relax
4343
KBUILD_AFLAGS += -mno-relax
44-
ifneq ($(LLVM_IAS),1)
44+
ifndef CONFIG_AS_IS_LLVM
4545
KBUILD_CFLAGS += -Wa,-mno-relax
4646
KBUILD_AFLAGS += -Wa,-mno-relax
4747
endif

0 commit comments

Comments
 (0)