[Reproducible-builds] Bug#777753: gcc: LTO produces unreproducible debug information

conchur at web.de conchur at web.de
Thu Feb 12 09:15:32 UTC 2015


Source: gcc-4.9
Version: 4.9.2-10
Severity: normal
Tags: patch
User: reproducible-builds at lists.alioth.debian.org
Usertags: randomness toolchain
X-Debbugs-Cc: reproducible-builds at lists.alioth.debian.org
Forwarded: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65015

The GCC produced binaries seem to be only reproducible when not using
link time optimization. This was discussed on the mailing list [1]. Both
Jérémy Bobbio and Richard Biener pointed me in the direction of debug
information which contained artifacts from the randomly generated
temporary files of the LTO builds.

The last test [2] showed that these really seemed to be the culprit of
the problem. In the meantime, Richard Biener proposed patches which can
solve this problem. I've compiled my own version  of gcc-4.9 using the
attached patch and can confirm that the LTO builds are now working
perfectly fine and no changes to the affected packages are necessary
anymore.

Other versions of gcc might also have this problem but this is right now
only for the default gcc version used by the build infrastructure.

A small testcase is attached to the upstream bug.


[1] http://lists.alioth.debian.org/pipermail/reproducible-builds/Week-of-Mon-20150209/000933.html
[2] http://lists.alioth.debian.org/pipermail/reproducible-builds/Week-of-Mon-20150209/000942.html
-------------- next part --------------
A non-text attachment was scrubbed...
Name: gcc-4.9_flto-reproducible.patch
Type: text/x-patch
Size: 1617 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/reproducible-builds/attachments/20150212/b8549895/attachment.bin>


More information about the Reproducible-builds mailing list