On Sat, Mar 19, 2022 at 06:27:38PM +0100, Michael Nazzareno Trimarchi wrote:
> Hi
> 
> On Sat, Mar 19, 2022 at 6:25 PM Tom Rini <tr...@konsulko.com> wrote:
> >
> > On Sat, Mar 19, 2022 at 06:08:18PM +0100, Michael Nazzareno Trimarchi wrote:
> > > Hi Tom
> > >
> > > On Sat, Mar 19, 2022 at 6:03 PM Tom Rini <tr...@konsulko.com> wrote:
> > > >
> > > > On Sat, Mar 19, 2022 at 05:48:59PM +0100, Michael Nazzareno Trimarchi 
> > > > wrote:
> > > > > Hi Tom
> > > > >
> > > > > On Sat, Mar 19, 2022 at 5:05 PM Tom Rini <tr...@konsulko.com> wrote:
> > > > > >
> > > > > > On Sat, Mar 19, 2022 at 02:51:01PM +0100, Michael Nazzareno 
> > > > > > Trimarchi wrote:
> > > > > > > Hi
> > > > > > >
> > > > > > > On Sat, Mar 19, 2022 at 2:25 PM Fabio Estevam 
> > > > > > > <feste...@gmail.com> wrote:
> > > > > > > >
> > > > > > > > Hi Michael,
> > > > > > > >
> > > > > > > > On Sat, Mar 19, 2022 at 6:47 AM Michael Nazzareno Trimarchi
> > > > > > > > <mich...@amarulasolutions.com> wrote:
> > > > > > > > >
> > > > > > > > > HI
> > > > > > > > >
> > > > > > > > > Please send me a link to apply your series
> > > > > > > >
> > > > > > > > You can get the series from patchwork (just click in the 
> > > > > > > > 'series' button)
> > > > > > > > https://patchwork.ozlabs.org/project/uboot/patch/20220112133127.16880-2-gaurav.j...@nxp.com/
> > > > > > >
> > > > > > > Done, well, I have tried remove DM_GPIO in SPL. Seems that I need 
> > > > > > > to
> > > > > > > remove a lot of features. I have tested LTO build but size
> > > > > > > of SPL increase. Is that strange?
> > > > > >
> > > > > > That is very strange.  Can you post your patches somewhere?
> > > > > >
> > > > > > --
> > > > > > Tom
> > > > >
> > > > > Start from here 9776c4e9d00ac49d6388ffe9e084ff03b37ae479
> > > > > export ARCH=arm
> > > > > export CROSS_COMPILE=arm-linux-gnueabihf-
> > > > >
> > > > > make imx6dl_mamoj_defconfig
> > > > > build it
> > > > >
> > > > > Try then to enable LTO and build it again
> > > > >
> > > > > spl/u-boot-spl.bin exceeds file size limit:
> > > > >   limit:  0xefa0 bytes
> > > > >   actual: 0xf071 bytes
> > > > >   excess: 0xd1 bytes
> > > > >
> > > > > So LTO does not help even on beginning on this board. You don't need
> > > > > to apply any patch for this test
> > > >
> > > > I think that's some artifact of mixing LTO/non-LTO and the world not
> > > > getting rebuilt?  Just enabling LTO after the defconfig works fine and
> > > > is smaller than before.
> > >
> > > In order to save space I did not change what we have. Every build starts 
> > > from
> > > a mrproper and new configuration. I can not mix LTO/non-LTO in this case. 
> > > I'm
> > > using upstream defconfig and upstream defconfig + LTO enabled and the 
> > > result is
> > > that spl increase in size for LTO building. I'm working to keep out
> > > part that are not really needed but
> > > I was hoping that LTO give me some help here
> >
> > Yes, LTO saves about 5KiB on the SPL binary.  You just need to enable it
> > in the config before you start building, not after you've built
> > everything once.
> 
> Offcourse ;) but this not the case. I don't drink enough to think that
> change a config, decrease the build size ;)

LTO is an entirely different way of the compiler / linker optimizing the
binary.  So yes, in this case enabling a single option decreases the
size.

-- 
Tom

Attachment: signature.asc
Description: PGP signature

Reply via email to