On Wed, 2026-03-25 at 07:46 -0400, Patrick Williams via lists.openembedded.org wrote: > On Wed, Mar 25, 2026 at 07:39:51AM -0400, Patrick Williams wrote: > > When LTO is enabled, due to a gcc bug[1], the linker needs the same > > flags in DEBUG_PREFIX_MAP as the compiler. Without this the buildpaths > > QA failure can occur due to unstripped build directory strings in the > > DWARF data. > > > > With GCC 15.2 this can be noticed by setting many meson-built packages, > > such as systemd, with: > > > > EXTRA_OEMESON:append:class-target = " -Db_lto=true" > > > > Add the DEBUG_PREFIX_MAP to the TARGET_LDFLAGS for gcc. > > > > While the lto.inc enables LTO across the whole image, some packages > > either manually enable LTO on their own or downstream recipe > > maintainers have explicitly set LTO in specific packages, so it is not > > sufficient to set this in lto.inc only. > > > > [1]: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109805 > > > > Signed-off-by: Patrick Williams <[email protected]> > > --- > > A few other mailing list threads also talk about this problem. > > One alternative is to re-add it to the TARGET_LDFLAGS in bitbake.conf by > reverting 1797741aad02b8bf429fac4b81e30cdda64b5448 [1], but that seems to > have problems for cgo applications which might be resolved by another > patch[2]. Adding to lto.inc[3] isn't sufficient for the reasons I > mentioned above. > > [1]: > https://lore.kernel.org/openembedded-core/[email protected]/#t > [2]: > https://lore.kernel.org/openembedded-core/[email protected]/ > [3]: > https://lore.kernel.org/openembedded-core/[email protected]/
We're not seeing the error with OE-Core today in any of our automated testing. Reading the above, it implies that we should see some kind of failure with some components auto-selecting it? Something therefore isn't adding up. Whilst there is an open gcc bug report, that bug report is basically asking for specific test cases to debug and fix the issue further. So I think we need more info on where/when things are breaking since we're not seeing it out the box. Cheers, Richard
-=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#233897): https://lists.openembedded.org/g/openembedded-core/message/233897 Mute This Topic: https://lists.openembedded.org/mt/118499279/21656 Group Owner: [email protected] Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [[email protected]] -=-=-=-=-=-=-=-=-=-=-=-
