From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 2116) id 0012B3856246; Tue, 13 Sep 2022 20:13:10 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 0012B3856246 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1663099991; bh=+0AcNjcR+Qd8Qi2IDVTiAiSY7cRUOiTp3wU4zi4IHj0=; h=From:To:Subject:Date:From; b=wsmyr+DqRaX3YeN7oSeenMYOpFVkrUMlyKrBbVZt3Q2QVWC3bEYPRPRmnbxZCOrlz AJR8RmrG8+hWBoy24PRR2SajN80ZPcvZiYUtvLSTIuPDHSdPFEoL4bOLlQOHL9xShn lLpvRZ08jF5qCTNYwc2lvLBCAkL22rzPHzSrfsJU= MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="utf-8" From: Ian Lance Taylor To: gcc-cvs@gcc.gnu.org Subject: [gcc r12-8763] libgo: make runtime.Version return a meaningful string X-Act-Checkin: gcc X-Git-Author: Ian Lance Taylor X-Git-Refname: refs/heads/releases/gcc-12 X-Git-Oldrev: 21a3f43c6888b216ab70ef9aff5c3903ed1f218f X-Git-Newrev: 23605c6a4eef5ca8ecb64d7006b60aeed241c29c Message-Id: <20220913201311.0012B3856246@sourceware.org> Date: Tue, 13 Sep 2022 20:13:10 +0000 (GMT) List-Id: https://gcc.gnu.org/g:23605c6a4eef5ca8ecb64d7006b60aeed241c29c commit r12-8763-g23605c6a4eef5ca8ecb64d7006b60aeed241c29c Author: Ian Lance Taylor Date: Tue Sep 13 13:11:17 2022 -0700 libgo: make runtime.Version return a meaningful string For golang/go#51850 Fixes PR go/106747 Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/414734 Diff: --- libgo/Makefile.am | 1 + libgo/Makefile.in | 1 + libgo/go/runtime/extern.go | 10 ---------- 3 files changed, 2 insertions(+), 10 deletions(-) diff --git a/libgo/Makefile.am b/libgo/Makefile.am index a5d4b6a3525..b03e6553e90 100644 --- a/libgo/Makefile.am +++ b/libgo/Makefile.am @@ -568,6 +568,7 @@ s-goroot: Makefile rm -f goroot.go.tmp echo "package runtime" > goroot.go.tmp echo 'var defaultGOROOT = `$(prefix)`' >> goroot.go.tmp + echo 'var buildVersion = `'`cat $(srcdir)/VERSION | sed 1q`' '`$(GOC) --version | sed 1q`'`' >> goroot.go.tmp $(SHELL) $(srcdir)/mvifdiff.sh goroot.go.tmp goroot.go $(STAMP) $@ diff --git a/libgo/Makefile.in b/libgo/Makefile.in index 22f48a52938..16ed62a82ed 100644 --- a/libgo/Makefile.in +++ b/libgo/Makefile.in @@ -2780,6 +2780,7 @@ s-goroot: Makefile rm -f goroot.go.tmp echo "package runtime" > goroot.go.tmp echo 'var defaultGOROOT = `$(prefix)`' >> goroot.go.tmp + echo 'var buildVersion = `'`cat $(srcdir)/VERSION | sed 1q`' '`$(GOC) --version | sed 1q`'`' >> goroot.go.tmp $(SHELL) $(srcdir)/mvifdiff.sh goroot.go.tmp goroot.go $(STAMP) $@ diff --git a/libgo/go/runtime/extern.go b/libgo/go/runtime/extern.go index a371d9c0ee0..8e226147965 100644 --- a/libgo/go/runtime/extern.go +++ b/libgo/go/runtime/extern.go @@ -231,16 +231,6 @@ func GOROOT() string { return defaultGOROOT } -// buildVersion is the Go tree's version string at build time. -// -// If any GOEXPERIMENTs are set to non-default values, it will include -// "X:". -// -// This is set by the linker. -// -// This is accessed by "go version ". -var buildVersion string - // Version returns the Go tree's version string. // It is either the commit hash and date at the time of the build or, // when possible, a release tag like "go1.3".