From c2615cb7590a92acdc1b991a1d15770f69f4ea3f Mon Sep 17 00:00:00 2001 From: David Abdurachmanov Date: Wed, 10 Apr 2024 09:33:40 +0300 Subject: [PATCH] Add support for riscv64 Signed-off-by: David Abdurachmanov --- golang.spec | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/golang.spec b/golang.spec index b5e4138..c59063f 100644 --- a/golang.spec +++ b/golang.spec @@ -31,14 +31,14 @@ # Golang build options. # Build golang using external/internal(close to cgo disabled) linking. -%ifarch %{ix86} x86_64 ppc64le %{arm} aarch64 s390x +%ifarch %{ix86} x86_64 ppc64le %{arm} aarch64 s390x riscv64 %global external_linker 1 %else %global external_linker 0 %endif # Build golang with cgo enabled/disabled(later equals more or less to internal linking). -%ifarch %{ix86} x86_64 ppc64le %{arm} aarch64 s390x +%ifarch %{ix86} x86_64 ppc64le %{arm} aarch64 s390x riscv64 %global cgo_enabled 1 %else %global cgo_enabled 0 @@ -93,6 +93,9 @@ %ifarch s390x %global gohostarch s390x %endif +%ifarch riscv64 +%global gohostarch riscv64 +%endif # Comment out go_prerelease and go_patch as needed %global go_api 1.22 @@ -104,7 +107,7 @@ Name: golang Version: %{go_version} -Release: %autorelease +Release: %autorelease -e 0.riscv64 Summary: The Go Programming Language # source tree includes several copies of Mark.Twain-Tom.Sawyer.txt under Public Domain License: BSD-3-Clause AND LicenseRef-Fedora-Public-Domain @@ -457,7 +460,11 @@ export CGO_ENABLED=0 #endif # make sure to not timeout +%ifnarch riscv64 export GO_TEST_TIMEOUT_SCALE=2 +%else +export GO_TEST_TIMEOUT_SCALE=20 +%endif %if %{fail_on_tests} ./run.bash --no-rebuild -v -v -v -k