On Thu, 6 Apr 2023 21:17:25 GMT, Glavo <d...@openjdk.org> wrote:

>> The point of Architecture is reflect the architecture as supported by the 
>> build and the runtime mutually and to reflect dependencies on the target 
>> hardware. 
>> 
>> What did you use as the example that would not compile on the other 
>> architecture?
>> Did you make the other changes to the build that would be needed for a new 
>> architecture?
>
>> 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.

@Glavo Arm32 builds, though, see GHAs (crossbuilding test). As for the others, 
as long as the ports have not been integrated into mainline, I expect port 
maintainers will adapt the enum downstream. They do this anyway.

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

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

Reply via email to