From 2dc31a54cc38e40324a437a192da8e964e8d4904 Mon Sep 17 00:00:00 2001 From: Weisson Date: Thu, 18 Jan 2024 16:38:01 +0800 Subject: [PATCH] update config to support sw64 Architecture. Signed-off-by: Weisson --- 2002-rpm-anolis-support-sw_64.patch | 53 +++++++++++++++++++++++++++++ rpm.spec | 6 +++- 2 files changed, 58 insertions(+), 1 deletion(-) create mode 100644 2002-rpm-anolis-support-sw_64.patch diff --git a/2002-rpm-anolis-support-sw_64.patch b/2002-rpm-anolis-support-sw_64.patch new file mode 100644 index 0000000..0fdee40 --- /dev/null +++ b/2002-rpm-anolis-support-sw_64.patch @@ -0,0 +1,53 @@ +From 8f1f102e29093740b8d0ebde97dbec84a2e36b73 Mon Sep 17 00:00:00 2001 +From: Weisson +Date: Thu, 18 Jan 2024 16:28:07 +0800 +Subject: [PATCH] update config utils to support sw. + +Signed-off-by: Weisson +--- + config.guess | 8 ++++++++ + config.sub | 2 ++ + 2 files changed, 10 insertions(+) + +diff --git a/config.guess b/config.guess +index f32079a..5fa922c 100755 +--- a/config.guess ++++ b/config.guess +@@ -921,6 +921,14 @@ EOF + ppc64:Linux:*:*) + echo powerpc64-unknown-linux-gnu + exit ;; ++ sw_64:Linux:*:*) ++ case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in ++ sw) UNAME_MACHINE=sw_64 ;; ++ esac ++ objdump --private-headers /bin/sh | grep -q ld.so.1 ++ if test "$?" = 0 ; then LIBC=gnulibc1 ; fi ++ echo ${UNAME_MACHINE}-sunway-linux-${LIBC} ++ exit ;; + alpha:Linux:*:*) + case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in + EV5) UNAME_MACHINE=alphaev5 ;; +diff --git a/config.sub b/config.sub +index 6759825..8273800 100755 +--- a/config.sub ++++ b/config.sub +@@ -238,6 +238,7 @@ case $basic_machine in + # Some are omitted here because they have special meanings below. + 1750a | 580 \ + | a29k \ ++ | sw_64 \ + | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ + | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ + | am33_2.0 \ +@@ -314,6 +315,7 @@ case $basic_machine in + # Recognize the basic CPU types with company name. + 580-* \ + | a29k-* \ ++ | sw_64-* \ + | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \ + | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ + | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \ +-- +2.31.1 + diff --git a/rpm.spec b/rpm.spec index 7fbb2be..548131c 100644 --- a/rpm.spec +++ b/rpm.spec @@ -1,4 +1,4 @@ -%define anolis_release .0.2 +%define anolis_release .0.3 %define _legacy_common_support 1 # build against xz? %bcond_without xz @@ -151,6 +151,7 @@ Patch1002: rpm-4.14.2-unversioned-python.patch Patch2000: 1000-rpm-anolis-support-loongarch.patch Patch2001: rpm-4.14.3-sw.patch +Patch2002: 2002-rpm-anolis-support-sw_64.patch # Partially GPL/LGPL dual-licensed and some bits with BSD # SourceLicense: (GPLv2+ and LGPLv2+ with exceptions) and BSD @@ -700,6 +701,9 @@ make check || cat tests/rpmtests.log %doc doc/librpm/html/* %changelog +* Thu Jan 18 2024 Weisson - 4.14.3-24.0.3 +- update config to support sw64 Architecture. + * Thu May 12 2023 hpp - 4.14.3-24.0.2 - Add sw64 Architecture -- Gitee