Use fixed timestamp as an alternative of __DATE__ macro in jdk.jdi to make Windows build reproducible

XMLWordPrintable

    • Type: Enhancement
    • Resolution: Fixed
    • Priority: P4
    • 19
    • Affects Version/s: 8, 11, 13, 15, 17, 18, 19
    • Component/s: core-svc
    • Environment:

      Microsoft Windows 10 Pro 10.0.19044 Build 19044

      Microsoft Visual Studio Community 2019 Version 16.11.14

    • b26
    • x86
    • windows

      Building of jdk-11 with

      bash ./configure --with-boot-jdk=../boot-jdk/jdk-11 --with-hotspot-build-time="2022-06-7 10:57am" --with-extra-cflags="/experimental:deterministic" --with-extra-cxxflags="/experimental:deterministic"

      causes the following errors

      * For target support_native_jdk.jdi_libdt_shmem_shmemBase.obj:
      shmemBase.c
      ./src/jdk.jdi/share/native/libdt_shmem/shmemBase.c(1051): error C2220: the following warning is treated as an error
      ./src/jdk.jdi/share/native/libdt_shmem/shmemBase.c(1051): warning C5048: Use of macro '__DATE__' may result in non-deterministic output
      ./src/jdk.jdi/share/native/libdt_shmem/shmemBase.c(1051): note: to simplify migration, consider the temporary use of /Wv:18 flag with the version of the compiler with which you used to build without warnings

      The problem stays actual in the upstream in the case of debug builds

            Assignee:
            Alexey Pavlyutkin
            Reporter:
            Alexey Pavlyutkin
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: