public inbox for openembedded-core@lists.openembedded.org
 help / color / mirror / Atom feed
* [PATCH] lto.inc: add DEBUG_PREFIX_MAP back to TARGET_LDFLAGS
@ 2026-02-04  5:26 changqing.li
  2026-02-04  9:34 ` Richard Purdie
                   ` (2 more replies)
  0 siblings, 3 replies; 9+ messages in thread
From: changqing.li @ 2026-02-04  5:26 UTC (permalink / raw)
  To: openembedded-core
  Cc: rs, ricardo.salveti, raj.khem, antonin.godard, richard.purdie

From: Changqing Li <changqing.li@windriver.com>

DEBUG_PREFIX_MAP is appended to TARGET_LDFLAGS in commit [1] for fixing
reproducible issue when LTO is enabled. It is removed in comit [2] since
this commit causes cgo binary not reproducible. But actually, we still
need this DEBUG_PREFIX_MAP in LDFLAGS when LTO enabled. So, only appened
it when LTO is enabled. Refer [3] for the history, with this patch,
patch [4] is also needed for cgo + lto enabled.

[1] https://git.openembedded.org/openembedded-core/commit/?id=fddaecc88979967d0e00e2fafdbaaabec030da9f
[2] https://git.openembedded.org/openembedded-core/commit/?id=1797741aad02b8bf429fac4b81e30cdda64b5448
[3] https://lists.openembedded.org/g/openembedded-core/topic/patch_bitbake_conf_remove/117408334
[4] https://lists.openembedded.org/g/openembedded-core/message/230059

Signed-off-by: Changqing Li <changqing.li@windriver.com>
---
 meta/conf/distro/include/lto.inc | 1 +
 1 file changed, 1 insertion(+)

diff --git a/meta/conf/distro/include/lto.inc b/meta/conf/distro/include/lto.inc
index 227f0c5c2a..cef92901e3 100644
--- a/meta/conf/distro/include/lto.inc
+++ b/meta/conf/distro/include/lto.inc
@@ -49,5 +49,6 @@ LTO:toolchain-clang = "${@bb.utils.contains('DISTRO_FEATURES', 'thin-lto', '-flt
 
 SELECTED_OPTIMIZATION:append = "${@bb.utils.contains('DISTRO_FEATURES', 'lto', ' ${LTO}', '', d)}"
 TARGET_LDFLAGS:append:class-target = "${@bb.utils.contains('DISTRO_FEATURES', 'lto', ' ${LTO}', '', d)}"
+TARGET_LDFLAGS:append:class-target = "${@bb.utils.contains('DISTRO_FEATURES', 'lto', ' ${DEBUG_PREFIX_MAP}', '', d)}"
 
 SELECTED_OPTIMIZATION[vardeps] += "LTO LTOEXTRA"
-- 
2.34.1



^ permalink raw reply related	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2026-03-30 10:50 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-02-04  5:26 [PATCH] lto.inc: add DEBUG_PREFIX_MAP back to TARGET_LDFLAGS changqing.li
2026-02-04  9:34 ` Richard Purdie
2026-02-04 18:17 ` Ricardo de Araujo (Salveti)
2026-02-04 22:34   ` Richard Purdie
2026-03-28 20:26 ` [OE-core] " Jörg Sommer
2026-03-30  9:59   ` Thomas Perrot
2026-03-30 10:18     ` Richard Purdie
2026-03-30 10:23       ` Jörg Sommer
2026-03-30 10:50         ` Richard Purdie

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox