Received: by 2002:ac0:adbb:0:0:0:0:0 with SMTP id o56-v6csp7409imb; Wed, 30 May 2018 16:08:06 -0700 (PDT) X-Google-Smtp-Source: ADUXVKJvPsJyov7uB8iGyrHWFdqaeeaqbSa/5yiTxkn7uVgcvGZoIHfrzyw278RanogBZLxKJClY X-Received: by 2002:a63:794d:: with SMTP id u74-v6mr3640357pgc.328.1527721686304; Wed, 30 May 2018 16:08:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527721686; cv=none; d=google.com; s=arc-20160816; b=HD+vyTZgg07z8njEIF+GxvdE4pviKdR2rKWP0ulN2TR5h7nrbvA17ApIEmTzrpHgKH w6S3UewAFR2CTxC9C3ADlwj4rTOTGoDuvlgMbU9ZkcBzX0623VaHJ0PyvmiXLDcIJQqL y++h2sWuH2vjX3sqnxuVA3zXIogylrPzznCzfkuGz+3z4aqrKUudcZ2XWhRRW40OTlB0 LFBcc07YvMcmPpf4CvWNmtqtFbWn2samNZx6h8aNUjqYkRiUBgii3id6r8ZIlHe/tQYZ P/ygss8v5Vzn0NCLJ1j267c1iT4qGk//witByURO4RtyVwtHLWnGXxQKB4fSH5+9mgDU wqUw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:cc:to:subject :message-id:date:from:references:in-reply-to:mime-version :dkim-signature:arc-authentication-results; bh=07aXHtt9Oy/CtH/eFeOA82JbgRI6LuaMmZ8NxzSnisw=; b=mBA0r3wv2qrhvtEk6G+0j4yoIKa+p+faJo55eR8fJ9HIJcf9tfj6aNuYcz99zhR/Qy SOxlTGsjLiEv5dSa2Np5ISQrhRhfRpzusn91gKvejNbp5OSxWGOvNEtU789PBR8HYSOU 1YDzbMmjxAQc1ao25q/tk/efiAqwg3V2ZjMiNO5Z/6zohL8c4AtXDGW7vVdvhMYUs5YG /VkksSLaTdFh4/lrS3nZNCo7IfxzJ5/Lv17tQVROqWicK1rIgCrXbzf4UPoftuLz3+8d ShJ5Uu5RDAc/w6jZoH6QBlCWcVAsFzSDzNkHh+BOJ/1T1OpJT1wYJ6ZiB+SgYb8dqGSO K7+Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=vAYeJp1g; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b97-v6si36534710plb.135.2018.05.30.16.07.52; Wed, 30 May 2018 16:08:06 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=vAYeJp1g; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932660AbeE3XHB (ORCPT + 99 others); Wed, 30 May 2018 19:07:01 -0400 Received: from mail-vk0-f67.google.com ([209.85.213.67]:39319 "EHLO mail-vk0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932416AbeE3XGz (ORCPT ); Wed, 30 May 2018 19:06:55 -0400 Received: by mail-vk0-f67.google.com with SMTP id y137-v6so12186191vkd.6; Wed, 30 May 2018 16:06:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=07aXHtt9Oy/CtH/eFeOA82JbgRI6LuaMmZ8NxzSnisw=; b=vAYeJp1g8XSm04eNyxPffG0CBOvPNwvv4YhhefUxMN83K2rxgN8KJzUmp03sGRNrLO K+UzT0kG3vy01VVZWQdoqhoxFOvsqrhZxKx3Tmt6Wy0k6kJjyeOu2Kvy7swdEyWeZerH WGBvPv53OGBIoL2vMeYLcd/ta3ix3qKUtXsYax8uvsLzlifZ2cdc+9U9xQvCJi8rVRQ6 GDTLlH9k2OJ9AEQ1Te34TzlbVVy0kVqHOIBWnAB28q2zb7O87hewxHrEmVPRXhixuhmx rNWDGWhXvQJBBZyawa62+QERFeGtPCT4iEusgtvsG/G9jJ5NZtBRLWdNy9ISKapXOyQX uYHA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=07aXHtt9Oy/CtH/eFeOA82JbgRI6LuaMmZ8NxzSnisw=; b=KW08+yLY2G1RX9k4mxHGAzp1Y+X7bQYY6CvuEB8viZT2lScxyiLP0MFPVDx3G56Wfp PkoJ/VNr5621vRCGnP4Qb2psGiYT7dfmzL2O2i4iTJtLG5TXwoq+G7Dal/TQGhCV+iT/ X1PfyfJpuZo/trU+kNRmcx/JIkvYyvkYnGsy0xqBiRVmRdexXiY/UnVqr3eKA9W38Un8 ffurhZK9O6kXp4TpLtMBEXHUWO7YdeDSBwm3wHgTUwQg4DXYY1JmzgtiLS6MMpAO6nKB 5kDbLpdhDM+RGYyRM5LEmNFvanKljur6KDHjSv5VCw6dFI6ue+yZ6Eew3DbwYPCUFzy5 FjuA== X-Gm-Message-State: ALKqPwe2/2wYIPIiRDlUlQX7wtpVeFD20kyYXLnnTrDVhfWz7gmEFOSe XIvthKajjhaf97Z6B5EnHwpSRCMup/XW1lxxfp0= X-Received: by 2002:a1f:a0d6:: with SMTP id j205-v6mr2708778vke.23.1527721614209; Wed, 30 May 2018 16:06:54 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:ab0:3012:0:0:0:0:0 with HTTP; Wed, 30 May 2018 16:06:53 -0700 (PDT) In-Reply-To: References: <20180530204838.22079-1-luc.vanoostenryck@gmail.com> From: Luc Van Oostenryck Date: Thu, 31 May 2018 01:06:53 +0200 Message-ID: Subject: Re: [PATCH] kbuild: add machine size to CHEKCFLAGS To: =?UTF-8?Q?Andreas_F=C3=A4rber?= Cc: Masahiro Yamada , Michal Marek , Richard Henderson , Ivan Kokshaysky , Matt Turner , Russell King , Catalin Marinas , Will Deacon , Tony Luck , Fenghua Yu , Ralf Baechle , James Hogan , "James E . J . Bottomley" , Helge Deller , "David S . Miller" , Thomas Gleixner , Ingo Molnar , "H . Peter Anvin" , "the arch/x86 maintainers" , Brendan Higgins , Martin Blumenstingl , Cao jin , Nicolas Pitre , Linux Kbuild mailing list , LKML , linux-alpha@vger.kernel.org, "moderated list:ARM/Allwinner sunXi SoC support" , linux-ia64@vger.kernel.org, linux-mips@linux-mips.org, linux-parisc@vger.kernel.org, sparclinux@vger.kernel.org, Randy Dunlap , Christoph Hellwig , Rob Landley Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, May 31, 2018 at 12:00 AM, Andreas F=C3=A4rber wr= ote: > Hi Luc, > > The typo in the subject made me curious... > > Am 30.05.2018 um 22:48 schrieb Luc Van Oostenryck: >> By default, sparse assumes a 64bit machine when compiled on x86-64 >> and 32bit when compiled on anything else. >> >> This can of course create all sort of problems for the other archs, like >> issuing false warnings ('shift too big (32) for type unsigned long'), or >> worse, failing to emit legitimate warnings. >> >> Fix this by adding the -m32/-m64 flag, depending on CONFIG_64BIT, >> to CHECKFLAGS in the main Makefile (and so for all archs). >> Also, remove the now unneeded -m32/-m64 in arch specific Makefiles. >> >> Signed-off-by: Luc Van Oostenryck >> --- >> Makefile | 3 +++ >> arch/alpha/Makefile | 2 +- >> arch/arm/Makefile | 2 +- >> arch/arm64/Makefile | 2 +- >> arch/ia64/Makefile | 2 +- >> arch/mips/Makefile | 3 --- >> arch/parisc/Makefile | 2 +- >> arch/sparc/Makefile | 2 +- >> arch/x86/Makefile | 2 +- >> 9 files changed, 10 insertions(+), 10 deletions(-) > > What about the architectures not touched by your patch that previously > had no -m32/-m64? (arc, c6x, h8300, hexagon, m68k, microblaze, nds32, > nios2, openrisc, powerpc, riscv, s390, sh, unicore32, xtensa) As explained in the patch, by default sparse uses -m64 if compiled on x86-6= 4 and 32bit on everything else (well, more recent versions use -m64 if compiled on any 64 bit machine). I think that most ppc devs use a ppc machine and so ppc was most probably fine (at least ppc64) but I suspect that most of these others archs either had never sparse used on them or had a lot of wrong warnings. IOW, it was maybe OK but most probably incorrect for them and now it is OK. > You forgot to CC them on this patch. I didn't thought/knew it was needed and the CC list is already quite long but, if needed, no problem for me. > Have you really checked that all their toolchains support the -m32/-m64 > flags you newly introduce for them? Apart from non-biarch architectures, > I'm thinking of 31-bit s390 as a corner case where !64 !=3D 32. Hmm, there is no change to anything I call 'toolchain related', like compiler and linker. The only change is sparse (or any other checker) receiving now a correct and explicit -m32 or -m64. For s390, as far as I know: 1) it has CONFIG_64BIT unconditionally definee (because the old 31bit is no more supported, now everything is s390x only). 2) even if the *address space* was only 31 bit, I'm very sure that sizeof(long) and sizeof(void*) was 4 on these machine hence -m32 would have been correct. Best regards, -- Luc