All of lore.kernel.org
 help / color / mirror / Atom feed
* [master][PATCH 0/4] Reproducible LTO builds
@ 2021-07-27 13:34 Tony Battersby
  2021-08-05  0:13 ` [OE-core] " Randy MacLeod
  0 siblings, 1 reply; 14+ messages in thread
From: Tony Battersby @ 2021-07-27 13:34 UTC (permalink / raw)
  To: openembedded-core, openembedded-devel; +Cc: randy.macleod

Currently, enabling Link Time Optimization via:

require conf/distro/include/lto.inc
DISTRO_FEATURES_append = " lto"

makes the build non-reproducible (as in
https://reproducible-builds.org/).  This patch set fixes some of the
problems, but is not yet a complete solution.

This patch set addresses the following bugs:
https://bugzilla.yoctoproject.org/show_bug.cgi?id=14481
https://bugzilla.yoctoproject.org/show_bug.cgi?id=14490

openembedded-core patches
1/4: lto.inc: disable LTO for grub
2/4: gcc: Backport patch to make LTO builds more reproducible
3/4: bitbake.conf: add DEBUG_PREFIX_MAP to TARGET_LDFLAGS

openembedded-devel patches
4/4: net-snmp: fix QA Issue after LDFLAGS change

Patch 3 adds DEBUG_PREFIX_MAP to TARGET_LDFLAGS (it was already in
TARGET_CFLAGS).  This could possibly be done differently, such as by
removing it from TARGET_CFLAGS and adding it to TOOLCHAIN_OPTIONS,
TARGET_CC_ARCH, or TUNE_CCARGS, but I haven't tested those.  Let me know
if there is a better/preferred way to do it.

The TARGET_LDFLAGS change broke net-snmp from meta-networking, so I have
included a patch to fix that.  Other packages might have been broken as
well, although I haven't found any others.

With all these patches, there are still many shared libraries in /lib
and /usr/lib that are still not reproducible with LTO enabled because
x86_64-poky-linux-libtool filters out the -f*-prefix-map flags added by
patch 3 when linking shared libraries.  /usr/lib/libbz2.so.1.0.6 from
the libbz2 package from the bzip2 recipe is a good example.  I do not
have a patch for that problem.  I will leave that to someone else.

So this is what we need to achieve reproducible LTO builds:
*) This patch set
*) A fix for libtool
*) Add LTO to reproducible builds testing if appropriate (e.g.
meta/lib/oeqa/selftest/cases/reproducible.py, CI on Autobuilder)
*) Fixes for individual packages, if needed
*) Once everything works, update the documentation again (I previously
requested a documentation change for this bug, which will eventually
show up at
http://docs.yoctoproject.org/test-manual/reproducible-builds.html).

Tony Battersby
Cybernetics


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

end of thread, other threads:[~2021-08-10 19:44 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-27 13:34 [master][PATCH 0/4] Reproducible LTO builds Tony Battersby
2021-08-05  0:13 ` [OE-core] " Randy MacLeod
2021-08-05 10:21   ` Richard Purdie
2021-08-05 21:54     ` Tony Battersby
2021-08-06  5:33       ` Richard Purdie
2021-08-06 16:44         ` Tony Battersby
2021-08-06 21:04           ` Tony Battersby
2021-08-07  2:19             ` Khem Raj
2021-08-09 14:32               ` [meta-networking][master][PATCH 1/2] curlpp: fix QA Issue after LDFLAGS change Tony Battersby
2021-08-09 14:32               ` [meta-oe][master][PATCH 2/2] ldns: " Tony Battersby
2021-08-09 14:39               ` [OE-core] [master][PATCH 0/4] Reproducible LTO builds Tony Battersby
2021-08-09 17:18                 ` Khem Raj
2021-08-10 16:57                   ` Khem Raj
2021-08-10 19:44                     ` [meta-oe][master][PATCH] tcsh: fix compile error after LDFLAGS change Tony Battersby

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.