From: Masahiro Yamada <masahiroy@kernel.org>
To: linux-kbuild@vger.kernel.org
Cc: Ard Biesheuvel <ardb@kernel.org>, George Spelvin <lkml@sdf.org>,
Masahiro Yamada <masahiroy@kernel.org>,
Dan Williams <dan.j.williams@intel.com>,
David Howells <dhowells@redhat.com>,
"Eric W. Biederman" <ebiederm@xmission.com>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Herbert Xu <herbert@gondor.apana.org.au>,
"Joel Fernandes (Google)" <joel@joelfernandes.org>,
Krzysztof Kozlowski <krzk@kernel.org>,
Masami Hiramatsu <mhiramat@kernel.org>,
Mauro Carvalho Chehab <mchehab+samsung@kernel.org>,
Patrick Bellasi <patrick.bellasi@arm.com>,
"Steven Rostedt (VMware)" <rostedt@goodmis.org>,
linux-kernel@vger.kernel.org
Subject: [PATCH 2/2] int128: fix __uint128_t compiler test in Kconfig
Date: Tue, 10 Mar 2020 19:12:50 +0900 [thread overview]
Message-ID: <20200310101250.22374-2-masahiroy@kernel.org> (raw)
In-Reply-To: <20200310101250.22374-1-masahiroy@kernel.org>
The support for __uint128_t is dependent on the target bit size.
GCC that defaults to the 32-bit can still build the 64-bit kernel
with -m64 flag passed.
However, $(cc-option,-D__SIZEOF_INT128__=0) is evaluated against the
default machine bit, which may not match to the kernel it is building.
Theoretically, this could be evaluated separately for 64BIT/32BIT.
config CC_HAS_INT128
bool
default !$(cc-option,$(m64-flag) -D__SIZEOF_INT128__=0) if 64BIT
default !$(cc-option,$(m32-flag) -D__SIZEOF_INT128__=0)
I simplified it more because the 32-bit compiler is unlikely to support
__uint128_t.
Fixes: c12d3362a74b ("int128: move __uint128_t compiler test to Kconfig")
Reported-by: George Spelvin <lkml@sdf.org>
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
---
init/Kconfig | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/init/Kconfig b/init/Kconfig
index 20a6ac33761c..4f717bfdbfe2 100644
--- a/init/Kconfig
+++ b/init/Kconfig
@@ -767,8 +767,7 @@ config ARCH_WANT_BATCHED_UNMAP_TLB_FLUSH
bool
config CC_HAS_INT128
- def_bool y
- depends on !$(cc-option,-D__SIZEOF_INT128__=0)
+ def_bool !$(cc-option,$(m64-flag) -D__SIZEOF_INT128__=0) && 64BIT
#
# For architectures that know their GCC __int128 support is sound
--
2.17.1
next prev parent reply other threads:[~2020-03-10 10:15 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-03-10 10:12 [PATCH 1/2] kconfig: introduce m32-flag and m64-flag Masahiro Yamada
2020-03-10 10:12 ` Masahiro Yamada [this message]
2020-03-10 10:55 ` [PATCH 2/2] int128: fix __uint128_t compiler test in Kconfig George Spelvin
2020-03-10 15:46 ` [PATCH 1/2] kconfig: introduce m32-flag and m64-flag Nathan Chancellor
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200310101250.22374-2-masahiroy@kernel.org \
--to=masahiroy@kernel.org \
--cc=ardb@kernel.org \
--cc=dan.j.williams@intel.com \
--cc=dhowells@redhat.com \
--cc=ebiederm@xmission.com \
--cc=gregkh@linuxfoundation.org \
--cc=herbert@gondor.apana.org.au \
--cc=joel@joelfernandes.org \
--cc=krzk@kernel.org \
--cc=linux-kbuild@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lkml@sdf.org \
--cc=mchehab+samsung@kernel.org \
--cc=mhiramat@kernel.org \
--cc=patrick.bellasi@arm.com \
--cc=rostedt@goodmis.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.