Blob Blame History Raw
From: Jiri Slaby <jslaby@suse.cz>
Date: Wed, 3 Mar 2021 11:36:40 +0100
Subject: kbuild: dummy-tools, fix inverted tests for gcc
Patch-mainline: v5.12-rc3
Git-commit: b3d9fc1436808a4ef9927e558b3415e728e710c5
References: bcs#1181862

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