Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8217739

Cannot reuse java.base UnixConstants.java from target in BuildJDK when cross compiling

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P4
    • 13
    • 13
    • infrastructure
    • None
    • b25

    Backports

      Description

        This issue was brought up on build-dev here: http://mail.openjdk.java.net/pipermail/build-dev/2019-January/024729.html

        On some target platforms, some values in UnixConstants.java get different values compared to linux-x64. This causes cross compilation of those targets from linux-x64 to fail. The failure happens when the newly constructed BuildJDK is used to run jmod/jlink using the UnixConstants.class created for the target.

        When we cross compile, the default behavior is to create a BuildJDK on the fly, but for efficiency reasons, we try to reuse as much as possible of the JDK built for the target. One such reuse is all class files as they were assumed to be equivalent. We now have an example of where they aren't.

        I think the simplest solution to this is to stop reusing all of java.base classes and let the BuildJDK build gensrc and compile those classes separately.

        Attachments

          Issue Links

            Activity

              People

                erikj Erik Joelsson
                erikj Erik Joelsson
                Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                  Created:
                  Updated:
                  Resolved: