Init support of LoongArch64

This commit is contained in:
zhaixiang 2024-02-22 09:56:11 +08:00
parent d63d0beab0
commit 5b0dbd1031
2 changed files with 83305 additions and 2 deletions

83276
LoongArch64-support.patch Normal file

File diff suppressed because it is too large Load Diff

View File

@ -72,7 +72,7 @@
%global is_system_jdk 0
%global aarch64 aarch64 arm64 armv8
%global jit_arches x86_64 %{aarch64} riscv64
%global jit_arches x86_64 %{aarch64} loongarch64 riscv64
%global aot_arches x86_64 %{aarch64}
# Set of architectures for which java has short vector math library (libsvml.so)
@ -139,6 +139,9 @@
%ifarch %{aarch64}
%global archinstall aarch64
%endif
%ifarch loongarch64
%global archinstall loongarch64
%endif
%ifnarch %{jit_arches}
%global archinstall %{_arch}
%endif
@ -977,6 +980,13 @@ Patch6: rh1684077-openjdk_should_depend_on_pcsc-lite-libs_instead_of_pcsc-lite-d
Patch7: add-downgrade-the-glibc-symver-of-log2f-posix_spawn.patch
Patch8: add-downgrade-the-glibc-symver-of-memcpy.patch
############################################
#
# LoongArch64 specific patches
#
############################################
Patch2000: LoongArch64-support.patch
BuildRequires: autoconf
BuildRequires: automake
BuildRequires: alsa-lib-devel
@ -1009,7 +1019,11 @@ BuildRequires: pkgconfig
BuildRequires: xorg-x11-proto-devel
BuildRequires: zip
BuildRequires: javapackages-filesystem
%ifarch loongarch64
BuildRequires: java-21-openjdk-devel
%else
BuildRequires: java-latest-openjdk-devel
%endif
# Zero-assembler build requirement
%ifnarch %{jit_arches}
BuildRequires: libffi-devel
@ -1199,6 +1213,7 @@ fi
# Remove libraries that are linked
sh %{SOURCE12}
%ifnarch loongarch64
pushd %{top_level_dir_name}
%patch1 -p1
%patch2 -p1
@ -1207,6 +1222,13 @@ pushd %{top_level_dir_name}
%patch7 -p1
%patch8 -p1
popd # openjdk
%endif
%ifarch loongarch64
pushd %{top_level_dir_name}
%patch2000 -p1
popd
%endif
%patch1000
@ -1264,7 +1286,7 @@ export NUM_PROC=${NUM_PROC:-1}
[ ${NUM_PROC} -gt %{?_smp_ncpus_max} ] && export NUM_PROC=%{?_smp_ncpus_max}
%endif
%ifarch s390x sparc64 alpha %{power64} %{aarch64}
%ifarch s390x sparc64 alpha %{power64} %{aarch64} loongarch64
export ARCH_DATA_MODEL=64
%endif
%ifarch alpha
@ -1322,6 +1344,8 @@ elif [ "$ARCH" = "aarch64" ]; then
BOOTJDKPATH=$PWD/jdk-20.0.2+9
elif [ "$ARCH" = "riscv64" ]; then
:
elif [ "$ARCH" = "loongarch64" ]; then
:
else
echo " Failed to set BOOTJDKPATH "
exit 18
@ -1772,6 +1796,9 @@ cjc.mainProgram(arg)
%changelog
* Tue Feb 20 2024 Leslie Zhai <zhaixiang@loongson.cn> - 1:21.0.2.12-1
- init support of LoongArch64
* Mon Jan 22 2024 kuenking111 <wangkun49@huawei.com> - 1:21.0.2.12-0
- upgrade to jdk21.0.2-ga