[Reproducible-builds] debugedit and reproducible builds
Jérémy Bobbio
lunar at debian.org
Tue Feb 18 23:29:45 UTC 2014
Stéphane Glondu:
> Le 13/02/2014 17:32, Jérémy Bobbio a écrit :
> > My feeling is that a correct fix for the problem would be to have
> > debugedit rewrite the whole indirect strings section in stable order.
> > But after looking at debugedit's source code, I feel that I'm not
> > competent enough to write that kind of code in C. Or at least it would
> > take me ages to get it right.
>
> I am not very comfortable with fiddling with ELF files like that. Isn't
> it possible to directly tell gcc (or whatever is responsible) to
> directly write the right path in the first place?
We can do that with -fdebug-prefix-map. Unfortunately, that very own
lines get recorded into the DWARF files. So we don't only need
-fdebug-prefix-map but also -gno-record-gcc-switches.
See https://wiki.debian.org/ReproducibleBuilds#DWARF_data
If GCC would support an environment variable, maybe that would work
better.
The debugedit path is what Fedora and Red Hat do, and that felt like a
valid path. Part of my reasoning was that if you build from your Debian
package sources (e.g. using debian/rules binary), you might want to
run `gdb ./hello` and have GDB look up the source code in the right
place.
--
Lunar .''`.
lunar at debian.org : :Ⓐ : # apt-get install anarchism
`. `'`
`-
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.alioth.debian.org/pipermail/reproducible-builds/attachments/20140218/a0b86eb9/attachment.sig>
More information about the Reproducible-builds
mailing list