RFR: 8284661: Reproducible assembly builds without relative linking [v3]
Andrew Leonard
aleonard at openjdk.java.net
Wed Apr 13 07:52:14 UTC 2022
On Tue, 12 Apr 2022 10:27:30 GMT, Magnus Ihse Bursie <ihse at openjdk.org> wrote:
> Actually, a better option might be to let GCC append the `.file` automatically to all assembly files. I think this can be done by creating a file like `make/data/autoheaders/assemblyprefix.h` with:
>
> ```
> // ASSEMBLY_SRC_FILE gets replaced by relative or absolute file path
> // in NativeCompilation.gmk, this ensures reproducible .debuginfo
> .file ASSEMBLY_SRC_FILE
> ```
>
> and then add `-include $TOPDIR/make/data/autoheaders/assemblyprefix.h` to the gcc assembly command line.
>
> I have not verified this so it needs to be checked.
>
> I also think we should remove the `.file` keyword from the incubator files. (Nothing good can come out of having two `.file` attributes.)
@magicus this sounds good, i'll give it a try
-------------
PR: https://git.openjdk.java.net/jdk/pull/8177
More information about the hotspot-runtime-dev
mailing list