kbuild: Add ability to test Clang's integrated assembler
PATCH 1/1 kbuild: Add ability to test Clang's integrated assembler
There are some people interested in experimenting with Clang's integrated assembler. To make it easy to do so without source modification, allow the user to specify 'AS=clang' as part of the make command to avoid adding '-no-integrated-as' to the {A,C}FLAGS.
--- Makefile | 2 ++ 1 file changed, 2 insertions(+)
Makefile +2 -0
@@ -527,7 +527,9 @@ endif ifneq ($(GCC_TOOLCHAIN),) CLANG_FLAGS += --gcc-toolchain=$(GCC_TOOLCHAIN) endif +ifeq ($(shell $(AS) --version 2>&1 | head -n 1 | grep clang),) CLANG_FLAGS += -no-integrated-as +endif CLANG_FLAGS += -Werror=unknown-warning-option KBUILD_CFLAGS += $(CLANG_FLAGS) KBUILD_AFLAGS += $(CLANG_FLAGS)
Signature · 1 line
2.22.0
Quoted 18 lines · Nathan Chancellor
There are some people interested in experimenting with Clang's integrated assembler. To make it easy to do so without source modification, allow the user to specify 'AS=clang' as part of the make command to avoid adding '-no-integrated-as' to the {A,C}FLAGS.
Suggested-by Dmitry Golovin <[email protected]>Signed-off-by Nathan Chancellor <[email protected]>--- Makefile | 2 ++ 1 file changed, 2 insertions(+)Makefile +0
-0
Makefile endif · line 532
Quoted 6 lines
Makefile +2
-0@@ -527,7 +527,9 @@ endif ifneq ($(GCC_TOOLCHAIN),) CLANG_FLAGS += --gcc-toolchain=$(GCC_TOOLCHAIN) endif +ifeq ($(shell $(AS) --version 2>&1 | head -n 1 | grep clang),) CLANG_FLAGS += -no-integrated-as +endif
This is a nice suggestion and solution. Thanks Dima and Nathan.
Signature · 2 lines
Thanks, ~Nick Desaulniers
Quoted 9 lines · Nathan Chancellor
There are some people interested in experimenting with Clang's integrated assembler. To make it easy to do so without source modification, allow the user to specify 'AS=clang' as part of the make command to avoid adding '-no-integrated-as' to the {A,C}FLAGS.
Suggested-by Dmitry Golovin <[email protected]>Signed-off-by Nathan Chancellor <[email protected]>
Applied to linux-kbuild. Thanks.
Quoted 19 lines
--- Makefile | 2 ++ 1 file changed, 2 insertions(+)Makefile +2
-1@@ -527,7 +527,9 @@ endif ifneq ($(GCC_TOOLCHAIN),) CLANG_FLAGS += --gcc-toolchain=$(GCC_TOOLCHAIN) endif +ifeq ($(shell $(AS) --version 2>&1 | head -n 1 | grep clang),) CLANG_FLAGS += -no-integrated-as +endif CLANG_FLAGS += -Werror=unknown-warning-option KBUILD_CFLAGS += $(CLANG_FLAGS) KBUILD_AFLAGS += $(CLANG_FLAGS) --
Quoted 2 lines
2.22.0
--
Best Regards
Masahiro Yamada