commit:     27a8cae9f9525175f92802bb7f092a913d53f825
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Sat Mar 14 15:15:11 2026 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sat Mar 14 17:27:26 2026 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=27a8cae9

dev-lang/go: add 1.25.8

I've included two other fixes:
* Disable an LTO test if using a debug GCC (see bug #912152 for why)
* Try to filter -g3 to avoid breaking a test, though it seems incomplete
  (bug #929219)

  It looks like this might be fixed in Go 1.27 anyway though with
  https://github.com/golang/go/commit/5f51b092846ae43d03092d866449d9933a8bf42b.

Bug: https://bugs.gentoo.org/912152
Bug: https://bugs.gentoo.org/929219
Bug: https://bugs.gentoo.org/968833
Bug: https://bugs.gentoo.org/970944
Signed-off-by: Sam James <sam <AT> gentoo.org>

 dev-lang/go/Manifest                             |  1 +
 dev-lang/go/{go-9999.ebuild => go-1.25.8.ebuild} | 18 +++++++++++++++++-
 dev-lang/go/go-9999.ebuild                       | 16 +++++++++++++++-
 3 files changed, 33 insertions(+), 2 deletions(-)

diff --git a/dev-lang/go/Manifest b/dev-lang/go/Manifest
index deec5096bbe4..c5050e4b7d5d 100644
--- a/dev-lang/go/Manifest
+++ b/dev-lang/go/Manifest
@@ -2,3 +2,4 @@ DIST go1.24.11.src.tar.gz 30801851 BLAKE2B 
04463c4a238b0303df88ad2d7670bdb208dec
 DIST go1.24.12.src.tar.gz 30803950 BLAKE2B 
b3f7d2f1392d3337e6645c4fa53e2e53c4258aa9ecf12b38a10305d172f0c2172d98d273dd030c17f82df17fa3cd5ec464986836261ffdb3324e8f97b2f2b437
 SHA512 
2de51c56f7ca04003b16d0fecc4cb35a3c5a42bd54f4da1f1e49d45b702d7a872057756d389f2283b4f7283fb33f0618465e231a6333b7cb6cfff98f67b2454e
 DIST go1.25.5.src.tar.gz 31983405 BLAKE2B 
b6349931e6174b1b11c00360fb7a3040a80f3d3d463894b29393a464548398bad37be685923c725eb8a3fb71d42849254319102c833418f81eca477f52579222
 SHA512 
97ec368521253bce610e1e3a6f10460f4a38eba440289553a40ab27afcdf2bb9b426d150ffaa3be8db50e84a00a4eb723a631ebc4f39168bc133bf7b2f1ccf66
 DIST go1.25.6.src.tar.gz 31987986 BLAKE2B 
f9937808018f058d0f50fd0c0c1fa8f5a0f25d983a477e158e310d46dea30e33f3e0ea3d97ab550b6e5ed8d9f3b5354e76923b539ddb16a081f42e24fd3e4cfc
 SHA512 
214b2d82b5322d544e80d7202db9169c24e5f097338f2d0e6d34189bd5bde9e7c1656f06611062c78a156181f03956181971b346172fc14617726bfece5e61e9
+DIST go1.25.8.src.tar.gz 31991986 BLAKE2B 
c8a18a74a8903e53954bcc39ce804518e94bd6b2ee0b8a0cc4b5cd87f5d1760d6b1235233d2bf2804e3ec55a42cf6f5345a6fe4382e7406483915101ca107c97
 SHA512 
2f5c9f314d18169985a9a4b19346e00dd5d4b396c8c17bfffe5719e51f27d834cc9649d0165f7eeb7367d3b6d384f49917325a40b49ba4da65e22f2c5362c739

diff --git a/dev-lang/go/go-9999.ebuild b/dev-lang/go/go-1.25.8.ebuild
similarity index 86%
copy from dev-lang/go/go-9999.ebuild
copy to dev-lang/go/go-1.25.8.ebuild
index 8a70623142fc..30c58be88099 100644
--- a/dev-lang/go/go-9999.ebuild
+++ b/dev-lang/go/go-1.25.8.ebuild
@@ -10,7 +10,7 @@ export CTARGET=${CTARGET:-${CHOST}}
 GO_BOOTSTRAP_MIN=1.22.12
 MY_PV=${PV/_/}
 
-inherit go-env toolchain-funcs
+inherit flag-o-matic go-env toolchain-funcs
 
 case ${PV}  in
 *9999*)
@@ -71,6 +71,8 @@ go_cross_compile() {
 PATCHES=(
        "${FILESDIR}"/go-1.24-skip-gdb-tests.patch
        "${FILESDIR}"/go-1.24-dont-force-gold-arm.patch
+       "${FILESDIR}"/go-1.25-no-dwarf5.patch
+       "${FILESDIR}"/go-1.25-strip-top-level-const.patch
        "${FILESDIR}"/go-never-download-newer-toolchains.patch
 )
 
@@ -84,6 +86,20 @@ src_compile() {
                die "Should not be here, please report a bug"
        fi
 
+       if tc-is-gcc ; then
+               # XXX: Hack for checking ICE (bug #912152, gcc PR113204)
+               #
+               # For either USE=debug or an unreleased compiler, non-default
+               # checking will trigger.
+               if has_version -b "sys-devel/gcc[debug]" || [[ 
$(gcc-minor-version) -eq 0 ]] ; then
+                       rm src/cmd/link/cgo_test.go || die
+               fi
+
+               # bug #929219
+               replace-flags -g3 -g
+               replace-flags -ggdb3 -ggdb
+       fi
+
        # Go's build script does not use BUILD/HOST/TARGET consistently. :(
        export GOHOSTARCH=$(go-env_goarch ${CBUILD})
        export GOHOSTOS=$(go-env_goos ${CBUILD})

diff --git a/dev-lang/go/go-9999.ebuild b/dev-lang/go/go-9999.ebuild
index 8a70623142fc..ed4849486926 100644
--- a/dev-lang/go/go-9999.ebuild
+++ b/dev-lang/go/go-9999.ebuild
@@ -10,7 +10,7 @@ export CTARGET=${CTARGET:-${CHOST}}
 GO_BOOTSTRAP_MIN=1.22.12
 MY_PV=${PV/_/}
 
-inherit go-env toolchain-funcs
+inherit flag-o-matic go-env toolchain-funcs
 
 case ${PV}  in
 *9999*)
@@ -84,6 +84,20 @@ src_compile() {
                die "Should not be here, please report a bug"
        fi
 
+       if tc-is-gcc ; then
+               # XXX: Hack for checking ICE (bug #912152, gcc PR113204)
+               #
+               # For either USE=debug or an unreleased compiler, non-default
+               # checking will trigger.
+               if has_version -b "sys-devel/gcc[debug]" || [[ 
$(gcc-minor-version) -eq 0 ]] ; then
+                       rm src/cmd/link/cgo_test.go || die
+               fi
+
+               # bug #929219
+               replace-flags -g3 -g
+               replace-flags -ggdb3 -ggdb
+       fi
+
        # Go's build script does not use BUILD/HOST/TARGET consistently. :(
        export GOHOSTARCH=$(go-env_goarch ${CBUILD})
        export GOHOSTOS=$(go-env_goos ${CBUILD})

Reply via email to