Sw64: Add support for sw_64 architecture.

This commit is contained in:
swcompiler 2025-04-02 11:09:04 +08:00
parent 9bc5d41ed5
commit d9c2f6b233
2 changed files with 88766 additions and 6 deletions

88728
add-sw_64-support.patch Normal file

File diff suppressed because it is too large Load Diff

View File

@ -123,6 +123,9 @@
%ifarch %{ppc64le} %ifarch %{ppc64le}
%global archinstall ppc64le %global archinstall ppc64le
%endif %endif
%ifarch sw_64
%global archinstall sw64
%endif
%global with_systemtap 1 %global with_systemtap 1
@ -459,7 +462,9 @@ exit 0
%{_jvmdir}/%{sdkdir -- %{?1}}/bin/rmiregistry %{_jvmdir}/%{sdkdir -- %{?1}}/bin/rmiregistry
%{_jvmdir}/%{sdkdir -- %{?1}}/bin/unpack200 %{_jvmdir}/%{sdkdir -- %{?1}}/bin/unpack200
%dir %{_jvmdir}/%{sdkdir -- %{?1}}/lib %dir %{_jvmdir}/%{sdkdir -- %{?1}}/lib
%ifnarch sw_64
%{_jvmdir}/%{sdkdir -- %{?1}}/lib/classlist %{_jvmdir}/%{sdkdir -- %{?1}}/lib/classlist
%endif
%{_jvmdir}/%{sdkdir -- %{?1}}/lib/jexec %{_jvmdir}/%{sdkdir -- %{?1}}/lib/jexec
%{_jvmdir}/%{sdkdir -- %{?1}}/lib/jspawnhelper %{_jvmdir}/%{sdkdir -- %{?1}}/lib/jspawnhelper
%{_jvmdir}/%{sdkdir -- %{?1}}/lib/jrt-fs.jar %{_jvmdir}/%{sdkdir -- %{?1}}/lib/jrt-fs.jar
@ -576,7 +581,7 @@ exit 0
%{_jvmdir}/%{sdkdir -- %{?1}}/bin/jstatd %{_jvmdir}/%{sdkdir -- %{?1}}/bin/jstatd
%{_jvmdir}/%{sdkdir -- %{?1}}/bin/rmic %{_jvmdir}/%{sdkdir -- %{?1}}/bin/rmic
%{_jvmdir}/%{sdkdir -- %{?1}}/bin/serialver %{_jvmdir}/%{sdkdir -- %{?1}}/bin/serialver
%ifnarch loongarch64 %ifnarch loongarch64 sw_64
%ifarch %{aarch64} x86_64 %ifarch %{aarch64} x86_64
%{_jvmdir}/%{sdkdir -- %{?1}}/bin/jaotc %{_jvmdir}/%{sdkdir -- %{?1}}/bin/jaotc
%endif %endif
@ -768,7 +773,7 @@ Provides: java-src%{?1} = %{epoch}:%{version}-%{release}
Name: java-%{javaver}-%{origin} Name: java-%{javaver}-%{origin}
Version: %{newjavaver}.%{buildver} Version: %{newjavaver}.%{buildver}
Release: 1 Release: 2
# 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
@ -909,6 +914,13 @@ Patch94: change-ActivePrcoessorCount-only-for-HBase.patch
############################################ ############################################
Patch2000: Add-riscv64-support.patch Patch2000: Add-riscv64-support.patch
############################################
#
# sw64 specific patches
#
############################################
Patch6000: add-sw_64-support.patch
BuildRequires: elfutils-extra BuildRequires: elfutils-extra
BuildRequires: autoconf BuildRequires: autoconf
BuildRequires: alsa-lib-devel BuildRequires: alsa-lib-devel
@ -1140,7 +1152,7 @@ fi
pushd %{top_level_dir_name} pushd %{top_level_dir_name}
# OpenJDK patches # OpenJDK patches
%ifnarch loongarch64 ppc64le %ifnarch loongarch64 ppc64le sw_64
%ifarch riscv64 %ifarch riscv64
%patch2000 -p1 %patch2000 -p1
%else %else
@ -1200,6 +1212,9 @@ pushd %{top_level_dir_name}
%ifarch loongarch64 %ifarch loongarch64
%patch2001 -p1 %patch2001 -p1
%endif %endif
%ifarch sw_64
%patch6000 -p1
%endif
popd # openjdk popd # openjdk
# Extract systemtap tapsets # Extract systemtap tapsets
@ -1258,7 +1273,7 @@ export NUM_PROC=${NUM_PROC:-1}
[ ${NUM_PROC} -gt %{?_smp_ncpus_max} ] && export NUM_PROC=%{?_smp_ncpus_max} [ ${NUM_PROC} -gt %{?_smp_ncpus_max} ] && export NUM_PROC=%{?_smp_ncpus_max}
%endif %endif
%ifarch %{aarch64} riscv64 %ifarch %{aarch64} riscv64 sw_64
export ARCH_DATA_MODEL=64 export ARCH_DATA_MODEL=64
%endif %endif
@ -1290,7 +1305,9 @@ bash ../configure \
--with-version-opt="" \ --with-version-opt="" \
--with-vendor-version-string="%{vendor_version_string}" \ --with-vendor-version-string="%{vendor_version_string}" \
%ifnarch loongarch64 ppc64le %ifnarch loongarch64 ppc64le
--with-vendor-name="BiSheng" \ %ifnarch sw_64
--with-vendor-name="BiSheng" \
%endif
%endif %endif
%ifarch loongarch64 %ifarch loongarch64
--with-vendor-name="Loongson" \ --with-vendor-name="Loongson" \
@ -1301,17 +1318,29 @@ bash ../configure \
--with-boot-jdk=/usr/lib/jvm/java-%{buildjdkver}-openjdk \ --with-boot-jdk=/usr/lib/jvm/java-%{buildjdkver}-openjdk \
--with-debug-level=$debugbuild \ --with-debug-level=$debugbuild \
--with-native-debug-symbols=internal \ --with-native-debug-symbols=internal \
%ifarch sw_64
--with-jvm-variants=custom \
--with-jvm-features=serialgc,vm-structs,parallelgc,compiler2,management,nmt,g1gc,cmsgc,jvmti,services,jni-check,jfr \
--with-zlib=bundled \
%else
--enable-unlimited-crypto \ --enable-unlimited-crypto \
--with-zlib=system \ --with-zlib=system \
%endif
--with-libjpeg=system \ --with-libjpeg=system \
--with-giflib=system \ --with-giflib=system \
--with-libpng=system \ --with-libpng=system \
--with-lcms=system \ --with-lcms=system \
--with-harfbuzz=system \ --with-harfbuzz=system \
--with-stdc++lib=dynamic \ --with-stdc++lib=dynamic \
%ifarch sw_64
--with-extra-cflags=" -mieee -Wno-error=maybe-uninitialized -Wno-error=deprecated-declarations -Wno-error=type-limits -Wno-error=format-security -Wno-error=conversion-null -Wno-error=sign-compare -Wno-error=int-to-pointer-cast -mgprel-size=32" \
--with-extra-cxxflags="-mieee -Wno-error=maybe-uninitialized -Wno-error=deprecated-declarations -Wno-error=type-limits -Wno-error=format-security -Wno-error=conversion-null -Wno-error=sign-compare -Wno-error=int-to-pointer-cast -mgprel-size=32" \
--with-extra-ldflags=" -mieee -Wl,-no-relax" \
%else
--with-extra-cxxflags="$EXTRA_CPP_FLAGS" \ --with-extra-cxxflags="$EXTRA_CPP_FLAGS" \
--with-extra-cflags="$EXTRA_CFLAGS" \ --with-extra-cflags="$EXTRA_CFLAGS" \
--with-extra-ldflags="%{ourldflags}" \ --with-extra-ldflags="%{ourldflags}" \
%endif
--with-num-cores="$NUM_PROC" \ --with-num-cores="$NUM_PROC" \
--disable-javac-server \ --disable-javac-server \
--disable-warnings-as-errors \ --disable-warnings-as-errors \
@ -1715,6 +1744,9 @@ cjc.mainProgram(args) -- the returns from copy_jdk_configs.lua should not affect
%changelog %changelog
* Tue Apr 1 2025 2025 swcompiler <lc@wxiat.cn> - 1:11.0.26.4-2
- add sw64 port to 11.0.26
* Wed Feb 12 2025 Dingli Zhang <dingli@iscas.ac.cn> - 1:11.0.26.4-1 * Wed Feb 12 2025 Dingli Zhang <dingli@iscas.ac.cn> - 1:11.0.26.4-1
- update riscv64 port to 11.0.26 - update riscv64 port to 11.0.26
@ -1746,7 +1778,7 @@ cjc.mainProgram(args) -- the returns from copy_jdk_configs.lua should not affect
* Thu Aug 1 2024 aoqi <aoqi@loongson.cn> - 1.11.0.24.8-5 * Thu Aug 1 2024 aoqi <aoqi@loongson.cn> - 1.11.0.24.8-5
- update LoongArch64 port to 11.0.24 - update LoongArch64 port to 11.0.24
* Thu Jul 29 2024 DXwangg <wangjiawei80@huawei.com> - 1.11.0.24.8-4 * Mon Jul 29 2024 DXwangg <wangjiawei80@huawei.com> - 1.11.0.24.8-4
- modified delete_expired_certificates.patch - modified delete_expired_certificates.patch
* Thu Jul 25 2024 songliyang <songliyang@kylinos.cn> - 1.11.0.24.8-3 * Thu Jul 25 2024 songliyang <songliyang@kylinos.cn> - 1.11.0.24.8-3