From patchwork Tue Mar 10 10:12:50 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 11429053 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 047871800 for ; Tue, 10 Mar 2020 10:15:14 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id D84AF222D9 for ; Tue, 10 Mar 2020 10:15:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1583835313; bh=9wj8wSEjztLqFEkoRJslaM9uMMLN+gBR5yU0JDqK95c=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=WtvVJ+9wzUQcM08pY3/jCZDKOiJ2/9d13KV31NGdJ3r6nQZMa4l797DUkF9NmDalR 6+pFdbydAvvup5P9jbfKidHARx4JrV93By0eWJp4Oj9cyz2TdD+bDp8y9aWR0hy4zo hrY9jkx623H6SvxjoIvCgaZLiGg2XG2axSYnSKNc= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726269AbgCJKPN (ORCPT ); Tue, 10 Mar 2020 06:15:13 -0400 Received: from conuserg-09.nifty.com ([210.131.2.76]:28070 "EHLO conuserg-09.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726258AbgCJKPN (ORCPT ); Tue, 10 Mar 2020 06:15:13 -0400 Received: from localhost.localdomain (p14092-ipngnfx01kyoto.kyoto.ocn.ne.jp [153.142.97.92]) (authenticated) by conuserg-09.nifty.com with ESMTP id 02AACqfV019796; Tue, 10 Mar 2020 19:12:53 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-09.nifty.com 02AACqfV019796 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1583835174; bh=c1hiVSalTfFe0k0/wchrmFhfrgNpWjBz7yfa9mrIes0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=czPo1Alz4v2bYy/O+q1ieUqOMyecpHvIpktuzimVqNuSLSW59yllVakJKLtmz+z40 yOKERYzt+YCkxIqs7mQdJHtYA7sxpB54U/94Lu6Mo2udosIOymxVX3ifGZajrk5YHV y9DAzF3XmhsdprFlMsBZOZYKD/g4QyDUv93/1/G6o85FzesJ+32gw7hHJOJCzQJtvo no/VAdi3c8JpC4+3UMLk+cs/orlJ6vaUxybrzWKG+621Sk5gmrtC6aHW5VyhWgqyDe w8A5BZAf1opTQjUIxh3iIkI0Q8Zjfg7SN0VjCrsyIwDxed7S/2nGS8EIBzXedUTpet y7zsLNw7eD/rA== X-Nifty-SrcIP: [153.142.97.92] From: Masahiro Yamada To: linux-kbuild@vger.kernel.org Cc: Ard Biesheuvel , George Spelvin , Masahiro Yamada , Dan Williams , David Howells , "Eric W. Biederman" , Greg Kroah-Hartman , Herbert Xu , "Joel Fernandes (Google)" , Krzysztof Kozlowski , Masami Hiramatsu , Mauro Carvalho Chehab , Patrick Bellasi , "Steven Rostedt (VMware)" , 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 Message-Id: <20200310101250.22374-2-masahiroy@kernel.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200310101250.22374-1-masahiroy@kernel.org> References: <20200310101250.22374-1-masahiroy@kernel.org> Sender: linux-kbuild-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kbuild@vger.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 Signed-off-by: Masahiro Yamada --- 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