[jdk8u-dev] RFR: 8199138: Add RISC-V support to Zero
Dingli Zhang
dzhang at openjdk.org
Tue Sep 3 04:46:43 UTC 2024
Hi all,
I'd like to backport this patch to jdk8u. Since most linux distributions support riscv64 and provide zero version jdk8 for riscv64. However, we may need to do some workarounds each time we upgrade the version, so I think it is helpful to provide zero support for riscv64 here.
`common/autoconf/build-aux/config.guess` and `hotspot/src/os/linux/vm/os_linux.cpp` do not apply cleanly due to context difference, but it is easy to resolve them manually. `common/autoconf/platform.m4` just changed file path and remove test of `x$OPENJDK_$1_CPU`.
`common/autoconf/generated-configure.sh` regenerated by `bash common/autoconf/autogen.sh`. I used autoconf-2.69 and build from the [source](https://ftp.gnu.org/gnu/autoconf/autoconf-2.69.tar.gz) . But it looks a bit different from the one generated in the repo. I also tried autoconf-2.69 that comes with ubuntu 20.04 and the generated file is similar to the one in https://github.com/openjdk/jdk8u-dev/pull/413. I'm not quite sure which version of autoconf2.69 to use, if anyone has a better suggestion or is willing to help me generate a different one, I'd appreciate it!
Both cross-compile build and native build on riscv64 hardware is tested.
### cross-compile on x86
#### boot jdk
openjdk version "1.8.0_43"
OpenJDK Runtime Environment (build 1.8.0_43-b03)
OpenJDK 64-Bit Server VM (build 25.40-b25, mixed mode)
#### run on qemu
openjdk version "1.8.0_432-internal"
OpenJDK Runtime Environment (build 1.8.0_432-internal-zhangdingli_2024_09_02_21_37-b00)
OpenJDK 64-Bit Zero VM (build 25.432-b00, interpreted mode)
### native build on lp4a
#### boot jdk
openjdk version "1.8.0_412"
OpenJDK Runtime Environment Bisheng (build 1.8.0_412-b08)
OpenJDK 64-Bit Zero VM Bisheng (build 25.412-b08, interpreted mode)
#### run on lp4a
openjdk version "1.8.0_432-internal"
OpenJDK Runtime Environment (build 1.8.0_432-internal-openeuler_2024_09_02_21_38-b00)
OpenJDK 64-Bit Zero VM (build 25.432-b00, interpreted mode)
Thanks,
Dingli
-------------
Commit messages:
- 8199138: Add RISC-V support to Zero
Changes: https://git.openjdk.org/jdk8u-dev/pull/573/files
Webrev: https://webrevs.openjdk.org/?repo=jdk8u-dev&pr=573&range=00
Issue: https://bugs.openjdk.org/browse/JDK-8199138
Stats: 106 lines in 4 files changed: 34 ins; 0 del; 72 mod
Patch: https://git.openjdk.org/jdk8u-dev/pull/573.diff
Fetch: git fetch https://git.openjdk.org/jdk8u-dev.git pull/573/head:pull/573
PR: https://git.openjdk.org/jdk8u-dev/pull/573
More information about the jdk8u-dev
mailing list