Bug#1033959: binutils: reproducible builds: build paths embedded in debug symbols

Vagrant Cascadian vagrant at reproducible-builds.org
Wed Apr 5 00:56:34 BST 2023


Source: binutils
Severity: normal
Tags: patch
User: reproducible-builds at lists.alioth.debian.org
Usertags: buildpath
X-Debbugs-Cc: reproducible-bugs at lists.alioth.debian.org

The build path is embedded in debugging symbols:

  https://tests.reproducible-builds.org/debian/rb-pkg/unstable/armhf/diffoscope-results/binutils.html

  /usr/lib/debug/.dwz/arm-linux-gnueabihf/binutils-arm-linux-gnueabihf.debug

  /build/1st/binutils-2.40/builddir-single/binutils
  vs.
  /build/2/binutils-2.40/2nd/builddir-single/binutils

The attached patch to debian/rules fixes this by passing the
-ffile-prefix-map in CFLAGS and CXXFLAGS, which strips the build path
from occurences of __FILE__ and in debug symbols.

Unfortunately, this patch alone does not solve all reproducibility
issues, but applying this patch should significantly reduce the
differences, making it easier to debug remaining issues.


Thanks for maintaining binutils!


live well,
  vagrant
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0002-debian-rules-Add-ffile-prefix-map-to-CFLAGS-and-CXXF.patch
Type: text/x-diff
Size: 973 bytes
Desc: not available
URL: <http://alioth-lists.debian.net/pipermail/reproducible-bugs/attachments/20230404/2c1b9c89/attachment-0001.patch>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 227 bytes
Desc: not available
URL: <http://alioth-lists.debian.net/pipermail/reproducible-bugs/attachments/20230404/2c1b9c89/attachment-0001.sig>


More information about the Reproducible-bugs mailing list