From 740e64f50f8edbd036787c6b1c17ed3f74e66644 Mon Sep 17 00:00:00 2001 From: Funda Wang Date: Mon, 13 Jan 2025 00:16:32 +0800 Subject: [PATCH] support sw_64 arch --- 0001-support-sw_64-arch.patch | 44 +++++++++++++++++++++++++++++++++++ macros | 2 +- openEuler-rpm-config.spec | 6 ++++- 3 files changed, 50 insertions(+), 2 deletions(-) create mode 100644 0001-support-sw_64-arch.patch diff --git a/0001-support-sw_64-arch.patch b/0001-support-sw_64-arch.patch new file mode 100644 index 0000000..2e150e4 --- /dev/null +++ b/0001-support-sw_64-arch.patch @@ -0,0 +1,44 @@ +From 62d742713b0d6ed67fad52821541a7d83f4ce702 Mon Sep 17 00:00:00 2001 +From: Funda Wang +Date: Sun, 12 Jan 2025 23:02:47 +0800 +Subject: [PATCH] support sw_64 arch + +--- + config.guess | 8 ++++++++ + config.sub | 1 + + 2 files changed, 9 insertions(+) + +diff --git a/config.guess b/config.guess +index 48a6846..b8fc0ac 100755 +--- a/config.guess ++++ b/config.guess +@@ -1194,6 +1186,14 @@ EOF + sparc:Linux:*:* | sparc64:Linux:*:*) + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC + ;; ++ sw_64:Linux:*:*) ++ case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' /proc/cpuinfo 2>/dev/null` in ++ sw) UNAME_MACHINE=sw_64 ;; ++ esac ++ objdump --private-headers /bin/sh | grep -q ld.so.1 ++ if test "$?" = 0 ; then LIBC=gnulibc1 ; fi ++ GUESS=$UNAME_MACHINE-sunway-linux-$LIBC ++ ;; + tile*:Linux:*:*) + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC + ;; +diff --git a/config.sub b/config.sub +index 4aaae46..d49ee9b 100755 +--- a/config.sub ++++ b/config.sub +@@ -1432,6 +1431,7 @@ case $cpu-$vendor in + | sparcv9v \ + | spu \ + | sv1 \ ++ | sw_64 \ + | sx* \ + | tahoe \ + | thumbv7* \ +-- +2.46.0 + diff --git a/macros b/macros index d3c404e..47926b5 100644 --- a/macros +++ b/macros @@ -412,7 +412,7 @@ for k,_ in pairs(stripped_flags) do print(k .. " ") end %pkg_vcmp() (%{expand:%%{pkg_version_cmp %1 %3}} %2 0) #arches macros -%generic_arches %{ix86} x86_64 %{arm} aarch64 loongarch64 powerpc64le ppc64le +%generic_arches %{ix86} x86_64 %{arm} aarch64 loongarch64 powerpc64le ppc64le sw_64 %ldc_arches %{generic_arches} %valgrind_arches %{generic_arches} %nodejs_arches %{generic_arches} riscv64 diff --git a/openEuler-rpm-config.spec b/openEuler-rpm-config.spec index 84ae0c7..07dc9f3 100644 --- a/openEuler-rpm-config.spec +++ b/openEuler-rpm-config.spec @@ -3,7 +3,7 @@ Name: %{vendor}-rpm-config Version: 31 -Release: 10 +Release: 11 License: GPL+ Summary: specific rpm configuration files URL: https://gitee.com/src-openeuler/openEuler-rpm-config @@ -47,6 +47,7 @@ Source303: fix-libtool-from-moving-options-after-libs # Snapshots from http://git.savannah.gnu.org/gitweb/?p=config.git Source500: config.guess Source501: config.sub +Patch0001: 0001-support-sw_64-arch.patch # BRPs Source700: brp-chrpath @@ -185,6 +186,9 @@ sed -i "s/@VENDOR@/%{vendor}/g" `grep "@VENDOR@" -rl %{buildroot}%{_rpmconfigdir %{rpmvdir}/find-requires.ksyms %changelog +* Sun Jan 12 2025 Funda Wang - 31-11 +- support sw_64 arch + * Mon Jan 06 2025 Funda Wang - 31-10 - add shell completions dir declaration -- Gitee