Skip to contentSkip to conversation

lto: disable expect to workaround GCC LTO debug_line_str bug

PATCH In review [email protected] 2 participants 2 messages Mar 31

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 lto: disable expect to workaround GCC LTO debug_line_str bug

From: Thomas Perrot <[email protected]>

When expect is built with LTO, GCC correctly passes -ffile-prefix-map to lto1 during link-time recompilation. However, when lto1 incorporates debug info from a linked dependency (tcl8), the directory entries in .debug_line_str from that dependency are not subject to prefix remapping, leaving a raw TMPDIR path in the split debug symbols of libexpect5.45.4.so:

.debug_line_str: /src/build/tmp/work/.../tcl8/8.6.17/build

This is specific to packages linking against tcl8 with LTO and is not an incompatibility between LTO and expect itself.

---
Changes in v2:
- Fix commit message
- Link to v1: https://lore.kernel.org/all/[email protected]/

---
 meta/conf/distro/include/lto.inc | 1 +
 1 file changed, 1 insertion(+)
meta/conf/distro/include/lto.inc +1 -0
index 54983412bc14..8c13601a4df6 100644
@@ -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
#1 lore raw
Quoted 31 lines · Thomas Perrot via lists.openembedded.org

From: Thomas Perrot <[email protected]>

When expect is built with LTO, GCC correctly passes -ffile-prefix-map to lto1 during link-time recompilation. However, when lto1 incorporates debug info from a linked dependency (tcl8), the directory entries in .debug_line_str from that dependency are not subject to prefix remapping, leaving a raw TMPDIR path in the split debug symbols of libexpect5.45.4.so:

.debug_line_str: /src/build/tmp/work/.../tcl8/8.6.17/build

This is specific to packages linking against tcl8 with LTO and is not an incompatibility between LTO and expect itself.

---
Changes in v2:
- Fix commit message
- Link to v1:
https://lore.kernel.org/all/[email protected]/

---
 meta/conf/distro/include/lto.inc | 1 +
 1 file changed, 1 insertion(+)
meta/conf/distro/include/lto.inc +0 -0
index 54983412bc14..8c13601a4df6 100644

meta/conf/distro/include/lto.inc line 8

Quoted 5 lines
meta/conf/distro/include/lto.inc +1 -0
@@ -4,6 +4,7 @@
 #
 
 # Disable LTO for following packages
+LTO:pn-expect = ""
 

I think, along with package name override, it should use toolchain-gcc override as well.

Quoted 18 lines
meta/conf/distro/include/lto.inc +0 -0
 LTO:pn-glibc = ""
 LTO:pn-gcc-runtime = ""

LTO:pn-libgcc-initial = ""
--
2.53.0

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group. View/Reply Online (#234315):
https://lists.openembedded.org/g/openembedded-core/message/234315
Mute This Topic: https://lists.openembedded.org/mt/118604439/1997914
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [ [email protected]]
-=-=-=-=-=-=-=-=-=-=-=-