From 377f33c6277e85ab3b99a73831edf227d5f2b203 Mon Sep 17 00:00:00 2001 From: zhangshaoning Date: Mon, 21 Apr 2025 16:34:49 +0800 Subject: [PATCH] Add sw_64 support --- nss-3.94-sw.patch | 61 +++++++++++++++++++++++++++++++++++++++++++++++ nss.spec | 11 ++++++++- 2 files changed, 71 insertions(+), 1 deletion(-) create mode 100644 nss-3.94-sw.patch diff --git a/nss-3.94-sw.patch b/nss-3.94-sw.patch new file mode 100644 index 0000000..29d20bb --- /dev/null +++ b/nss-3.94-sw.patch @@ -0,0 +1,61 @@ +From 3718a4a04c715ef068f8daaaa2ce7f29e78d0688 Mon Sep 17 00:00:00 2001 +From: zhangxianting +Date: Mon, 18 Nov 2024 17:37:01 +0800 +Subject: [PATCH] nss 3.94 sw + +--- + coreconf/Linux.mk | 5 +++++ + coreconf/config.gypi | 7 ++++++- + 2 files changed, 11 insertions(+), 1 deletion(-) + +diff --git a/coreconf/Linux.mk b/coreconf/Linux.mk +index dcb4324..455cf28 100644 +--- a/coreconf/Linux.mk ++++ b/coreconf/Linux.mk +@@ -97,6 +97,10 @@ else + 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 +@@ -107,6 +111,7 @@ endif + endif + endif + endif ++endif + + + ifneq ($(OS_TARGET),Android) +diff --git a/coreconf/config.gypi b/coreconf/config.gypi +index 13f857c..17dbfa9 100644 +--- a/coreconf/config.gypi ++++ b/coreconf/config.gypi +@@ -218,7 +218,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', + ], +@@ -519,6 +519,11 @@ + 'ARCHS': ['arm64'], + }, + }], ++ [ 'target_arch=="sw_64"', { ++ 'xcode_settings': { ++ 'ARCHS': ['sw_64'], ++ }, ++ }], + ], + }], + [ 'OS=="ios"', { +-- +2.31.1 + diff --git a/nss.spec b/nss.spec index 7f8cc9b..df64c8c 100644 --- a/nss.spec +++ b/nss.spec @@ -26,7 +26,7 @@ Summary: Network Security Services Name: nss Version: %{nss_version} -Release: 7 +Release: 8 License: MPLv2.0 URL: http://www.mozilla.org/projects/security/pki/nss/ Provides: nss-system-init @@ -60,6 +60,7 @@ Patch9003: Feature-nss-support-SM2-signature-algorithm.patch Patch9004: Feature-nss-fix-the-certificate-resolution-in-sm2.patch Patch9005: Feature-fix-sm2-sm3-code-error.patch Patch9006: Feature-fix-sm3-code-error.patch +Patch9007: nss-3.94-sw.patch %description Network Security Services (NSS) is a set of libraries designed to @@ -150,6 +151,7 @@ pushd nss %patch9004 -p1 %patch9005 -p1 %patch9006 -p1 +%patch9007 -p1 popd %build @@ -186,6 +188,10 @@ export NSPR_LIB_DIR=%{_libdir} export NSS_USE_SYSTEM_SQLITE=1 export NSS_ALLOW_SSLKEYLOGFILE=1 +%ifarch sw_64 +export NSS_DISABLE_GTESTS=1 +%endif + %if %{with dbm} %else export NSS_DISABLE_DBM=1 @@ -572,6 +578,9 @@ update-crypto-policies &>/dev/null||: %doc %{_mandir}/man* %changelog +* Tue Feb 18 2025 zhangshaoning - 3.94.0-8 +- Add sw_64 support + * Fri Oct 11 2024 fuanan - 3.94.0-7 - Add the crypto-policies-scripts Requires -- Gitee