Thanks Ricardo,

I've been following the OECore discussions on LTO and the prefix maps.

If I'm following correctly, we still need this.

I'm just about to push my container-cross-install baseline, but will get to
this
in the next few days.

Bruce

On Thu, Jan 29, 2026 at 5:40 PM Ricardo Salveti via lists.yoctoproject.org
<[email protected]> wrote:

> oe-core [1] removed DEBUG_PREFIX_MAP from TARGET_LDFLAGS to avoid passing
> prefix-map options via the linker flags. This is fine for most projects
> since DEBUG_PREFIX_MAP is also provided via CFLAGS at configure time.
>
> However, lxc enables LTO by default, which causes link-time code generation
> to (re)emit debug information during the link step. Without
> DEBUG_PREFIX_MAP
> on the link command line, TMPDIR/WORKDIR paths can leak into DWARF,
> triggering the buildpaths QA check and breaking reproducibility.
>
> Append DEBUG_PREFIX_MAP back to TARGET_LDFLAGS for lxc to ensure prefix-map
> options are visible during LTO link-time compilation.
>
> [1]
>
> https://git.openembedded.org/openembedded-core/commit/?id=1797741aad02b8bf429fac4b81e30cdda64b5448
>
> Signed-off-by: Ricardo Salveti <[email protected]>
> ---
>  recipes-containers/lxc/lxc_git.bb | 3 +++
>  1 file changed, 3 insertions(+)
>
> diff --git a/recipes-containers/lxc/lxc_git.bb b/recipes-containers/lxc/
> lxc_git.bb
> index 542134db..04db2ac0 100644
> --- a/recipes-containers/lxc/lxc_git.bb
> +++ b/recipes-containers/lxc/lxc_git.bb
> @@ -63,6 +63,9 @@ EXTRA_OEMESON += "${PTEST_CONF}
> -Ddistrosysconfdir=${sysconfdir}/default"
>  # No meson equivalent for these yet
>  # EXTRA_OECONF += "--enable-log-src-basename --disable-werror"
>
> +# LTO is enabled by default, expose prefix-map options to the linker for
> reproducibility
> +TARGET_LDFLAGS:append = " ${DEBUG_PREFIX_MAP}"
> +
>  PACKAGECONFIG ??= "templates \
>      ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'systemd', '', d)}
> \
>      ${@bb.utils.contains('DISTRO_FEATURES', 'selinux', 'selinux', '', d)}
> \
> --
> 2.34.1
>
>
> 
>
>

-- 
- Thou shalt not follow the NULL pointer, for chaos and madness await thee
at its end
- "Use the force Harry" - Gandalf, Star Trek II
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#9558): 
https://lists.yoctoproject.org/g/meta-virtualization/message/9558
Mute This Topic: https://lists.yoctoproject.org/mt/117535700/21656
Group Owner: [email protected]
Unsubscribe: https://lists.yoctoproject.org/g/meta-virtualization/unsub 
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to