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

David A. Wheeler dwheeler at dwheeler.com
Wed Mar 20 00:15:31 CET 2019

>I have been looking at making GNU Octave build reproducibly.

As an Octave user, that is excellent!

 > Similarly to other interpreted
>languages, the compiler options used are stashed in the binary for later use.

I don't know what everyone else here believes, but I recommend that those not be included in the binaries at all, but instead be put elsewhere so they can be more easily separated. In particular, no one really cares what the build directory is. I had to fight this earlier with GCC.

That said...

>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.

Building in such a way so that others can easily reuse exactly the same build directory is and alternative. In today's world, or you can easily create full containers or at least chroot sandboxes, those are pretty easy to recreate.

I don't know if that helps, but I hope it does.

--- David A.Wheeler

More information about the rb-general mailing list