Skip to contentSkip to conversation

test-manual: document LTO related reproducibility bug

PATCH Michael Opdenacker 1 participant 1 message Jul 23, 2021 1 message not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

Michael Opdenacker

author Applied
#1 lore raw
Quoted 13 lines · Michael Opdenacker
---
 documentation/test-manual/reproducible-builds.rst | 11 +++++++++++
 1 file changed, 11 insertions(+)
documentation/test-manual/reproducible-builds.rst +0 -0
index e13583c0bf..1938041b2d 100644
@@ -68,6 +68,17 @@ things we do within the build system to ensure reproducibility include:
 -  Filtering the tools available from the host's ``PATH`` to only a specific set
    of tools, set using the :term:`HOSTTOOLS` variable.
 

documentation/test-manual/reproducible-builds.rst things we do within the build system to ensure reproducibility include: · line 80

Quoted 10 lines
documentation/test-manual/reproducible-builds.rst +10 -0
+.. note::
+
+   Because of an open bug in GCC, using ``DISTRO_FEATURES_append = " lto"`` or
+   adding ``-flto`` (Link Time Optimization) to a Makefile makes the resulting
+   binary non-reproducible, in that it depends on the full absolute build path
+   to ``recipe-sysroot-native``, so installing the Yocto Project in a different
+   directory results in a different binary.
+
+   This issue is addressed by
+   :yocto_bugs:`bug 14481 -  Programs built with -flto are not reproducible</show_bug.cgi?id=14481>`.

Merged into "master-next" for yocto-docs, after replacing "a Makefile" by "CFLAGS", as recommended by Tony (thanks!)

Cheers
Michael.

Signature · 3 lines
Michael Opdenacker, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com