Thread (60 messages) 60 messages, 6 authors, 2020-01-21

Re: [PATCH v3 14/16] kconfig: Add support for 'as-option'

From: Masahiro Yamada <masahiroy@kernel.org>
Date: 2020-01-17 17:52:42
Also in: linux-kbuild

On Fri, Jan 17, 2020 at 8:33 PM Catalin Marinas [off-list ref] wrote:
On Mon, Dec 16, 2019 at 02:17:16PM +0530, Amit Daniel Kachhap wrote:
quoted
diff --git a/scripts/Kconfig.include b/scripts/Kconfig.include
index d4adfbe..cc465dd 100644
--- a/scripts/Kconfig.include
+++ b/scripts/Kconfig.include
@@ -31,6 +31,10 @@ cc-option = $(success,$(CC) -Werror $(CLANG_FLAGS) $(1) -E -x c /dev/null -o /de
 # Return y if the linker supports <flag>, n otherwise
 ld-option = $(success,$(LD) -v $(1))

+# $(as-option,<flag>)
+# Return y if the assembler supports <flag>, n otherwise
+as-option = $(success, $(CC) $(CLANG_FLAGS) $(1) -E -x assembler /dev/null -o /dev/null)
I had different experiments with this for MTE and noticed that clang
does not honour the -Wa, option (which you use in a subsequent patch).
So not sure how useful as-option is.

I think this is because it uses '-E' option.

To invoke the assembler, -c is needed.


I replaced -E with -c, and tested it.
It seems working for both gcc and clang.



I noticed a similar case for cc-option:
https://patchwork.kernel.org/patch/11339567/


-- 
Best Regards
Masahiro Yamada

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help