diff --git a/apply-patches-sw64 b/apply-patches-sw64 new file mode 100644 index 0000000000000000000000000000000000000000..d4f7e3b9ea750abb9fff176dd35837543db0702c --- /dev/null +++ b/apply-patches-sw64 @@ -0,0 +1,15 @@ +#!/bin/bash + +set -ex + +goversion="1.24.4" + +if [ ! -d sw64 ]; then + tar -xf sw64-${goversion}.tar.gz +fi + +for p in $(cat sw64-${goversion}.conf); do + git apply -p1 sw64/$p +done + +rm -rf $0 sw64 sw64-${goversion}.tar.gz sw64-${goversion}.conf diff --git a/golang.spec b/golang.spec index 0c1c495917f3a89611918703d725a5763a673b3d..6ca6f7f2d3877427488804a1f634538f22b233f3 100644 --- a/golang.spec +++ b/golang.spec @@ -1,7 +1,7 @@ # after we have putting golang into repo, we should shift bootstrap closing. %bcond_with bootstrap -%global baserelease 3 +%global baserelease 4 %global golibdir %{_libdir}/golang @@ -17,19 +17,19 @@ %bcond_without enable_tests %endif -%ifarch x86_64 ppc64le aarch64 loongarch64 +%ifarch x86_64 ppc64le aarch64 loongarch64 sw_64 %global external_linker 1 %else %global external_linker 0 %endif -%ifarch x86_64 ppc64le aarch64 loongarch64 +%ifarch x86_64 ppc64le aarch64 loongarch64 sw_64 %global enable_cgo 1 %else %global enable_cgo 0 %endif -%ifarch x86_64 ppc64le aarch64 +%ifarch x86_64 ppc64le aarch64 sw_64 %global enable_shared 1 %else %global enable_shared 0 @@ -57,6 +57,9 @@ %ifarch risv64 %global gohostarch riscv64 %endif +%ifarch sw_64 +%global gohostarch sw64 +%endif # https://code.google.com/p/go/issues/detail?id=5238 %global debug_package %{nil} @@ -85,6 +88,9 @@ Source2: golang-gdbinit Source3: loongarch64-%{version}.tar.gz Source4: loongarch64-%{version}.conf Source5: apply-patches +Source6: sw64-%{version}.tar.gz +Source7: sw64-%{version}.conf +Source8: apply-patches-sw64 Patch0001: 0001-CVE-2025-4674-cmd-go-disable-support-for-mul.patch Patch0002: 0002-release-branch.go1.24-database-sql-avoid-closing-Row.patch @@ -194,6 +200,10 @@ cp %{SOURCE3} . cp %{SOURCE4} . cp %{SOURCE5} . sh ./apply-patches +cp %{SOURCE6} . +cp %{SOURCE7} . +cp %{SOURCE8} . +sh ./apply-patches-sw64 # remove this test file for it need network rm src/crypto/tls/handshake_client_test.go @@ -372,6 +382,9 @@ fi %changelog +* Wed Sep 3 2025 swcompiler - 1.24.4-4 +- add sw_64 ISA support + * Mon Aug 18 2025 hudson zhu - 1.24.4-3 - database/sql: avoid closing Rows while scan is in progress [CVE-2025-47907] diff --git a/sources b/sources index a937d15c7a8fc08ff371c3a5bc904a4a6f00c175..469e0920e0e2a64814b1b8578c6407de59718370 100644 --- a/sources +++ b/sources @@ -1,2 +1,3 @@ SHA512 (go1.24.4.src.tar.gz) = b785583fc53d62094b2de793a0e3281a26d2de17897a35b378fc2d13cb912ca473c37a7bae54a50660141809d5d0a70a97663d406cf30d7f0221ecbb5ffddec6 SHA512 (loongarch64-1.24.4.tar.gz) = 2fa9f4ef418929bb00f29a1d39e45d8715de7b8b3f0937fe4e524ba9ebfaa96bcb9ccc6d056b12990987f21e1918dfa0bd7bf4e56f944822ca0490609bc8dc08 +SHA512 (sw64-1.24.4.tar.gz) = 509eebbbe3472183a36e35ec6e6f66b235a708140b5d944fe3849fe17cea0a2eecba7cb02eb2dd96600c89cb83ad93f3b847ecbb7e6100a617644bb0350e0f72 diff --git a/sw64-1.24.4.conf b/sw64-1.24.4.conf new file mode 100644 index 0000000000000000000000000000000000000000..54dffd8bbbb7b1c3a0f01b7f64c6c7dc523c7cae --- /dev/null +++ b/sw64-1.24.4.conf @@ -0,0 +1,16 @@ +0001-cmd-comile-Add-sw64-port.patch +0002-cmd-internal-obj-Add-sw64-port.patch +0003-cmd-link-Add-sw64-port.patch +0004-cmd-asm-Add-sw64-port.patch +0005-runtime-Add-sw64-port.patch +0006-syscall-Add-sw64-port.patch +0007-cmd-dist-Add-sw64-port.patch +0008-cmd-cgo-Add-sw64-port.patch +0009-reflect-Add-sw64-port.patch +0010-cmd-vendor-vendor-Add-sw64-port.patch +0011-cmd-go-go-Add-sw64-port.patch +0012-src-internal-Add-sw64-port.patch +0013-crypto-hash-math-Add-sw64-port.patch +0014-api-Add-sw64-port.patch +0015-debug-Add-sw64-port.patch +0016-encoding-os-sw64-add-var-NativeEndian.patch