Select ARCH_SUPPORTS_LTO from MPC85xx, so that boards can set CONFIG_LTO=y, and name mpc85xx next to ARM in doc/build/gcc.rst. This does not turn LTO on for any board by itself.
Only mpc85xx is covered: it is the PowerPC family whose linker scripts discard the LTO keep-syms sections, and the one that was built and booted with LTO. Signed-off-by: Josef Schlehofer <[email protected]> Reviewed-by: Tom Rini <[email protected]> Cc: Marek BehĂșn <[email protected]> Cc: Priyanka Jain <[email protected]> --- (no changes since v1) --- arch/powerpc/Kconfig | 1 + doc/build/gcc.rst | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig index b4883e00458..20716135cd5 100644 --- a/arch/powerpc/Kconfig +++ b/arch/powerpc/Kconfig @@ -17,6 +17,7 @@ config MPC83xx config MPC85xx bool "MPC85xx" + select ARCH_SUPPORTS_LTO select CREATE_ARCH_SYMLINK select SYS_FSL_DDR select SYS_FSL_DDR_BE diff --git a/doc/build/gcc.rst b/doc/build/gcc.rst index 1fef718ceec..48d22a3c8d4 100644 --- a/doc/build/gcc.rst +++ b/doc/build/gcc.rst @@ -193,9 +193,9 @@ Link-time optimisation (LTO) U-Boot supports link-time optimisation which can reduce the size of the final U-Boot binaries, particularly with SPL. -At present this can be enabled by ARM boards by adding `CONFIG_LTO=y` into the -defconfig file. Other architectures are not supported. LTO is enabled by default -for sandbox. +At present this can be enabled by ARM boards and by PowerPC mpc85xx boards by +adding `CONFIG_LTO=y` into the defconfig file. Other architectures are not +supported. LTO is enabled by default for sandbox. This does incur a link-time penalty of several seconds. For faster incremental builds during development, you can disable it by setting `NO_LTO` to `1`. -- 2.54.0 (Apple Git-157)
