[Buildroot] [PATCH 1/1] binutils/gcc: make it possible to use lto

Thomas Petazzoni thomas.petazzoni at free-electrons.com
Mon Nov 10 09:45:31 UTC 2014


Dear Peter Kuemmel,

On Mon, 10 Nov 2014 10:28:18 +0100, Peter Kuemmel wrote:

> Thought more about it: it is not necessary to make it optional.
> Using --enable-plugins --enable-lto in binutils only allows using lto,
> but when not used, it doesn't change anything. And these options are 
> available in the binutils versions supported by buildroot.
> 
> Also all buildroot's builds of the GCC (>=4.7) support the lto flags,
> and when -flto is not used nothing changed.
> 
> So in both cases optional support of lto is provided without changing
> behavior when lto is not used.

Ok. What about older versions of gcc/binutils, such as gcc 4.2, gcc
4.5, or binutils 2.18. We still support gcc 4.2 and binutils 2.18 for
the AVR32 architecture (even though it's marked deprecated, we still
haven't removed the support for this arch). We still have gcc 4.5 as
the default for Blackfin.

I guess some of those older versions don't support LTO, so maybe a
Config.in knob BR2_GCC_SUPPORTS_LTO will be needed, and ditto for
binutils.

Best regards,

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com


More information about the buildroot mailing list