!534 Init support of LoogArch64

From: @lzhai 
Reviewed-by: @kuenking111 
Signed-off-by: @kuenking111
This commit is contained in:
openeuler-ci-bot 2024-02-06 02:49:45 +00:00 committed by Gitee
commit 574c28c3ec
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
2 changed files with 116380 additions and 7 deletions

116349
LoongArch64-support.patch Normal file

File diff suppressed because one or more lines are too long

View File

@ -53,9 +53,9 @@
%global aarch64 aarch64 %global aarch64 aarch64
%global riscv64 riscv64 %global riscv64 riscv64
%global jit_arches x86_64 %{aarch64} %global jit_arches x86_64 %{aarch64} loongarch64
%global sa_arches x86_64 %{aarch64} %global sa_arches x86_64 %{aarch64} loongarch64
%global jfr_arches x86_64 %{aarch64} %global jfr_arches x86_64 %{aarch64} loongarch64
# By default, we build a debug build during main build on JIT architectures # By default, we build a debug build during main build on JIT architectures
%global include_debug_build 1 %global include_debug_build 1
@ -121,6 +121,11 @@
%global stapinstall %{nil} %global stapinstall %{nil}
%endif %endif
%ifarch loongarch64
%global archinstall loongarch64
%global stapinstall loongarch64
%endif
%ifarch %{jit_arches} %ifarch %{jit_arches}
%global with_systemtap 1 %global with_systemtap 1
%else %else
@ -925,7 +930,7 @@ Provides: java-%{javaver}-%{origin}-accessibility%{?1} = %{epoch}:%{version}-%{r
Name: java-%{javaver}-%{origin} Name: java-%{javaver}-%{origin}
Version: %{javaver}.%{updatever}.%{buildver} Version: %{javaver}.%{updatever}.%{buildver}
Release: 0 Release: 1
# java-1.5.0-ibm from jpackage.org set Epoch to 1 for unknown reasons # java-1.5.0-ibm from jpackage.org set Epoch to 1 for unknown reasons
# and this change was brought into RHEL-4. java-1.5.0-ibm packages # and this change was brought into RHEL-4. java-1.5.0-ibm packages
# also included the epoch in their virtual provides. This created a # also included the epoch in their virtual provides. This created a
@ -1347,6 +1352,14 @@ Patch1000: rh1648249-add_commented_out_nss_cfg_provider_to_java_security.patch
# riscv64 support # riscv64 support
Patch2000: add-riscv64-support.patch Patch2000: add-riscv64-support.patch
############################################
#
# LoongArch64 specific patches
#
############################################
Patch4000: LoongArch64-support.patch
############################################# #############################################
# #
# Dependencies # Dependencies
@ -1635,6 +1648,7 @@ ln -s %{top_level_dir_name} jdk8
pushd %{top_level_dir_name} pushd %{top_level_dir_name}
# OpenJDK patches # OpenJDK patches
%ifnarch loongarch64
%patch8 -p1 %patch8 -p1
%patch10 -p1 %patch10 -p1
@ -1920,6 +1934,11 @@ pushd %{top_level_dir_name}
%patch416 -p1 %patch416 -p1
%patch417 -p1 %patch417 -p1
%patch418 -p1 %patch418 -p1
%endif
%ifarch loongarch64
%patch4000 -p1
%endif
%ifarch riscv64 %ifarch riscv64
%patch2000 -p1 %patch2000 -p1
@ -2042,17 +2061,17 @@ bash ${top_srcdir_abs_path}/configure \
--with-milestone="fcs" \ --with-milestone="fcs" \
--with-update-version=%{updatever} \ --with-update-version=%{updatever} \
--with-build-number=%{buildver} \ --with-build-number=%{buildver} \
%ifnarch loongarch64
--with-company-name="Bisheng" \ --with-company-name="Bisheng" \
--with-vendor-name="Bisheng" \ --with-vendor-name="Bisheng" \
%endif
--with-vendor-url="https://openeuler.org/" \ --with-vendor-url="https://openeuler.org/" \
--with-vendor-bug-url="https://gitee.com/src-openeuler/openjdk-1.8.0/issues/" \ --with-vendor-bug-url="https://gitee.com/src-openeuler/openjdk-1.8.0/issues/" \
--with-vendor-vm-bug-url="https://gitee.com/src-openeuler/openjdk-1.8.0/issues/" \ --with-vendor-vm-bug-url="https://gitee.com/src-openeuler/openjdk-1.8.0/issues/" \
--with-debug-level=$debugbuild \ --with-debug-level=$debugbuild \
--enable-unlimited-crypto \ --enable-unlimited-crypto \
%ifarch %{jit_arches} %ifarch aarch64
--enable-kae \ --enable-kae \
%else
--disable-kae \
%endif %endif
--with-stdc++lib=dynamic \ --with-stdc++lib=dynamic \
--with-extra-cflags="$EXTRA_CFLAGS" \ --with-extra-cflags="$EXTRA_CFLAGS" \
@ -2172,6 +2191,7 @@ done
# javaCalls.cpp:58 should map to: # javaCalls.cpp:58 should map to:
# http://hg.openjdk.java.net/jdk8u/jdk8u/hotspot/file/ff3b27e6bcc2/src/share/vm/runtime/javaCalls.cpp#l58 # http://hg.openjdk.java.net/jdk8u/jdk8u/hotspot/file/ff3b27e6bcc2/src/share/vm/runtime/javaCalls.cpp#l58
# Using line number 1 might cause build problems. # Using line number 1 might cause build problems.
%ifnarch loongarch64
gdb -q "$JAVA_HOME/bin/java" <<EOF | tee gdb.out gdb -q "$JAVA_HOME/bin/java" <<EOF | tee gdb.out
handle SIGSEGV pass nostop noprint handle SIGSEGV pass nostop noprint
handle SIGILL pass nostop noprint handle SIGILL pass nostop noprint
@ -2183,6 +2203,7 @@ quit
end end
run -version run -version
EOF EOF
%endif
#grep 'JavaCallWrapper::JavaCallWrapper' gdb.out #grep 'JavaCallWrapper::JavaCallWrapper' gdb.out
# Check src.zip has all sources. See RHBZ#1130490 # Check src.zip has all sources. See RHBZ#1130490
@ -2571,6 +2592,9 @@ cjc.mainProgram(arg)
%endif %endif
%changelog %changelog
* Wed Jan 31 2024 Leslie Zhai <zhaixiang@loongson.cn> - 1:1.8.0.402-b06.1
- Init support of LoogArch64
* Wed Jan 17 2024 Autistic_boyya <wangzhongyi7@huawei.com> - 1:1.8.0.402-b06.0 * Wed Jan 17 2024 Autistic_boyya <wangzhongyi7@huawei.com> - 1:1.8.0.402-b06.0
- modified 0019-8040213-C2-does-not-put-all-modified-nodes-on-IGVN-w.patch - modified 0019-8040213-C2-does-not-put-all-modified-nodes-on-IGVN-w.patch
- modified Improve_AlgorithmConstraints_checkAlgorithm_performance.patch - modified Improve_AlgorithmConstraints_checkAlgorithm_performance.patch