RFR: 8304915: Create jdk.internal.util.Architecture enum and apply [v7]

Glavo duke at openjdk.org
Thu Apr 6 21:20:20 UTC 2023


On Thu, 6 Apr 2023 20:56:42 GMT, Roger Riggs <rriggs at openjdk.org> wrote:

> What did you use as the example that would not compile on the other architecture? 

https://github.com/openjdk/jdk/blob/52ca4a70fc3de9e285964f9545ea8cd54e2d9924/src/java.base/share/classes/jdk/internal/util/OperatingSystemProps.java.template#L40

I don't understand how the above code can be compiled on architectures such as LongArch64, MIPS64el, or ARM32 without modifying the source file.

> Did you make the other changes to the build that would be needed for a new architecture?

I'm not talking about the new architecture, I'm talking about the architecture that OpenJDK already supports. 

According to my understanding, the above code breaks the support of all architectures not listed in `Architecture`. But has `Architecture` really listed all the supported architectures in the OpenJDK mainline?

For example, I want to compile OpenJDK for 32-bit ARM.  I think in this PR, I cannot compile without modifying the source code because `TARGET_ARCH_arm` does not exist. But before this PR, I was able to compile.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/13357#discussion_r1160266038



More information about the build-dev mailing list