[rb-general] advice on stashing compiler options in a binary

Mike Miller mtmiller at debian.org
Tue Mar 19 21:08:02 CET 2019


Hi,

I have been looking at making GNU Octave build reproducibly. Octave is
an interpreted language that provides support for building extensions
and embedding itself in other programs. Similarly to other interpreted
languages, the compiler options used are stashed in the binary for later
use.

I recently realized this leads to a paradox with the -fdebug-prefix-map
option, since the original build directory is recorded in the stashed
compiler options.

I imagine this comes up with many interpreters, and maybe frameworks
with their own build tools like Qt.

I noticed that the Debian python3 source package shows one way to take
care of this at the packaging level:

  https://salsa.debian.org/cpython-team/python3/blob/3.8.0a1-1/debian/rules#L212

Ideally I would like to solve this upstream, and started with a proof of
concept patch to edit the stashed compiler options here:

  https://savannah.gnu.org/bugs/?55955

Is there any general advice for projects that want to support building
reproducibly while also recording user compiler options in the binary?

(no need to Cc me, I am subscribed to the list)

Thanks,

-- 
mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://lists.reproducible-builds.org/pipermail/rb-general/attachments/20190319/7978792b/attachment.sig>


More information about the rb-general mailing list