[jdk11u-dev] RFR: 8244592: Start supporting SOURCE_DATE_EPOCH

Matthias Baesken mbaesken at openjdk.org
Tue Dec 20 08:23:49 UTC 2022


On Thu, 15 Dec 2022 07:50:13 GMT, Christoph Langer <clanger at openjdk.org> wrote:

> After the backport of [JDK-8257679](https://bugs.openjdk.org/browse/JDK-8257679), a non-debug build on Windows in a build directory that's outside the repository will fail. The problem unveiled by the backport is that in those builds, the `ALLOW_ABSOLUTE_PATHS_IN_OUTPUT` flag is set to false, causing the code [here](https://github.com/openjdk/jdk11u-dev/blob/12eca2f8ac6e8127f1d698aef50db03cf278a7b8/make/common/NativeCompilation.gmk#L220) to relativize the make command. This seemed to have worked fine with the old fixpath before [JDK-8257679](https://bugs.openjdk.org/browse/JDK-8257679) but now it breaks the build.
> In later releases, we get new code by [JDK-8256240](https://bugs.openjdk.org/browse/JDK-8256240) that removes the absolute paths on Windows by setting a new compiler option. After the change, `FILE_MACRO_CFLAGS` is set (e.g. [here](https://github.com/openjdk/jdk17u-dev/blob/399a52dccb2a53a4309fdff479a14d944829cd54/make/autoconf/flags-cflags.m4#L823)) which will cause MakeCommandRelative to not relativize the paths in NativeCompilation.gmk.
> 
> I propose to backport this behavior to jdk11u by backporting [JDK-8244592 Start supporting SOURCE_DATE_EPOCH](https://bugs.openjdk.org/browse/JDK-8244592) and [JDK-8256240 Reproducible builds should turn on the "deterministic" flag for Visual Studio](https://bugs.openjdk.org/browse/JDK-8256240). This will bring some functionality of reproducible builds to jdk11u. I don't see an issue with that, since the behavior is off by default. The only larger risk I see is whether the newly used Visual Studio compiler options could break existing downstream builds on older VS versions. However, if such a thing occurs, we could add a condition to fall back to the old behavior then.
> 
> As for this backport:
> I bring in a part of [JDK-8240820](https://bugs.openjdk.org/browse/JDK-8240820), namely the new configure function `UTIL_ARG_ENABLE` which is used by [JDK-8244592](https://bugs.openjdk.org/browse/JDK-8244592). Furthermore I incorporated the changes to jdk-options.m4 of the already backported [JDK-8257679](https://bugs.openjdk.org/browse/JDK-8257679), which didn't fit at that time.

LGTM

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

Marked as reviewed by mbaesken (Reviewer).

PR: https://git.openjdk.org/jdk11u-dev/pull/1597


More information about the jdk-updates-dev mailing list