From: "Jörg Sommer" <joerg.sommer@navimatix.de>
To: thomas.perrot@bootlin.com
Cc: openembedded-core@lists.openembedded.org, thomas.petazzoni@bootlin.com
Subject: Re: [OE-core][PATCH] lto: disable LTO for e2fsprogs
Date: Wed, 1 Apr 2026 07:39:15 +0200 [thread overview]
Message-ID: <acytsjVUJ3oP0u3K@navimatix.de> (raw)
In-Reply-To: <20260330230727.1380122-1-thomas.perrot@bootlin.com>
[-- Attachment #1: Type: text/plain, Size: 2964 bytes --]
Thomas Perrot via lists.openembedded.org schrieb am Di 31. Mär, 01:07 (+0200):
> From: Thomas Perrot <thomas.perrot@bootlin.com>
>
> Fat LTO objects embed original source paths in .gnu.lto_* IR sections
> which are not remapped by -ffile-prefix-map. This causes buildpaths QA
> failures for libss.a and libext2fs.a in the e2fsprogs-staticdev package.
>
> Disable LTO for e2fsprogs to prevent TMPDIR references from leaking into
> the installed static libraries.
For e2fsprogs this was a patch I've used to fix the LTO problem. Feel free
to take it:
diff --git c/recipes/e2fsprogs/e2fsprogs/lto.patch i/recipes/e2fsprogs/e2fsprogs/lto.patch
new file mode 100644
index 0000000..cf5c076
--- /dev/null
+++ i/recipes/e2fsprogs/e2fsprogs/lto.patch
@@ -0,0 +1,38 @@
+Upstream-Status: Inappropriate [ TODO ]
+
+diff --git i/lib/ext2fs/Makefile.in w/lib/ext2fs/Makefile.in
+index e9a6ced2..998ccd19 100644
+--- i/lib/ext2fs/Makefile.in
++++ w/lib/ext2fs/Makefile.in
+@@ -262,11 +262,11 @@ all:: ext2fs.pc
+
+ .c.o:
+ $(E) " CC $<"
+- $(Q) $(CC) $(ALL_CFLAGS_STLIB) -c $< -o $@
++ $(Q) $(CC) $(ALL_CFLAGS_STLIB) -c ./$< -o $@
+ $(Q) $(CHECK_CMD) $(ALL_CFLAGS) $<
+ $(Q) $(CPPCHECK_CMD) $(CPPFLAGS) $<
+ @PROFILE_CMT@ $(Q) $(CC) $(ALL_CFLAGS_STLIB) -g -pg -o profiled/$*.o -c $<
+-@ELF_CMT@ $(Q) $(CC) $(ALL_CFLAGS_SHLIB) -fPIC -shared -o elfshared/$*.o -c $<
++@ELF_CMT@ $(Q) $(CC) $(ALL_CFLAGS_SHLIB) -fPIC -shared -o elfshared/$*.o -c ./$<
+ @BSDLIB_CMT@ $(Q) $(CC) $(ALL_CFLAGS_SHLIB) $(BSDLIB_PIC_FLAG) -o pic/$*.o -c $<
+
+ DISTFILES= Makefile *.c *.h image
+diff --git i/lib/ss/Makefile.in w/lib/ss/Makefile.in
+index bb504189..9d8ec595 100644
+--- i/lib/ss/Makefile.in
++++ w/lib/ss/Makefile.in
+@@ -34,11 +34,11 @@ COMPILE_ET= _ET_DIR_OVERRIDE=$(srcdir)/../et ../et/compile_et
+
+ .c.o:
+ $(E) " CC $<"
+- $(Q) $(CC) $(ALL_CFLAGS_STLIB) -c $<
++ $(Q) $(CC) $(ALL_CFLAGS_STLIB) -c ./$<
+ $(Q) $(CHECK_CMD) $(ALL_CFLAGS) $<
+ $(Q) $(CPPCHECK_CMD) $(CPPFLAGS) $<
+ @PROFILE_CMT@ $(Q) $(CC) $(ALL_CFLAGS_STLIB) -g -pg -o profiled/$*.o -c $<
+-@ELF_CMT@ $(Q) $(CC) $(ALL_CFLAGS_SHLIB) -DSHARED_ELF_LIB -fPIC -shared -o elfshared/$*.o -c $<
++@ELF_CMT@ $(Q) $(CC) $(ALL_CFLAGS_SHLIB) -DSHARED_ELF_LIB -fPIC -shared -o elfshared/$*.o -c ./$<
+ @BSDLIB_CMT@ $(Q) $(CC) $(ALL_CFLAGS_SHLIB) $(BSDLIB_PIC_FLAG) -o pic/$*.o -c $<
+
+ # for the library
diff --git c/recipes/e2fsprogs/e2fsprogs_%.bbappend i/recipes/e2fsprogs/e2fsprogs_%.bbappend
new file mode 100644
index 0000000..ee75686
--- /dev/null
+++ i/recipes/e2fsprogs/e2fsprogs_%.bbappend
@@ -0,0 +1,5 @@
+FILESEXTRAPATHS:prepend := "${THISDIR}/${BPN}:"
+
+SRC_URI += "\
+ file://lto.patch \
+"
--
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
[-- Attachment #2: smime.p7s --]
[-- Type: application/pkcs7-signature, Size: 5000 bytes --]
prev parent reply other threads:[~2026-04-01 5:39 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-30 23:07 [OE-core][PATCH] lto: disable LTO for e2fsprogs thomas.perrot
2026-04-01 5:39 ` Jörg Sommer [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=acytsjVUJ3oP0u3K@navimatix.de \
--to=joerg.sommer@navimatix.de \
--cc=openembedded-core@lists.openembedded.org \
--cc=thomas.perrot@bootlin.com \
--cc=thomas.petazzoni@bootlin.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox