Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id A0CBFC433EF for ; Mon, 1 Nov 2021 13:13:47 +0000 (UTC) Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 5306B6058D for ; Mon, 1 Nov 2021 13:13:46 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 5306B6058D Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=konsulko.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=lists.denx.de Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id A72AF8328D; Mon, 1 Nov 2021 14:13:43 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=konsulko.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=konsulko.com header.i=@konsulko.com header.b="lYdKVC5/"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 20298832AD; Mon, 1 Nov 2021 14:13:42 +0100 (CET) Received: from mail-qk1-x72f.google.com (mail-qk1-x72f.google.com [IPv6:2607:f8b0:4864:20::72f]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 3D9B48032F for ; Mon, 1 Nov 2021 14:13:37 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=konsulko.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=trini@konsulko.com Received: by mail-qk1-x72f.google.com with SMTP id i9so15882418qki.3 for ; Mon, 01 Nov 2021 06:13:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=konsulko.com; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=EdKX8hU+JytTp4OWUOw+C0f71zKeyQcvu9YOqWMWK/I=; b=lYdKVC5/Ui/XsHeYEytFiLGR2qqdw/qwJlp09GPJI7TaVHfzf3pQRYRcRGIb9MVA+l ZCeqXj3gLMnx3fC+9L+EjJUa9Q0WvpbnnlIT8ZxZTD9IS2hfYWzT4LBkP81wAJVsSXjQ A3IGdghFz1IKYsySSAwrwKM/GqZJ1AnJhJqJ0= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=EdKX8hU+JytTp4OWUOw+C0f71zKeyQcvu9YOqWMWK/I=; b=KdH2E4G3hrogfWyxIswUeY6bdFs241OncyTeJMZuOsyHkkWTL3CF4neLhT25D0ca5+ aypayrJ8mmIWG+c83xOFhxt2fqtdGpJrXKmmHbSs9Z/rFUYdhH7lcatsbYUfP5f4gnjP VvxwaEAiTXDq4UzkZ6h5tTk/QtUGqydl82WXBQKdtJqTb01lCMjmHwG49daxUoo9d2s1 8R6v2fIKiQrmu6Gy0cfdJYO5JsXL/VMjTLGfky5I2H9AnBH8wOmxdJ0i3s6HxSq543bb Yax3FzpZ3JFT0cVCPwyAeCJRQLNhiimFujFGiwFbjgdPSpw2SPgpVXRO0tadp36RVqFb LAXQ== X-Gm-Message-State: AOAM531itgsZUVw48TcRmpwrAO+WQNUxdUuL06ucURrb68dhjULk0tvh uGmPfDDJo1obOhfUevyXpqRXug== X-Google-Smtp-Source: ABdhPJy95LAYtw4uw7M0n1xv+YN0mdxPNEbvjkC7xMBBQFlgcZPyehDs/kuNzrAy7NaZ0DVwGCcsOA== X-Received: by 2002:ae9:e210:: with SMTP id c16mr22307571qkc.184.1635772415922; Mon, 01 Nov 2021 06:13:35 -0700 (PDT) Received: from bill-the-cat (2603-6081-7b01-cbda-4914-04c9-a84a-a30a.res6.spectrum.com. [2603:6081:7b01:cbda:4914:4c9:a84a:a30a]) by smtp.gmail.com with ESMTPSA id o1sm8429431qkk.22.2021.11.01.06.13.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 01 Nov 2021 06:13:35 -0700 (PDT) Date: Mon, 1 Nov 2021 09:13:33 -0400 From: Tom Rini To: Pali =?iso-8859-1?Q?Roh=E1r?= Cc: Simon Glass , U-Boot Mailing List , Heinrich Schuchardt , Marek =?iso-8859-1?Q?Beh=FAn?= Subject: Re: [PATCH v3 3/5] sandbox: Detect the host bit size automatically Message-ID: <20211101131333.GZ24579@bill-the-cat> References: <20210802005613.2267669-1-sjg@chromium.org> <20210802005613.2267669-4-sjg@chromium.org> <20211101070444.n5pb45qkmmarcsk6@pali> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="ZljC5FVPx7rxDQQ8" Content-Disposition: inline In-Reply-To: <20211101070444.n5pb45qkmmarcsk6@pali> X-Clacks-Overhead: GNU Terry Pratchett X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.2 at phobos.denx.de X-Virus-Status: Clean --ZljC5FVPx7rxDQQ8 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Nov 01, 2021 at 08:04:44AM +0100, Pali Roh=E1r wrote: > On Sunday 01 August 2021 18:56:11 Simon Glass wrote: > > At present if you build sandbox on a 32-bit host a lot of errors are > > produced. This is because CONFIG_HOST_64BIT is enabled by default. > >=20 > > It is quite annoying to have to change that manually before building > > sandbox. It is also quite confusing for new users. > >=20 > > Add a way to detect the setting and add the appropriate > > CONFIG_HOST_64BIT=3Dy or CONFIG_HOST_32BIT=3Dy to the defconfig, to avo= id > > this issue. > >=20 > > Signed-off-by: Simon Glass > > --- > >=20 > > Changes in v3: > > - Use 'bitness' instead of 'bit' > >=20 > > Changes in v2: > > - Drop patches previously applied > > - Put all the packages in gcc.rst > >=20 > > Makefile | 11 ++++++++++- > > arch/sandbox/Kconfig | 13 ++++++++----- > > scripts/kconfig/Makefile | 14 +++++++++++++- > > 3 files changed, 31 insertions(+), 7 deletions(-) > >=20 > > diff --git a/Makefile b/Makefile > > index 269e353a28a..57c3e9a77df 100644 > > --- a/Makefile > > +++ b/Makefile > > @@ -565,8 +565,17 @@ export KBUILD_DEFCONFIG KBUILD_KCONFIG > > config: scripts_basic outputmakefile FORCE > > $(Q)$(MAKE) $(build)=3Dscripts/kconfig $@ > > =20 > > +# If nothing is specified explicitly, detect the bit size for sandbox, > > +# referred to from arch/sandbox/Kconfig > > +# Add it to the end of the defconfig file > > %config: scripts_basic outputmakefile FORCE > > - $(Q)$(MAKE) $(build)=3Dscripts/kconfig $@ > > + $(Q)if test -f $(srctree)/configs/$@ && \ > > + ! grep -Eq "CONFIG_HOST_(32|64)BIT=3Dy" $(srctree)/configs/$@; then \ > > + echo '#include \nint main(void) { printf("CONFIG_HOST_%dBIT= =3Dy\\n", __WORDSIZE); return 0; }' \ > > + | gcc -x c - -o get_word_size; \ >=20 > Should not Makefile use user's specified compiler instead of hardcoded 'g= cc'? And it should probably look a bit more like how we do CC_IS_GCC, etc. --=20 Tom --ZljC5FVPx7rxDQQ8 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQGzBAABCgAdFiEEGjx/cOCPqxcHgJu/FHw5/5Y0tywFAmF/5/kACgkQFHw5/5Y0 tyzYAQv/aiYSy4CO9WlOinnIrtwjtiOqonwt/2BbmZB4mapln6Qfhlf/2sg3szym Y1DGKZMkjDmBTmaj2mo0STMNLa0oCOdL/S3EUXKtZRv42VO2UeEsCpT2iuIEq0Kt UZxXyy33mhcLmr+PHRtxOVyane9V9+T9zNRnUdV6RoV1Hb0k76yS+evW6R75geJ0 t00dzngCPO85ciyCPY58B1NM1x6zcGyfX7hqxULKJWa5NCoKeozWamHCTBktDJXF jOvHpmpDLqogUiDOveT/bKI1NSpX3GE3ilWyLvy1vVqEx+aE0puk6tffyYZAPrwo m38ZS3elTzEvOzFUMMBdI36nWniOcao+FBX3syh1sPsp8CPdgnZ+oNnkn+qSiVEf IVhyNvxte7fL1kwvH1ssn0T52DzGFzz6RwXwc+6QtnSJALGsH1k6cLQr26mQvt6W bGX4Xa18R5XvQ7QfCSuft4425WBSg0H4gmuGvTBtfNcSH8BkK5BuqzOAcz/KUUh8 tQ+OcIym =peZQ -----END PGP SIGNATURE----- --ZljC5FVPx7rxDQQ8--