On Wed, 6 Apr 2022 13:02:23 GMT, Erik Joelsson <er...@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 <anleo...@redhat.com> > > make/autoconf/flags-cflags.m4 line 109: > >> 107: workspace_root_trailing_slash="${WORKSPACE_ROOT%/}/" >> 108: >> DEBUG_PREFIX_CFLAGS="-fdebug-prefix-map=${workspace_root_trailing_slash}=" >> 109: FLAGS_COMPILER_CHECK_ARGUMENTS(ARGUMENT: [${DEBUG_PREFIX_CFLAGS}], > > Ideally capability checks for the compiler should be done separately for the > BUILD and TARGET compiler. If cross compiling, and using different versions > of GCC for the BUILD and TARGET, we may get into trouble. That is certainly a > rare case, but still something to be aware of at least. Not sure if it's > worth trying to fix. Thanks @erikj79 , yes this check is probably a bit muted here anyway, as according to reproducible-builds.org -fdebug-prefix-map is (available in all GCC versions, Clang 3.8) ------------- PR: https://git.openjdk.java.net/jdk/pull/8124