From f6625026c6092cd901a46d67ccb27a18d4ab2f72 Mon Sep 17 00:00:00 2001 From: yangguanghui Date: Wed, 12 Mar 2025 10:55:44 +0800 Subject: [PATCH] Add sw_64 native compiler support. Project:TC2024110202 --- nss-3.101-sw.patch | 44 ++++++++++++++++++++++++++++++++++++++++++++ nss.spec | 6 +++++- 2 files changed, 49 insertions(+), 1 deletion(-) create mode 100644 nss-3.101-sw.patch diff --git a/nss-3.101-sw.patch b/nss-3.101-sw.patch new file mode 100644 index 0000000..fd40b9b --- /dev/null +++ b/nss-3.101-sw.patch @@ -0,0 +1,44 @@ +diff -Nur nss-orig/coreconf/Linux.mk nss-mody/coreconf/Linux.mk +--- nss-orig/coreconf/Linux.mk 2025-03-12 10:43:17.792268444 +0800 ++++ nss-mody/coreconf/Linux.mk 2025-03-12 10:45:07.099141259 +0800 +@@ -97,11 +97,16 @@ + ifeq ($(OS_TEST),sh4a) + CPU_ARCH = sh4 + else ++ifeq ($(OS_TEST),sw_64) ++ OS_REL_CFLAGS = -D_ALPHA_ ++ CPU_ARCH = sw_64 ++else + # $(OS_TEST) == m68k, ppc, ia64, sparc, s390, s390x, mips, sh3, sh4 + CPU_ARCH = $(OS_TEST) + endif + endif + endif ++endif + endif + endif + endif +diff -Nur nss-orig/coreconf/config.gypi nss-mody/coreconf/config.gypi +--- nss-orig/coreconf/config.gypi 2025-03-12 10:43:17.792268444 +0800 ++++ nss-mody/coreconf/config.gypi 2025-03-12 10:46:51.469019831 +0800 +@@ -229,7 +229,7 @@ + }, + }, + }], +- [ 'target_arch=="arm64" or target_arch=="aarch64" or target_arch=="sparc64" or target_arch=="ppc64" or target_arch=="ppc64le" or target_arch=="s390x" or target_arch=="mips64" or target_arch=="e2k" or target_arch=="riscv64" or target_arch=="loongarch64"', { ++ [ 'target_arch=="arm64" or target_arch=="aarch64" or target_arch=="sparc64" or target_arch=="ppc64" or target_arch=="ppc64le" or target_arch=="s390x" or target_arch=="mips64" or target_arch=="e2k" or target_arch=="riscv64" or target_arch=="sw_64" or target_arch=="loongarch64"', { + 'defines': [ + 'NSS_USE_64', + ], +@@ -530,6 +530,11 @@ + 'ARCHS': ['arm64'], + }, + }], ++ [ 'target_arch=="sw_64"', { ++ 'xcode_settings': { ++ 'ARCHS': ['sw_64'], ++ }, ++ }], + ], + }], + [ 'OS=="ios"', { diff --git a/nss.spec b/nss.spec index 40a0e7f..0de2819 100644 --- a/nss.spec +++ b/nss.spec @@ -1,4 +1,4 @@ -%define anolis_release 1 +%define anolis_release 2 %global nspr_version 4.35 %global nss_version 3.101 %global baserelease 1 @@ -83,6 +83,7 @@ BuildRequires: %{name}-softokn sqlite-devel zlib-devel nspr-devel >= %{nss_ve Patch4: iquote.patch Patch12: %{name}-signtool-format.patch Patch40: %{name}-no-dbm-man-page.patch +Patch41: %{name}-3.101-sw.patch %description Network Security Services (NSS) is a set of libraries designed to @@ -752,6 +753,9 @@ update-crypto-policies &> /dev/null || : %doc %{name}/readme.md %{name}/trademarks.txt %{name}/help.txt %{name}/doc/README %changelog +* Wed Mar 12 2025 yangguanghui - 3.101-2 +- Add sw_64 native compiler support. + * Mon Oct 28 2024 mgb01105731 - 3.101-1 - New version 3.101 -- Gitee