RFR: 8304006: jlink should create the jimage file in the native endian for the target platform [v4]
Jaikiran Pai
jpai at openjdk.org
Mon Mar 13 10:35:27 UTC 2023
On Sun, 12 Mar 2023 09:15:20 GMT, Alan Bateman <alanb at openjdk.org> wrote:
> When cross linking and the target platform is unknown then it might be better to have this fail rather than defaulting to the endianness of the current platform, otherwise this risks create a run-time image that is not usable.
I wasn't sure if we wanted to fail such cases when generating the image, but like you say, the generate image would be unusable anyway. I've now followed your suggestion to fail in such cases.
> I see you've listed a bunch of unknown platforms in the list. If getNativeEndianOfTargetPlatform fails when it encounters an unknown platform then help downstream porters to know that there is something to look at here.
I borrowed that list from our current build file here https://github.com/openjdk/jdk/blob/master/make/autoconf/platform.m4#L26. I think it's likely that it isn't the current supported list of platforms. I checked the `porters-dev` mailing list and I see that recently we have created this wiki which lists the supported platforms https://wiki.openjdk.org/display/HotSpot/Ports. Based on that I've trimmed down this list in the code (I continue to include `loongarch64` because I recently saw some PR which dealt with that architecture in mainline). Having said that, it might be that this too isn't the fully accurate list, so please let me know if this needs additional changes.
-------------
PR: https://git.openjdk.org/jdk/pull/11943
More information about the core-libs-dev
mailing list