* [PATCH] kbuild: Add ability to test Clang's integrated assembler
@ 2019-06-27 19:14 Nathan Chancellor
2019-06-27 21:30 ` Nick Desaulniers
2019-07-03 23:45 ` Masahiro Yamada
0 siblings, 2 replies; 3+ messages in thread
From: Nathan Chancellor @ 2019-06-27 19:14 UTC (permalink / raw)
To: Masahiro Yamada, Michal Marek
Cc: linux-kbuild, linux-kernel, clang-built-linux, Nathan Chancellor,
Dmitry Golovin
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.
Link: https://github.com/ClangBuiltLinux/linux/issues/577
Suggested-by: Dmitry Golovin <dima@golovin.in>
Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
---
Makefile | 2 ++
1 file changed, 2 insertions(+)
diff --git a/Makefile b/Makefile
index 5102b2bbd224..d77481129339 100644
--- a/Makefile
+++ b/Makefile
@@ -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)
--
2.22.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] kbuild: Add ability to test Clang's integrated assembler
2019-06-27 19:14 [PATCH] kbuild: Add ability to test Clang's integrated assembler Nathan Chancellor
@ 2019-06-27 21:30 ` Nick Desaulniers
2019-07-03 23:45 ` Masahiro Yamada
1 sibling, 0 replies; 3+ messages in thread
From: Nick Desaulniers @ 2019-06-27 21:30 UTC (permalink / raw)
To: Nathan Chancellor
Cc: Masahiro Yamada, Michal Marek, Linux Kbuild mailing list, LKML,
clang-built-linux, Dmitry Golovin
On Thu, Jun 27, 2019 at 12:15 PM Nathan Chancellor
<natechancellor@gmail.com> wrote:
>
> 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.
>
> Link: https://github.com/ClangBuiltLinux/linux/issues/577
> Suggested-by: Dmitry Golovin <dima@golovin.in>
> Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
> ---
> Makefile | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/Makefile b/Makefile
> index 5102b2bbd224..d77481129339 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -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.
Reviewed-by: Nick Desaulniers <ndesaulniers@google.com>
Tested-by: Nick Desaulniers <ndesaulniers@google.com>
--
Thanks,
~Nick Desaulniers
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] kbuild: Add ability to test Clang's integrated assembler
2019-06-27 19:14 [PATCH] kbuild: Add ability to test Clang's integrated assembler Nathan Chancellor
2019-06-27 21:30 ` Nick Desaulniers
@ 2019-07-03 23:45 ` Masahiro Yamada
1 sibling, 0 replies; 3+ messages in thread
From: Masahiro Yamada @ 2019-07-03 23:45 UTC (permalink / raw)
To: Nathan Chancellor
Cc: Michal Marek, Linux Kbuild mailing list,
Linux Kernel Mailing List, clang-built-linux, Dmitry Golovin
On Fri, Jun 28, 2019 at 4:15 AM Nathan Chancellor
<natechancellor@gmail.com> wrote:
>
> 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.
>
> Link: https://github.com/ClangBuiltLinux/linux/issues/577
> Suggested-by: Dmitry Golovin <dima@golovin.in>
> Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
Applied to linux-kbuild. Thanks.
> ---
> Makefile | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/Makefile b/Makefile
> index 5102b2bbd224..d77481129339 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -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)
> --
> 2.22.0
>
--
Best Regards
Masahiro Yamada
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2019-07-03 23:46 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-06-27 19:14 [PATCH] kbuild: Add ability to test Clang's integrated assembler Nathan Chancellor
2019-06-27 21:30 ` Nick Desaulniers
2019-07-03 23:45 ` Masahiro Yamada
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).