lto.inc: introduce LTO_DEFAULT variable to support per-package overrides with Clang
Currently, LTO variable is set with a toolchain-clang override directly.
This causes priority issues where package-specific overrides (e.g., LTO:pn-perl = "")
are ignored when the Clang toolchain is active, making it difficult to disable LTO
for specific failing recipes.
This patch refactors the logic by introducing an intermediate `LTO_DEFAULT` variable.
- `LTO_DEFAULT` handles the toolchain-specific flags (GCC vs Clang).
- `LTO` is assigned `LTO_DEFAULT` as a default value.
This structure allows `LTO` to be cleanly overridden by recipe-specific overrides
(like `pn-${PN}`) regardless of the active toolchain.
Added a toolchain-gcc override for alsa-lib because -flto-partition=none is not
supported by Clang.
Signed-off-by: mark.yang <mark.yang@lge.com> Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com> Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>