diff --git a/lang/go122/Makefile b/lang/go122/Makefile index 962a50d32f6e..56d24ab1246e 100644 --- a/lang/go122/Makefile +++ b/lang/go122/Makefile @@ -1,19 +1,20 @@ 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 DISTFILES= go${DISTVERSION}.src.tar.gz \ go-${OPSYS:tl}-${GOARCH_${ARCH}}${GOARM_${ARCH}}-${BOOTSTRAP_TAG}.tar.xz:bootstrap # Avoid conflicting patch files PATCHFILES= +PATCHDIR= ${.CURDIR}/files COMMENT= Go programming language MASTERDIR= ${.CURDIR}/../go-devel WRKSRC= ${WRKDIR}/go DISTINFO_FILE= ${.CURDIR}/distinfo .include "${MASTERDIR}/Makefile" 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.