RFC: arm: Enable LTO by default

At this point, we have had wide enough testing of LTO on ARM platforms
that we should have covered all of the issues that linking in manner
exposes in terms of run-time failures. Note that on 32bit ARM we must
use our private libgcc in order to ensure that we do not have a size
mismatch over wchar_t, and we're missing some thumb1 assembly functions
for LTO to be usable in that case. Enable this by default, on ARM.

Signed-off-by: Tom Rini <trini@konsulko.com>
---
This is not yet ready to go. As noted in this[0] thread there's some
issues with weak functions. In addition, platforms such as
socfpga_n5x_vab (and _atf) have their SPL grow and meesc_dataflash grows
itself. This seems to be in part due to how the
sha1_process_one/sha256_process_one abstractions interact with LTO.
There might be more issues like this, but it's harder to spot just due
to how LTO will essentially inline a large number of functions.

[0]: https://lore.kernel.org/u-boot/783cfab5-feb0-1148-f4be-125195275c98@gmx.de/
2 files changed