On 28/09/2023 20:59, Toon Moene wrote:
On 9/28/23 21:26, Jakub Jelinek wrote:

It is worse than that, usually the LTO format changes e.g. any time any
option or parameter is added on a release branch (several times a year) and
at other times as well.
Though, admittedly GCC is the single package that actually could get away
with LTO in lib*.a libraries, at least in some packagings (if the static
libraries are in gcc specific subdirectories rather than say /usr/lib{,64}
or similar and if the packaging of gcc updates both the compiler and
corresponding static libraries in a lock-step.  Because in that case LTO
in there will be always used only by the same snapshot from the release
branch and so should be compatible with the LTO in it.
This might be an argument to make it a configure option, e.g. --enable-lto-runtime.

This sort of thing should definitely Just Work for cross compilers and embedded platforms where the libraries are bundled with the compiler.

Andrew

Reply via email to