lto: disable for expect and add DEBUG_PREFIX_MAP to ldflags
PATCH 1/1 lto: disable for expect and add DEBUG_PREFIX_MAP to ldflags
From: Thomas Perrot <[email protected]>
Disable LTO for the expect package and append DEBUG_PREFIX_MAP to TARGET_LDFLAGS when LTO is enabled, ensuring debug info remapping is applied consistently alongside LTO flags.
--- meta/conf/distro/include/lto.inc | 1 + 1 file changed, 1 insertion(+)
meta/conf/distro/include/lto.inc +1 -0
@@ -4,6 +4,7 @@ # # Disable LTO for following packages +LTO:pn-expect = "" LTO:pn-glibc = "" LTO:pn-gcc-runtime = "" LTO:pn-libgcc-initial = ""
Signature · 1 line
2.53.0
Quoted 18 lines · Thomas Perrot via lists.openembedded.org
From: Thomas Perrot <[email protected]>
Disable LTO for the expect package and append
DEBUG_PREFIX_MAPtoTARGET_LDFLAGSwhen LTO is enabled, ensuring debug info remapping is applied consistently alongside LTO flags.Signed-off-by Thomas Perrot <[email protected]>---
meta/conf/distro/include/lto.inc | 1 +1 file changed, 1 insertion(+)meta/conf/distro/include/lto.inc +0
-0@@ -4,6 +4,7 @@ #
Quoted 7 lines
# Disable LTO for following packages
+LTO:pn-expect = ""
LTO:pn-glibc = ""
LTO:pn-gcc-runtime = ""
LTO:pn-libgcc-initial = ""
Is the commit message still correct for this? it doesn't add DEBUG_PREFIX_MAP?
Cheers,
Richard
Hello Richard,
Quoted 22 lines · Richard Purdie
Quoted 20 lines · Thomas Perrot via lists.openembedded.org
From: Thomas Perrot <[email protected]>
Disable LTO for the expect package and append
DEBUG_PREFIX_MAPtoTARGET_LDFLAGSwhen LTO is enabled, ensuring debug info remapping is applied consistently alongside LTO flags.Signed-off-by Thomas Perrot <[email protected]>---
meta/conf/distro/include/lto.inc | 1 +1 file changed, 1 insertion(+)meta/conf/distro/include/lto.inc +0
-0@@ -4,6 +4,7 @@ #
# Disable LTO for following packages
Quoted 9 lines
Quoted 5 lines
+LTO:pn-expect = ""
LTO:pn-glibc = ""
LTO:pn-gcc-runtime = ""
LTO:pn-libgcc-initial = ""Is the commit message still correct for this? it doesn't add
DEBUG_PREFIX_MAP?
Sorry, I forgot to update the commit message when I modified the commit.
I will submit a v2 with the correct commit message.
Kind regards,
Thomas Perrot
Quoted 3 lines
Cheers,
Richard
Signature · 3 lines
Thomas Perrot, Bootlin Embedded Linux and kernel engineering https://bootlin.com
Thomas Perrot via lists.openembedded.org schrieb am Di 31. Mär, 10:12 (+0200):
Quoted 16 lines
From: Thomas Perrot <[email protected]>
Disable LTO for the expect package and append
DEBUG_PREFIX_MAPtoTARGET_LDFLAGSwhen LTO is enabled, ensuring debug info remapping is applied consistently alongside LTO flags.Signed-off-by Thomas Perrot <[email protected]>--- meta/conf/distro/include/lto.inc | 1 + 1 file changed, 1 insertion(+)meta/conf/distro/include/lto.inc +0
-0
meta/conf/distro/include/lto.inc line 7
Quoted 4 lines
meta/conf/distro/include/lto.inc +1
-0@@ -4,6 +4,7 @@ # # Disable LTO for following packages +LTO:pn-expect = ""
I suspect this is due to the gcc bug not because LTO is unsuitable for expect. Might it be a good idea to move all excludes due to the gcc bug in its own block? This would make it easier to revert them when the bug gets resolved.
Quoted 18 lines
meta/conf/distro/include/lto.inc +0
-0LTO:pn-glibc = "" LTO:pn-gcc-runtime = "" LTO:pn-libgcc-initial = ""Signature · 13 lines
2.53.0 -=-=-=-=-=-=-=-=-=-=-=- Links: Every message in topics or hashtags you are following is emailed to you. The first message of every new thread is also emailed to you. You automatically follow any topics you start or reply to. View/Reply Online (#234270): https://lists.openembedded.org/g/openembedded-core/message/234270 Follow This Topic: https://lists.openembedded.org/ft/118593189/7646358 Group Owner: [email protected] Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [[email protected]] -=-=-=-=-=-=-=-=-=-=-=-
Signature · 6 lines
Navimatix GmbH T: 03641 - 327 99 0 Tatzendpromenade 2 F: 03641 - 526 306 07745 Jena www.navimatix.de Geschäftsführer: Steffen Späthe, Jan Rommeley Registergericht: Amtsgericht Jena, HRB 501480
Quoted 21 lines · Jörg Sommer via lists.openembedded.org
Thomas Perrot via lists.openembedded.org schrieb am Di 31. Mär, 10:12 (+0200):
Quoted 6 lines
From: Thomas Perrot <[email protected]>
Disable LTO for the expect package and append
DEBUG_PREFIX_MAPtoTARGET_LDFLAGSwhen LTO is enabled, ensuring debug info remapping is applied consistently alongside LTO flags.Review
Quoted 6 lines
Signed-off-by Thomas Perrot <[email protected]>--- meta/conf/distro/include/lto.inc | 1 + 1 file changed, 1 insertion(+)(quoted diff) +0
-0b/meta/conf/distro/include/lto.inc
Quoted 6 lines
index
8752249685a4..c66dfc5a8074100644meta/conf/distro/include/lto.inc +0
-0@@ -4,6 +4,7 @@ #
Quoted 9 lines
meta/conf/distro/include/lto.inc line 7
Quoted 2 lines
meta/conf/distro/include/lto.inc +1
-0# Disable LTO for following packages +LTO:pn-expect = ""I suspect this is due to the gcc bug not because LTO is unsuitable for expect. Might it be a good idea to move all excludes due to the gcc bug in its own block? This would make it easier to revert them when the bug gets resolved.
I also wonder if the issue is gcc specific and works with TOOLCHAIN = "clang"
Quoted 30 lines
Quoted 10 lines
meta/conf/distro/include/lto.inc +0
-1LTO:pn-glibc = "" LTO:pn-gcc-runtime = "" LTO:pn-libgcc-initial = "" --2.53.0
--
Navimatix GmbH T: 03641 - 327 99 0
Tatzendpromenade 2 F: 03641 - 526 306
07745 Jena www.navimatix.deGeschäftsführer: Steffen Späthe, Jan Rommeley
Registergericht: Amtsgericht Jena, HRB 501480-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group. View/Reply Online (#234304):
https://lists.openembedded.org/g/openembedded-core/message/234304
Mute This Topic: https://lists.openembedded.org/mt/118593189/1997914
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [ [email protected]]
-=-=-=-=-=-=-=-=-=-=-=-
Hello,
Quoted 40 lines · Khem Raj via lists.openembedded.org
Quoted 15 lines · Jörg Sommer via lists.openembedded.org
Thomas Perrot via lists.openembedded.org schrieb am Di 31. Mär, 10:12 (+0200):
Quoted 6 lines
From: Thomas Perrot <[email protected]>
Disable LTO for the expect package and append
DEBUG_PREFIX_MAPtoTARGET_LDFLAGSwhen LTO is enabled, ensuring debug info remapping is applied consistently alongside LTO flags.Review
Quoted 6 lines
Signed-off-by Thomas Perrot <[email protected]>---
meta/conf/distro/include/lto.inc | 1 +1 file changed, 1 insertion(+)(quoted diff) +0
-0b/meta/conf/distro/include/lto.inc
Quoted 18 lines
Quoted 8 lines
index
8752249685a4..c66dfc5a8074100644meta/conf/distro/include/lto.inc +0
-0@@ -4,6 +4,7 @@ #
# Disable LTO for following packages
+LTO:pn-expect = ""I suspect this is due to the gcc bug not because LTO is unsuitable for
expect. Might it be a good idea to move all excludes due to the gcc bug in
its own block? This would make it easier to revert them when the bug gets
resolved.
Quoted 2 lines
I also wonder if the issue is gcc specific and works with TOOLCHAIN = "clang"
I investigated further and can confirm your suspicion, this is indeed a GCC bug,
not an incompatibility between LTO and expect.
With -v added to LDFLAGS, I verified that -ffile-prefix-map flags are correctly passed to lto1. However, the raw TMPDIR path does not come from expect's own compilation, it leaks from tcl8 via the .debug_line_str section:
$ readelf --debug-dump=line libexpect5.45.4.so | grep '/src/build' 0 (indirect line string, offset: 0x7de): /src/build/tmp/work/.../tcl8/8.6.17/build
During LTO, when GCC incorporates debug info from a linked dependency (tcl8 here), the directory entries in .debug_line_str are not subject to prefix remapping. DW_AT_comp_dir is correctly remapped, but .debug_line_str is not.
This is not expect-specific, any package linking against tcl8 with LTO could be affected.
Your suggestion to group packages disabled due to this GCC bug in a separate block, I think it's a good idea.
Kind regards,
Thomas
Quoted 25 lines
Quoted 24 lines
Quoted 10 lines
LTO:pn-glibc = ""
LTO:pn-gcc-runtime = ""
LTO:pn-libgcc-initial = ""Signature · 1 line
2.53.0-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group. View/Reply Online (#234313):
https://lists.openembedded.org/g/openembedded-core/message/234313
Mute This Topic:
https://lists.openembedded.org/mt/118593189/5443093
Group Owner: [email protected] Unsubscribe:
https://lists.openembedded.org/g/openembedded-core/unsub [
[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-
Signature · 3 lines
Thomas Perrot, Bootlin Embedded Linux and kernel engineering https://bootlin.com