RFR: 8284661: Reproducible assembly builds without relative linking [v5]

Andrew Leonard aleonard at openjdk.java.net
Thu Apr 14 11:16:17 UTC 2022


On Thu, 14 Apr 2022 10:13:32 GMT, Maxim Kartashev <duke at openjdk.java.net> wrote:

>> Andrew Leonard has updated the pull request incrementally with two additional commits since the last revision:
>> 
>>  - 8284661: Reproducible assembly builds without relative linking
>>    
>>    Signed-off-by: Andrew Leonard <anleonar at redhat.com>
>>  - 8284661: Reproducible assembly builds without relative linking
>>    
>>    Signed-off-by: Andrew Leonard <anleonar at redhat.com>
>
> make/data/autoheaders/assemblyprefix.h line 25:
> 
>> 23: 
>> 24: // ASSEMBLY_SRC_FILE gets replaced by relative or absolute file path
>> 25: // in NativeCompilation.gmk, this ensures reproducible .debuginfo
> 
> Actually, this ensures reproducible object file (`.o`) rather than the contents of `.debuginfo`. As far as I remember, `gcc` uses the "value" of `.file` in `.debuginfo`, but `clang` does not. Which is why the path mapping option is still necessary even with `.file` present and with a value stable across builds.
> 
> Maybe phrase this something like
> 
> ... this ensures a reproducible object file through a predictable value of the STT_FILE symbol.
> 
> ?

@mkartashev thanks. So at the moment we are only using this assembly header for gcc tooling, see NativeCompliation.gmk change.
So maybe I change this to specifically state gcc and it's effect on linux debuginfo ?

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

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



More information about the build-dev mailing list