RFR: 8284437: Building from different users/workspace is not always deterministic [v2]

Magnus Ihse Bursie ihse at openjdk.java.net
Fri Apr 8 14:15:43 UTC 2022


On Wed, 6 Apr 2022 13:30:28 GMT, Andrew Leonard <aleonard at openjdk.org> wrote:

>> This PR fixes the non-deterministic behavior when building on linux with different userids or within
>> different workspace folders.
>> It fixes the following issues:
>> - MakeZipReproducible.java used to produce reproducible src.zip removes the optional zip "extra" field containing UID/GID.
>> - When absolute output paths are not allowed, enable the use of -fdebug-prefix-map to ensure debug symbol info does not contain the top level workspace folder.
>> - For reproducible builds ensure the gcc random symbol name generator is seeded using -frandom-seed.
>> - For reproducible builds when producing debug symbols use relative object paths for library linking to remove absolute MASM object paths.
>> 
>> Signed-off-by: Andrew Leonard <anleonar at redhat.com>
>
> Andrew Leonard has updated the pull request incrementally with one additional commit since the last revision:
> 
>   Trigger checks

Is it possible to pass the ".file" directive on the command line? It would certainly be nicer if this was setup by the compile command line, rather than forcing developers to change a line directive in the source code if they ever rename a file (even though the chances of this happening is rather slim.)

Or perhaps at least we can do something like:

.file FILENAME

and then pass `-DFILENAME=$1_RELATIVE_FILENAME` on the command line? Then we'd just need to add a bunch of never-changing lines to all assembly lines, as a boilerplate kind of thing. That sounds much more palatable to me.

-------------

PR: https://git.openjdk.java.net/jdk/pull/8124



More information about the build-dev mailing list