diff options
author | Robert Clausecker <fuz@FreeBSD.org> | 2024-05-13 18:45:02 +0000 |
---|---|---|
committer | Robert Clausecker <fuz@FreeBSD.org> | 2024-05-23 15:01:42 +0000 |
commit | 5888c8d3e3cd2885b50ad9b230669f446c3c78e4 (patch) | |
tree | 61dca148f5de8f74d1a0dd054ae446ee6e3e85c5 | |
parent | bfb87c6fd34bdb85a6e36a0b8698b63e31688fa0 (diff) | |
download | ports-5888c8d3e3cd2885b50ad9b230669f446c3c78e4.tar.gz ports-5888c8d3e3cd2885b50ad9b230669f446c3c78e4.zip |
lang/go122: fix build on armv7
This backports a commit needed to get proper barriers during bootstrap
when building Go with more than one job on armv7.
Note that this only changes the behaviour when building the bootstrap
toolchain. Binaries generated using the toolchain are not affected
and hence Go ports need not be bumped.
PR: 278953
Approved by: portmgr (build fix blanket)
Obtained from: https://go-review.googlesource.com/c/go/+/562995
See also: https://github.com/golang/go/issues/65601
MFH: 2024Q2
(cherry picked from commit 1ec501743bd9a626af211b4cab06751227a4d703)
-rw-r--r-- | lang/go122/Makefile | 3 | ||||
-rw-r--r-- | lang/go122/files/patch-src_cmd_dist_build.go | 23 |
2 files changed, 25 insertions, 1 deletions
diff --git a/lang/go122/Makefile b/lang/go122/Makefile index 962a50d32f6e..56d24ab1246e 100644 --- a/lang/go122/Makefile +++ b/lang/go122/Makefile @@ -1,6 +1,6 @@ DISTVERSION= 1.22.3 # Always set PORTREVISION explicitly as otherwise they are inherited from lang/go-devel -PORTREVISION= 0 +PORTREVISION= 1 MASTER_SITES= https://golang.org/dl/ \ https://github.com/dmgk/go-bootstrap/releases/download/${BOOTSTRAP_TAG}/:bootstrap \ LOCAL/dmgk:bootstrap @@ -9,6 +9,7 @@ DISTFILES= go${DISTVERSION}.src.tar.gz \ # Avoid conflicting patch files PATCHFILES= +PATCHDIR= ${.CURDIR}/files COMMENT= Go programming language diff --git a/lang/go122/files/patch-src_cmd_dist_build.go b/lang/go122/files/patch-src_cmd_dist_build.go new file mode 100644 index 000000000000..59fd0c6539f8 --- /dev/null +++ b/lang/go122/files/patch-src_cmd_dist_build.go @@ -0,0 +1,23 @@ +--- src/cmd/dist/build.go.orig 2024-03-29 15:27:02 UTC ++++ src/cmd/dist/build.go +@@ -891,6 +891,20 @@ func runInstall(pkg string, ch chan struct{}) { + asmArgs = append(asmArgs, "-D", "GOPPC64_power8") + } + } ++ if goarch == "arm" { ++ // Define GOARM_value from goarm, which can be either a version ++ // like "6", or a version and a FP mode, like "7,hardfloat". ++ switch { ++ case strings.Contains(goarm, "7"): ++ asmArgs = append(asmArgs, "-D", "GOARM_7") ++ fallthrough ++ case strings.Contains(goarm, "6"): ++ asmArgs = append(asmArgs, "-D", "GOARM_6") ++ fallthrough ++ default: ++ asmArgs = append(asmArgs, "-D", "GOARM_5") ++ } ++ } + goasmh := pathf("%s/go_asm.h", workdir) + + // Collect symabis from assembly code. |