* [PATCH] kbuild: dummy-tools, fix inverted tests for gcc
@ 2021-03-03 10:43 Jiri Slaby
2021-03-06 10:40 ` Masahiro Yamada
0 siblings, 1 reply; 2+ messages in thread
From: Jiri Slaby @ 2021-03-03 10:43 UTC (permalink / raw)
To: masahiroy; +Cc: linux-kernel, Jiri Slaby
There is a test in Kconfig which takes inverted value of a compiler
check:
* config CC_HAS_INT128
def_bool !$(cc-option,$(m64-flag) -D__SIZEOF_INT128__=0)
This results in CC_HAS_INT128 not being in super-config generated by
dummy-tools. So take this into account in the gcc script.
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Cc: Masahiro Yamada <masahiroy@kernel.org>
---
scripts/dummy-tools/gcc | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/scripts/dummy-tools/gcc b/scripts/dummy-tools/gcc
index 5c113cad5601..0d0589cf8184 100755
--- a/scripts/dummy-tools/gcc
+++ b/scripts/dummy-tools/gcc
@@ -85,3 +85,8 @@ if arg_contain -print-file-name=plugin "$@"; then
echo $plugin_dir
exit 0
fi
+
+# inverted return value
+if arg_contain -D__SIZEOF_INT128__=0 "$@"; then
+ exit 1
+fi
--
2.30.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] kbuild: dummy-tools, fix inverted tests for gcc
2021-03-03 10:43 [PATCH] kbuild: dummy-tools, fix inverted tests for gcc Jiri Slaby
@ 2021-03-06 10:40 ` Masahiro Yamada
0 siblings, 0 replies; 2+ messages in thread
From: Masahiro Yamada @ 2021-03-06 10:40 UTC (permalink / raw)
To: Jiri Slaby; +Cc: Linux Kernel Mailing List
On Wed, Mar 3, 2021 at 7:43 PM Jiri Slaby <jslaby@suse.cz> wrote:
>
> There is a test in Kconfig which takes inverted value of a compiler
> check:
> * config CC_HAS_INT128
> def_bool !$(cc-option,$(m64-flag) -D__SIZEOF_INT128__=0)
>
> This results in CC_HAS_INT128 not being in super-config generated by
> dummy-tools. So take this into account in the gcc script.
>
> Signed-off-by: Jiri Slaby <jslaby@suse.cz>
> Cc: Masahiro Yamada <masahiroy@kernel.org>
> ---
Applied to linux-kbuild/fixes.
Thanks.
We could fix init/Kconfig to use the positive logic as follows,
but I guess (hope) this conditional will go away
when we raise the GCC min version next time.
So, I am fine with fixing this in dummy-tools.
diff --git a/init/Kconfig b/init/Kconfig
index 22946fe5ded9..502594a78282 100644
--- a/init/Kconfig
+++ b/init/Kconfig
@@ -849,7 +849,7 @@ config ARCH_WANT_BATCHED_UNMAP_TLB_FLUSH
bool
config CC_HAS_INT128
- def_bool !$(cc-option,$(m64-flag) -D__SIZEOF_INT128__=0) && 64BIT
+ def_bool $(success,echo '__int128 x;' | $(CC) $(CLANG_FLAGS)
-x c - -c -o /dev/null) && 64BIT
#
# For architectures that know their GCC __int128 support is sound
--
Best Regards
Masahiro Yamada
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-03-06 10:41 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-03 10:43 [PATCH] kbuild: dummy-tools, fix inverted tests for gcc Jiri Slaby
2021-03-06 10:40 ` 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).