kumquat-buildroot/toolchain
Peter Kümmel 814f63ec32 toolchain: add link-time-optimization support
Add a new option BR2_GCC_ENABLE_LTO that builds gcc and binutils with
LTO support.

Individual packages still have to enable LTO explicitly by passing '-flto' to
GCC, which passes it on to the linker. This option does not add that flag
globally. Some packages detect if the compiler supports LTO and enable the flag
if it does.

To support LTO, ar and ranlib must be called with an argument which triggers the
usage of the LTO plugin. Since GCC doesn't call these tools itself, it instead
provides wrappers for ar and ranlib that pass the LTO arguments. This way
existing Makefiles don't need to be changed for LTO support. However, these
wrappers are called <tuple>-gcc-ar which matches the pattern to link to the
buildroot wrapper in the external toolchain logic. So the external toolchain
logic is updated to provide the correct symlink.

[Thomas:
  - Add a separate BR2_BINUTILS_ENABLE_LTO option to enable LTO
    support in binutils. This is a blind option, selected by
    BR2_GCC_ENABLE_LTO. It just avoids having binutils.mk poke
    directly into gcc Config.in options.
  - Remove the check on the AVR32 special gcc version, which we don't
    support anymore.
  - Adapt the help text of the LTO Config.in option to no longer
    mention "Since version 4.5", since we only support gcc >= 4.5 in
    Buildroot anyway.
  - Fix typo in toolchain-external.mk comment.]

Signed-off-by: Peter Kümmel <syntheticpp@gmx.net>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2015-03-07 15:01:53 +01:00
..
toolchain toolchain/toolchain-buildroot: migrate to virtual package infrastructure 2014-06-14 19:10:13 +02:00
toolchain-buildroot toolchain/buildroot: default to glibc where possible/convenient 2015-03-04 19:42:13 +01:00
toolchain-external toolchain: add link-time-optimization support 2015-03-07 15:01:53 +01:00
Config.in toolchain: Enable the internal toolchain for nios2 2015-02-19 22:04:26 +01:00
helpers.mk package: indentation cleanup 2014-10-23 22:13:29 +02:00
toolchain-common.in toolchain: add 3.19 choice for headers 2015-02-09 13:31:23 +01:00
toolchain.mk system/skeleton: make nsswitch install conditional 2014-10-25 12:48:17 +02:00