RFR: 8284661: Reproducible assembly builds without relative linking

Erik Joelsson erikj at openjdk.java.net
Mon Apr 11 17:01:34 UTC 2022


On Mon, 11 Apr 2022 12:55:16 GMT, Erik Joelsson <erikj at openjdk.org> wrote:

>> This PR removes the need for relative object file linking introduced by JDK-8284437 for linux libraries, by specifying
>> .file <relative source path> directives in the linux .S source files. The source files specify a .file ASSEMBLY_SRC_FILE
>> where ASSEMBLY_SRC_FILE is defined by the NativeCompliation.gmk.
>> 
>> Signed-off-by: Andrew Leonard <anleonar at redhat.com>
>
> Maybe some short explanation should be added as comment in the src files?
> 
> If this makes the debuginfo files free from absolute paths on Linux, could you also adjust `open/test/jdk/build/AbsPathsInImage.java` to include those files on Linux? Would be good to be able to catch any regression to this behavior in the future.

> thanks @erikj79 Not familiar with AbsPathsInImage, could you give some background please? wondering why it's not found these paths before, maybe it's not running on debugimages? What tier does it get run in?

I wrote this test when introducing the --disable-absolute-paths-in-output functionality, so we could verify that no absolute paths made it into any part of the output that we eventually ship to customers. I excluded all kinds of debuginfo files because I didn't know if they could be made free of absolute paths, and it was out of scope for what I was doing at the time. 

I believe we run this test as part of our tier2 internally at Oracle. I think generally it's an optional test as it relies on a specific build configuration that all builders of OpenJDK may not want to use.

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

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



More information about the build-dev mailing list