814f63ec32
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>
49 lines
1.2 KiB
Plaintext
49 lines
1.2 KiB
Plaintext
comment "Binutils Options"
|
|
|
|
choice
|
|
prompt "Binutils Version"
|
|
depends on !BR2_arc
|
|
default BR2_BINUTILS_VERSION_2_24
|
|
help
|
|
Select the version of binutils you wish to use.
|
|
|
|
config BR2_BINUTILS_VERSION_2_22
|
|
depends on !BR2_aarch64 && !BR2_microblaze && \
|
|
!BR2_powerpc64le && !BR2_nios2
|
|
bool "binutils 2.22"
|
|
|
|
# bfin disabled for newer binutils due to
|
|
# https://sourceware.org/bugzilla/show_bug.cgi?id=17334
|
|
config BR2_BINUTILS_VERSION_2_23_2
|
|
depends on !BR2_aarch64 && !BR2_bfin && !BR2_microblaze && \
|
|
!BR2_powerpc64le && !BR2_nios2
|
|
bool "binutils 2.23.2"
|
|
|
|
config BR2_BINUTILS_VERSION_2_24
|
|
depends on !BR2_bfin
|
|
depends on !BR2_nios2 # supported, but broken on Nios-II
|
|
bool "binutils 2.24"
|
|
|
|
config BR2_BINUTILS_VERSION_2_25
|
|
depends on !BR2_bfin
|
|
bool "binutils 2.25"
|
|
|
|
endchoice
|
|
|
|
config BR2_BINUTILS_VERSION
|
|
string
|
|
default "arc-2014.12" if BR2_arc
|
|
default "2.22" if BR2_BINUTILS_VERSION_2_22
|
|
default "2.23.2" if BR2_BINUTILS_VERSION_2_23_2
|
|
default "2.24" if BR2_BINUTILS_VERSION_2_24
|
|
default "2.25" if BR2_BINUTILS_VERSION_2_25
|
|
|
|
config BR2_BINUTILS_ENABLE_LTO
|
|
bool
|
|
|
|
config BR2_BINUTILS_EXTRA_CONFIG_OPTIONS
|
|
string "Additional binutils options"
|
|
default ""
|
|
help
|
|
Any additional binutils options you may want to include.
|