Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 11 Feb 2026 18:07:21 +0000
From:      Adam Weinberger <adamw@FreeBSD.org>
To:        ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org
Subject:   git: 3439683963c1 - main - lang/go126: Add go 1.26
Message-ID:  <698cc559.38a45.2d76aa5a@gitrepo.freebsd.org>

index | next in thread | raw e-mail

The branch main has been updated by adamw:

URL: https://cgit.FreeBSD.org/ports/commit/?id=3439683963c1766c5c6486dabde059f1aeb2daa2

commit 3439683963c1766c5c6486dabde059f1aeb2daa2
Author:     Adam Weinberger <adamw@FreeBSD.org>
AuthorDate: 2026-02-11 17:45:08 +0000
Commit:     Adam Weinberger <adamw@FreeBSD.org>
CommitDate: 2026-02-11 18:06:09 +0000

    lang/go126: Add go 1.26
    
    From https://go.dev/doc/go1.26:
    
      The latest Go release, version 1.26, arrives in February 2026, six
      months after Go 1.25. Most of its changes are in the implementation
      of the toolchain, runtime, and libraries. As always, the release
      maintains the Go 1 promise of compatibility. We expect almost all Go
      programs to continue to compile and run as before.
    
    There are exciting updates in this new Go minor:
    - New Green Tea-based garbage collector that cuts GC overhead by an
      observed 10-40%.
    - cgo runtime overhead reduced by an observed 30%.
    - `go fix` has been rewritten as is now Go's official modernizer. In
      particular, it includes all of `go vet`'s heuristics, making it
      possible to fix the things that the latter identifies.
    - Heap base address is now randomized.
    - pprof can now (experimentally) identify leaked goroutines.
    - New crypto/hpke package includes support for quantum-vulnerable and
      post-quantum hybrid KEMs.
---
 lang/Makefile                                      |  1 +
 lang/go126/Makefile                                |  4 ++++
 lang/go126/distinfo                                | 13 ++++++++++++
 lang/go126/files/patch-src_cmd_dist_build.go       | 23 ++++++++++++++++++++++
 .../patch-src_cmd_go_internal_modload_vendor.go    | 11 +++++++++++
 5 files changed, 52 insertions(+)

diff --git a/lang/Makefile b/lang/Makefile
index 55c240f52361..8a9997372742 100644
--- a/lang/Makefile
+++ b/lang/Makefile
@@ -126,6 +126,7 @@
     SUBDIR += go-devel
     SUBDIR += go124
     SUBDIR += go125
+    SUBDIR += go126
     SUBDIR += gomacro
     SUBDIR += gprolog
     SUBDIR += gptscript
diff --git a/lang/go126/Makefile b/lang/go126/Makefile
new file mode 100644
index 000000000000..d5134c381af6
--- /dev/null
+++ b/lang/go126/Makefile
@@ -0,0 +1,4 @@
+DISTVERSION=	1.26.0
+BOOTSTRAP_VER=	1.25.7
+
+.include "${.CURDIR}/../go/bsd.go.mk"
diff --git a/lang/go126/distinfo b/lang/go126/distinfo
new file mode 100644
index 000000000000..86aefcb2c788
--- /dev/null
+++ b/lang/go126/distinfo
@@ -0,0 +1,13 @@
+TIMESTAMP = 1770827469
+SHA256 (go1.26.0.src.tar.gz) = c9132a8a1f6bd2aa4aad1d74b8231d95274950483a4950657ee6c56e6e817790
+SIZE (go1.26.0.src.tar.gz) = 34095450
+SHA256 (go1.25.7.freebsd-arm64.tar.gz) = 631e03d5fd4c526e2f499154d8c6bf4cb081afb2fff171c428722afc9539d53a
+SIZE (go1.25.7.freebsd-arm64.tar.gz) = 57006314
+SHA256 (go1.25.7.freebsd-amd64.tar.gz) = 055f9e138787dcafa81eb0314c8ff70c6dd0f6dba1e8a6957fef5d5efd1ab8fd
+SIZE (go1.25.7.freebsd-amd64.tar.gz) = 59501998
+SHA256 (go1.25.7.freebsd-arm.tar.gz) = 60e7f7a7c990f0b9539ac8ed668155746997d404643a4eecd47b3dee1b7e710b
+SIZE (go1.25.7.freebsd-arm.tar.gz) = 58246590
+SHA256 (go1.25.7.freebsd-386.tar.gz) = a2de97c8ac74bf64b0ae73fe9d379e61af530e061bc7f8f825044172ffe61a8b
+SIZE (go1.25.7.freebsd-386.tar.gz) = 58209772
+SHA256 (go1.25.7.freebsd-riscv64.tar.gz) = 8a264fd685823808140672812e3ad9c43f6ad59444c0dc14cdd3a1351839ddd5
+SIZE (go1.25.7.freebsd-riscv64.tar.gz) = 58024309
diff --git a/lang/go126/files/patch-src_cmd_dist_build.go b/lang/go126/files/patch-src_cmd_dist_build.go
new file mode 100644
index 000000000000..59fd0c6539f8
--- /dev/null
+++ b/lang/go126/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.
diff --git a/lang/go126/files/patch-src_cmd_go_internal_modload_vendor.go b/lang/go126/files/patch-src_cmd_go_internal_modload_vendor.go
new file mode 100644
index 000000000000..ba3f97226624
--- /dev/null
+++ b/lang/go126/files/patch-src_cmd_go_internal_modload_vendor.go
@@ -0,0 +1,11 @@
+--- src/cmd/go/internal/modload/vendor.go.orig	2024-02-02 18:09:55 UTC
++++ src/cmd/go/internal/modload/vendor.go
+@@ -159,7 +159,7 @@ func checkVendorConsistency(indexes []*modFileIndex, m
+ 			panic(fmt.Errorf("not in workspace mode but number of indexes is %v, not 1", len(indexes)))
+ 		}
+ 		index := indexes[0]
+-		if gover.Compare(index.goVersion, "1.14") < 0 {
++		if gover.Compare(index.goVersion, "1.14") < 0 || os.Getenv("GO_NO_VENDOR_CHECKS") == "1" {
+ 			// Go versions before 1.14 did not include enough information in
+ 			// vendor/modules.txt to check for consistency.
+ 			// If we know that we're on an earlier version, relax the consistency check.


home | help

Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?698cc559.38a45.2d76aa5a>