public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/golang] eln: Conditionalize baseline ISA
@ 2026-06-24 17:14 dbenoit
0 siblings, 0 replies; only message in thread
From: dbenoit @ 2026-06-24 17:14 UTC (permalink / raw)
To: git-commits
A new commit has been pushed.
Repo : rpms/golang
Branch : eln
Commit : dd8136324cfe8110cbb8a7b2883a8c8ad33cefbe
Author : dbenoit <dbenoit@redhat.com>
Date : 2026-05-15T09:23:12-04:00
Stats : +22/-0 in 1 file(s)
URL : https://src.fedoraproject.org/rpms/golang/c/dd8136324cfe8110cbb8a7b2883a8c8ad33cefbe?branch=eln
Log:
Conditionalize baseline ISA
Related: RHEL-175604
---
diff --git a/golang.spec b/golang.spec
index f84a4a0..f146775 100644
--- a/golang.spec
+++ b/golang.spec
@@ -99,6 +99,20 @@
%global gohostarch riscv64
%endif
+# Set the RHEL architecture baseline.
+%if 0%{?rhel} < 9
+%global goamd64 v1
+%global goppc64 power8
+%else
+%if 0%{?rhel} < 10
+%global goamd64 v2
+%global goppc64 power8
+%else
+%global goamd64 v3
+%global goppc64 power9
+%endif
+%endif
+
%global go_api 1.26
# Use only for prerelease versions
#global go_prerelease rc3
@@ -342,6 +356,14 @@ Binary library objects for Go's race detector.
# Copy fedora.go to ./src/runtime/
cp %{SOURCE2} ./src/runtime/
sed -i '1s/$/ (%{?rhel:Red Hat} %{version}-%{release})/' VERSION
+
+# Historically the ISA baselines have been set in modify-go.env.patch.
+# This will prevent us sharing a specfile across major RHEL versions.
+# As such, we must override the baselines set in the patch file.
+sed -iE "s/^.*baseline for RHEL.*$//" go.env
+sed -i "s/GOAMD64=.*/GOAMD64=%{goamd64}/" go.env
+sed -i "s/GOPPC64=.*/GOPPC64=%{goppc64}/" go.env
+
# Delete the bundled race detector objects.
find ./src/runtime/race/ -name "race_*.syso" -exec rm {} \;
# Delete the boring binary blob. We use the system OpenSSL instead.
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2026-06-24 17:14 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-06-24 17:14 [rpms/golang] eln: Conditionalize baseline ISA dbenoit
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox