Skip to contentSkip to conversation

] libsepol: disable LTO to fix buildpaths QA failure

PATCH In review [email protected] 2 participants 4 messages Mar 28 – Apr 20

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ] libsepol: disable LTO to fix buildpaths QA failure

From: Thomas Perrot <[email protected]>

Fat LTO objects in the static library embed original source paths in .gnu.lto_* IR sections. Unlike DWARF output, these sections are not affected by -ffile-prefix-map, causing TMPDIR references to survive into the installed libsepol-staticdev package.

---
 recipes-security/selinux/libsepol_3.10.bb | 4 ++++
 1 file changed, 4 insertions(+)
recipes-security/selinux/libsepol_3.10.bb +4 -0
index 0423a2a6ea31..0a51aba28ee8 100644
@@ -13,4 +13,8 @@ inherit lib_package
 
 DEPENDS = "flex-native"
 
+# LTO fat objects in static library embed original source paths in .gnu.lto_* IR
+# sections which are not affected by -ffile-prefix-map, causing buildpaths QA failure
+LTO = ""
+
 BBCLASSEXTEND = "native"
Signature · 1 line
2.53.0
#1 lore raw

Hi Thomas,

Could you please provide the build steps to reproduce this QA failure? I can not reproduce the issue, even without applying this patch.

Thanks,

Yi

Quoted 25 lines · Thomas Perrot via lists.yoctoproject.org

From: Thomas Perrot <[email protected]>

Fat LTO objects in the static library embed original source paths in .gnu.lto_* IR sections. Unlike DWARF output, these sections are not affected by -ffile-prefix-map, causing TMPDIR references to survive into the installed libsepol-staticdev package.

---
  recipes-security/selinux/libsepol_3.10.bb | 4 ++++
  1 file changed, 4 insertions(+)
recipes-security/selinux/libsepol_3.10.bb +4 -0
index 0423a2a6ea31..0a51aba28ee8 100644
@@ -13,4 +13,8 @@ inherit lib_package
 
  DEPENDS = "flex-native"
 
+# LTO fat objects in static library embed original source paths in .gnu.lto_* IR
+# sections which are not affected by -ffile-prefix-map, causing buildpaths QA failure
+LTO = ""
+
  BBCLASSEXTEND = "native"
#2 lore raw

Hello Yi,

Quoted 5 lines · Yi Zhao

Hi Thomas,

Could you please provide the build steps to reproduce this QA failure?

To reproduce it, LTO is required to be enabled. For example:

DISTRO_FEATURES:append = " lto"
require conf/distro/include/lto.inc

Kind regards,
Thomas

Quoted 38 lines

I
can not reproduce the issue, even without applying this patch.

Thanks,

Yi

Quoted 29 lines · Thomas Perrot via lists.yoctoproject.org

From: Thomas Perrot <[email protected]>

Fat LTO objects in the static library embed original source paths in
.gnu.lto_* IR sections. Unlike DWARF output, these sections are not affected by -ffile-prefix-map, causing TMPDIR references to survive into the installed libsepol-staticdev package.

---
  recipes-security/selinux/libsepol_3.10.bb | 4 ++++

  1 file changed, 4 insertions(+)
recipes- renamed from recipes-security/selinux/libsepol_3.10.bb +0 -0

security/selinux/libsepol_3.10.bb
index 0423a2a6ea31..0a51aba28ee8 100644

recipes-security/selinux/libsepol_3.10.bb +0 -0
@@ -13,4 +13,8 @@ inherit lib_package


  DEPENDS = "flex-native"

+# LTO fat objects in static library embed original source paths in .gnu.lto_* IR
+# sections which are not affected by -ffile-prefix-map, causing buildpaths QA failure

recipes-security/selinux/libsepol_3.10.bb +2 -0
+LTO = ""
+

  BBCLASSEXTEND = "native"

Signature · 3 lines
Thomas Perrot, Bootlin
Embedded Linux and kernel engineering
https://bootlin.com
#3 lore raw
Quoted 6 lines · Thomas Perrot

Hello Yi,

Quoted 3 lines · Yi Zhao

Hi Thomas,

Quoted 6 lines
Quoted 2 lines

Could you please provide the build steps to reproduce this QA failure?

To reproduce it, LTO is required to be enabled. For example:

DISTRO_FEATURES:append = " lto"
require conf/distro/include/lto.inc

Thanks.  I have merged these patches.

//Yi

Quoted 42 lines

Kind regards,
Thomas

Quoted 38 lines

I
can not reproduce the issue, even without applying this patch.

Thanks,

Yi

Quoted 29 lines · Thomas Perrot via lists.yoctoproject.org

From: Thomas Perrot <[email protected]>

Fat LTO objects in the static library embed original source paths in
.gnu.lto_* IR sections. Unlike DWARF output, these sections are not affected by -ffile-prefix-map, causing TMPDIR references to survive into the installed libsepol-staticdev package.

---
   recipes-security/selinux/libsepol_3.10.bb | 4 ++++
   1 file changed, 4 insertions(+)
recipes- renamed from recipes-security/selinux/libsepol_3.10.bb +0 -0

security/selinux/libsepol_3.10.bb
index 0423a2a6ea31..0a51aba28ee8 100644

recipes-security/selinux/libsepol_3.10.bb +1 -0
@@ -13,4 +13,8 @@ inherit lib_package
 
   DEPENDS = "flex-native"
 
+# LTO fat objects in static library embed original source paths in

.gnu.lto_* IR
+# sections which are not affected by -ffile-prefix-map, causing buildpaths QA failure

recipes-security/selinux/libsepol_3.10.bb +2 -0
+LTO = ""
+
   BBCLASSEXTEND = "native"