From mboxrd@z Thu Jan 1 00:00:00 1970 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 B08CCC433F5 for ; Thu, 7 Oct 2021 02:52:39 +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 C9FE860F5B for ; Thu, 7 Oct 2021 02:52:38 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org C9FE860F5B 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 3B3BA8331F; Thu, 7 Oct 2021 04:52:36 +0200 (CEST) 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="Aq7z07TJ"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id C312383430; Thu, 7 Oct 2021 04:52:34 +0200 (CEST) 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 2F5D283270 for ; Thu, 7 Oct 2021 04:52:30 +0200 (CEST) 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 73so4675010qki.4 for ; Wed, 06 Oct 2021 19:52:30 -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:user-agent; bh=H/wmP3VOjnXndlS9F+y3OK9WpLHgKa6x3rXWG5XOiUw=; b=Aq7z07TJp4wWJiYGj7TfO//AGTAFPNDZurZ3MbMb2JGjaSpzd+9H7Rufj9xauxgRKO 1z5+kd+NyDuGDH42K9M1PDZvWE79kvMZ1v2nW8/Sl15PSkzcwvYN0I59CRSHTKQs78h7 eQi+8NQb4Mi428Q63x5ikQWJoFWHhbDdCu9/s= 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:user-agent; bh=H/wmP3VOjnXndlS9F+y3OK9WpLHgKa6x3rXWG5XOiUw=; b=bLHIq1iSc7+lyLdr2u8fLqVnI5wktYArF72iR1fRmrAvDsOjX5tJ2Ppc3D1+T20LkO Jv6rCyf6Q11GRxmQizf7nPGphb5KdupN7L6Pr7ZjkN6OVmGITuN8WSfYFn8SWCdDSgQZ Sc+9TKe1sB2Jw7E7KDPUfFMopo7Ox0WpfzEdThSheZQa6DP2SZbd41UBmNJ5RKHsEgaC 3Gucps05puVDMzf4wTp4XvEHTaXA2C7GHgj/Q+M+ZUc6QsZ9V4H05cD3ze82QgFsn4Ml S8zreWB3lTEfFZQXl/OPEcTwI/epcHLae9CGA3IvYqPMXhrQE2Y5JJ/tqosdItzSTFyU 7sYw== X-Gm-Message-State: AOAM53302fG0ZyaN+5T5mduPv8V1PL2W84STB42OzmzIuuUnskHacXFJ fxsR4lL28d63HFAIgxM79FJUmQ== X-Google-Smtp-Source: ABdhPJwfAqyDloVkKP8Yb2q4Ssyg1cHKF3JxI/0k7vJ7h05puSZy/WPvDUCtE8I+42iTE5i0G0NNew== X-Received: by 2002:ae9:efc9:: with SMTP id d192mr1378771qkg.366.1633575148975; Wed, 06 Oct 2021 19:52:28 -0700 (PDT) Received: from bill-the-cat (2603-6081-7b01-cbda-111d-c769-9689-befa.res6.spectrum.com. [2603:6081:7b01:cbda:111d:c769:9689:befa]) by smtp.gmail.com with ESMTPSA id x18sm12988620qkx.94.2021.10.06.19.52.27 (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 06 Oct 2021 19:52:28 -0700 (PDT) Date: Wed, 6 Oct 2021 22:52:26 -0400 From: Tom Rini To: Simon Glass Cc: U-Boot Mailing List , Alexandru Gagniuc , Andre Przywara , Rasmus Villemoes , Robert Marko , Masahiro Yamada , Masahiro Yamada Subject: Re: [PATCH v5 02/29] kconfig: Add tools support to CONFIG_IS_ENABLED() Message-ID: <20211007025226.GQ31748@bill-the-cat> References: <20210926014342.127913-1-sjg@chromium.org> <20210926014342.127913-3-sjg@chromium.org> <20211007002647.GA11424@bill-the-cat> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="rnPVEzlAIFDl46si" Content-Disposition: inline In-Reply-To: X-Clacks-Overhead: GNU Terry Pratchett User-Agent: Mutt/1.9.4 (2018-02-28) 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 --rnPVEzlAIFDl46si Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Oct 06, 2021 at 08:49:13PM -0600, Simon Glass wrote: > Hi Tom, >=20 > On Wed, 6 Oct 2021 at 18:26, Tom Rini wrote: > > > > On Sat, Sep 25, 2021 at 07:43:15PM -0600, Simon Glass wrote: > > > > > At present we must separately test for the host build for many option= s, > > > since we force them to be enabled. For example, CONFIG_FIT is always > > > enabled in the host tools, even if CONFIG_FIT is not enabled by the > > > board itself. > > > > > > It would be more convenient if we could use, for example, > > > CONFIG_IS_ENABLED(FIT) and get CONFIG_HOST_FIT, when building for the > > > host. Add support for this. > > > > > > With this and the tools_build() function, we should be able to remove= all > > > the #ifdefs currently needed in code that is build by tools and targe= ts. > > > > > > This will be even nicer when we move to using CONFIG(xxx) everywhere, > > > since all the #ifdef and IS_ENABLED/CONFIG_IS_ENABLED stuff will go a= way. > > > > > > Signed-off-by: Simon Glass > > > Suggested-by: Rasmus Villemoes # b4f73886 > > > Reviewed-by: Alexandru Gagniuc > > > > The problem here is we don't include automatically > > when building host stuff, I believe. This is why doing this breaks > > test_mkimage_hashes for me on am335x_evm with: > > /tmp/.bm-work/am335x_evm/tools/mkimage -D -I dts -O dtb -i /tmp/.bm-wor= k/am335x_evm -f /home/trini/work/u-boot/u-boot/test/py/tests/vboot//hash-im= ages.its /tmp/.bm-work/am335x_evm/test.fit > > *** stack smashing detected ***: terminated >=20 > Oh dear, and no CI coverage. >=20 > I was reluctant to include kconfig.h everywhere but perhaps that is > the best approach. Will take a look ASAP. Maybe we need to think a bit harder too about how we structure intentionally shared code. Why not, for example, for these common algorithms, rely on typical system headers/libraries in the tooling, which means we validated U-Boot vs common reference, rather than just our implementations? --=20 Tom --rnPVEzlAIFDl46si Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQGzBAABCgAdFiEEGjx/cOCPqxcHgJu/FHw5/5Y0tywFAmFeYN8ACgkQFHw5/5Y0 tyycqAwAlN+hVmXdvrXes4CBKfZWnS0Q6fIbeK7imjwVIl1J6vANH1AKZmAruaQI AAPMu6FVUFdBE6jaBatiHoBgCcCy4nCON/BIRDToGgBYwylsCm/F5hEZ0iBK5Oaw 3quuxTdS09mJu6cV/IGkQPRkJ9YvBi1dmaVzlufw+BSFSEVTvd4rvDfdTai1bqlH RHYJvZwjVg/yvLEUTMYPPy1DH5FOtY0xU2nxxPi9bf4rkSX0F+0Obgn2Uy5RnDp7 KYqrhLzbIspUS+lE+okKUeydwAJnL18kXC6p3pDUQsJXOkVOSwZqjN9OarGLDmuQ cEItR2JBF3apVgj4athBmghX/IimikLg0B8TgahE1cAGAuFaSIXRKy0wSffhyNlw aarnQ7kt5B9gVSPAWjkUTAx8j3y4j4lIhgUhs9FdLKFqwEMdGzSm4XE4CRIMCcVz IDTmy0Q1B9Ml6UQBgOkGlVC1nCGJiBGejwH+hR4rDukGLLJH/y5/0w/onrmLjG2R b4nLJZbg =zDyf -----END PGP SIGNATURE----- --rnPVEzlAIFDl46si--