From 18ba5a61031adaa1811d8b970a2f1e998998890f Mon Sep 17 00:00:00 2001 From: swcompiler Date: Mon, 14 Jul 2025 16:43:10 +0800 Subject: [PATCH] Add Sw_64 port (cherry picked from commit 8f21237e38b341d1288b7d34750b60eb7edba3eb) --- erlang.spec | 7 +++++- otp-0024-Add-Sw64-port.patch | 42 ++++++++++++++++++++++++++++++++++++ 2 files changed, 48 insertions(+), 1 deletion(-) create mode 100644 otp-0024-Add-Sw64-port.patch diff --git a/erlang.spec b/erlang.spec index b9a1836..3ea1c86 100644 --- a/erlang.spec +++ b/erlang.spec @@ -10,7 +10,7 @@ %global __with_sources 1 Name: erlang Version: 25.3.2.6 -Release: 8 +Release: 9 Summary: General-purpose programming language and runtime environment License: Apache-2.0 URL: https://www.erlang.org @@ -43,6 +43,8 @@ Patch20: CVE-2025-46712-pre-ssh-reduce-KEX-strict-message-verbosity. Patch21: CVE-2025-46712-1.patch Patch22: CVE-2025-46712-2.patch Patch23: CVE-2025-4748.patch +Patch24: otp-0024-Add-Sw64-port.patch + BuildRequires: gcc gcc-c++ flex make %if %{with doc} @@ -1765,6 +1767,9 @@ useradd -r -g epmd -d /dev/null -s /sbin/nologin \ %endif %changelog +* Mon Jul 14 2025 compiler -25.3.2.6-9 +- Add sw_64 port + * Wed Jun 18 2025 wangkai <13474090681@163.com> - 25.3.2.6-8 - Fix CVE-2025-4748 diff --git a/otp-0024-Add-Sw64-port.patch b/otp-0024-Add-Sw64-port.patch new file mode 100644 index 0000000..0ed62bf --- /dev/null +++ b/otp-0024-Add-Sw64-port.patch @@ -0,0 +1,42 @@ +diff --git a/make/autoconf/config.guess b/make/autoconf/config.guess +index 1972fda..884cdd4 100755 +--- a/make/autoconf/config.guess ++++ b/make/autoconf/config.guess +@@ -1101,6 +1101,14 @@ EOF + sparc:Linux:*:* | sparc64:Linux:*:*) + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" + exit ;; ++ sw_64:Linux:*:*) ++ case `sed -n '/^model name/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo | sed -n '$p' | awk '{print $1}'` in ++ SW6A) UNAME_MACHINE=sw_64 ;; ++ SW6B) UNAME_MACHINE=sw_64 ;; ++ WX-H8000) UNAME_MACHINE=sw_64 ;; ++ esac ++ echo ${UNAME_MACHINE}-sunway-linux-gnu ++ exit ;; + tile*:Linux:*:*) + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" + exit ;; +diff --git a/make/autoconf/config.sub b/make/autoconf/config.sub +index 63c1f1c..4e89c17 100755 +--- a/make/autoconf/config.sub ++++ b/make/autoconf/config.sub +@@ -568,6 +568,10 @@ case $1 in + basic_machine=sv1-cray + basic_os=unicos + ;; ++ sw_64) ++ basic_machine=sw_64-sunway ++ basic_os= ++ ;; + symmetry) + basic_machine=i386-sequent + basic_os=dynix +@@ -1163,6 +1167,7 @@ case $cpu-$vendor in + | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] \ + | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] \ + | alphapca5[67] | alpha64pca5[67] \ ++ | sw_64 \ + | am33_2.0 \ + | amdgcn \ + | arc | arceb \ -- Gitee