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 3F3DEC433EF for ; Wed, 27 Oct 2021 13:13:54 +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 778E460F6F for ; Wed, 27 Oct 2021 13:13:53 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 778E460F6F 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 498AA83499; Wed, 27 Oct 2021 15:13:51 +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="W1Ai5gYr"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 568A383499; Wed, 27 Oct 2021 15:13:49 +0200 (CEST) Received: from mail-qt1-x832.google.com (mail-qt1-x832.google.com [IPv6:2607:f8b0:4864:20::832]) (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 F1E598329E for ; Wed, 27 Oct 2021 15:13:44 +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-qt1-x832.google.com with SMTP id t40so2354589qtc.6 for ; Wed, 27 Oct 2021 06:13:44 -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=EIpxAww1CBLkzavi94ys9iWYr8bc5v3QCLuk6i7vB9k=; b=W1Ai5gYr6v1krbuxoy+u/DpJED6Z8uJGTWePPyC18Hu1ZKDy4xtpJKPDpVxQwypOgr UPQ1N8Miv3ZcUcN7xIZiiUgqwJ+ZQmNG9cr+Drn9UkT1cZtEf23cBZtJH1O/H0XN+1ca SSS29c/A4RenDyDGb2ffayViXduPOofCyYTks= 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=EIpxAww1CBLkzavi94ys9iWYr8bc5v3QCLuk6i7vB9k=; b=y8ng0JVcPdrCzhm8TLTDG8fCKPV33bVTwfXBPIQLxlqgxp/c4D7XGCCrHBjfKwYUwX QkMj/CKi3Gbvdmm0dn3T0NSR8R7wHAI0GhJ88Jnfeu3hm36hbOScoUXIcUiwoi7mH266 VXZeFhndduD7HXKgU+mEUFR3cAEh6ROyPt5+nsa1cFnRTdcxQtSm/FeemDRTU+pMgiW+ IRM7TBIjUaPLen/QdtLnZzHtoS1u6srpur5zfvgW8Ae7icwnwHybZuYbQ4dec5TnZSsI 9b8YNeCaLlk7WAsyVUvk398qQ9FaMCWMJyYqhwdJyDQ+zSPW+OHtx54Xxoo4AygCEFEI ZoFA== X-Gm-Message-State: AOAM531aI5Z3/IVDO9CZeWYa87cIRbXV1KPDishFolm+k9tvo5sS1gog PaBhoUpeYeZgO4Z0oEGIKuX6AA== X-Google-Smtp-Source: ABdhPJzD17zv2nLzMYNq1pNq3kAYqSR3YRWK7Hv9W4hT9vDD+FMkNp+gz6dlhtkf9uHlOQoJtro6Mg== X-Received: by 2002:a05:622a:1187:: with SMTP id m7mr32154653qtk.336.1635340423424; Wed, 27 Oct 2021 06:13:43 -0700 (PDT) Received: from bill-the-cat (2603-6081-7b01-cbda-0044-6cb5-81ac-bb0c.res6.spectrum.com. [2603:6081:7b01:cbda:44:6cb5:81ac:bb0c]) by smtp.gmail.com with ESMTPSA id z26sm12461673qko.13.2021.10.27.06.13.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 Oct 2021 06:13:42 -0700 (PDT) Date: Wed, 27 Oct 2021 09:13:40 -0400 From: Tom Rini To: Heinrich Schuchardt Cc: Simon Glass , U-Boot Mailing List , Michal Simek , Daniel Schwierzeck , Steffen Jaeckel , Marek =?iso-8859-1?Q?Beh=FAn?= , Lukas Auer , Dennis Gilmore , Masahiro Yamada , Ilias Apalodimas , Heinrich Schuchardt Subject: Re: [PATCH v2 02/41] Makefile: Allow LTO to be disabled for a build Message-ID: <20211027131340.GT8284@bill-the-cat> References: <20211023232635.9195-1-sjg@chromium.org> <20211023232635.9195-3-sjg@chromium.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="6pbY/KU4ayLo+qis" Content-Disposition: inline In-Reply-To: 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 --6pbY/KU4ayLo+qis Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Oct 27, 2021 at 02:21:17PM +0200, Heinrich Schuchardt wrote: >=20 >=20 > On 10/27/21 10:50, Ilias Apalodimas wrote: > > Hi Simon > >=20 > > How does this patch related to the standard boot series? Shouldn't > > this be a completely separate patch? > >=20 > > Thanks > > /Ilias > >=20 > > On Sun, 24 Oct 2021 at 02:26, Simon Glass wrote: > > >=20 > > > LTO (Link-Time Optimisation) is an very useful feature which can > > > significantly reduce the size of U-Boot binaries. So far it has been > > > made available for selected ARM boards and sandbox. > > >=20 > > > However, incremental builds are much slower when LTO is used. For exa= mple, > > > an incremental build of sandbox takes 2.1 seconds on my machine, but = 6.7 > > > seconds with LTO enabled. > > >=20 > > > Add a LTO_BUILD=3Dn parameter to the build, so it can be disabled dur= ing > > > development if needed, for faster builds. > > >=20 > > > Add some documentation about LTO while we are here. > > >=20 > > > Signed-off-by: Simon Glass > > > --- > > >=20 > > > (no changes since v1) > > >=20 > > > Makefile | 18 +++++++++++++----- > > > arch/arm/config.mk | 4 ++-- > > > arch/arm/include/asm/global_data.h | 2 +- > > > doc/build/gcc.rst | 17 +++++++++++++++++ > > > 4 files changed, 33 insertions(+), 8 deletions(-) > > >=20 > > > diff --git a/Makefile b/Makefile > > > index b79b2319ff6..7057723e046 100644 > > > --- a/Makefile > > > +++ b/Makefile > > > @@ -434,6 +434,9 @@ KBUILD_CFLAGS +=3D -fshort-wchar -fno-stric= t-aliasing > > > KBUILD_AFLAGS :=3D -D__ASSEMBLY__ > > > KBUILD_LDFLAGS :=3D > > >=20 > > > +# Set this to "n" use of LTO for this build, e.g. LTO_BUILD=3Dn > > > +LTO_BUILD ?=3D y >=20 > This does not allow LTO_BUILD=3Dy to enable LTO for CONFIG_LTO=3Dn. I don't understand why we need this patch at all. If you want to disable LTO, disable LTO. Yes, LTO makes linking take longer which can be annoying on iterative development. I have a few different "HACK: DO NOT PUSH: ..." things I git am at the start of a branch, depending on needs. You can just do that to drop "imply LTO" from the SANDBOX stanza in arch/Kconfig. We do not need a whole thing around a CONFIG option that can be disabled in the defconfig, or local .config file even. --=20 Tom --6pbY/KU4ayLo+qis Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQGzBAABCgAdFiEEGjx/cOCPqxcHgJu/FHw5/5Y0tywFAmF5UHsACgkQFHw5/5Y0 tyzHAQwAntS4bPCc9LtmgsibKr4FYPa3RDNuT20I8EAvXIVMxj7ucHXXgZ8Lr+1k 4XOcZveHD8XIEpq1zMSPMQSx33JlUDVwoOjr6kQHDLo5K76tgajW9dXHW/sq8x2Q 0dDTPQQjY5Ph8zEfETN69MJxveb/4L+Eydcjdfng7HVMAhAXIBm+fb1KDsYwgn3k jmUxbnxnK82eVmNxGDJ/2kiZ+NA9FWtcf1Bj4jX9nybxNIgbwJ0E+0o5MbQifehO z0HHOWWR62Z5RR2Hm5g0odyy4RnJL6DD1DqY/5HAeJXp7iirWtqc+mABNUvku/ov rb6L8daNrcRV1qlJXDqFrW9esA1YJsARABMf2ySh0aGxWkE//wE/sBhUrjLIi/b2 zvD8O3dWivt2heoMvNgDy0Do1+77/vTqR7xPUx9VY4qBuigNOE7hVJyZCvBhH9Qs 7AS/+EYdEwlQ6GhuzJrd2j3G/PShGjPnExx1DK+2DM8sb1A7AlOySGQMlpwpuyJO mfTs+LsV =ttti -----END PGP SIGNATURE----- --6pbY/KU4ayLo+qis--