From 09e18d113b3c3dae896ac1a8ad1e0087adbb153b Mon Sep 17 00:00:00 2001 From: Ian Lance Taylor Date: Tue, 21 Sep 2021 11:44:26 -0700 Subject: runtime: set runtime.GOROOT value at build time In Go 1.17 the gc toolchain changed to set runtime.GOROOT in cmd/link (previously it was runtime/internal/sys.GOROOT). Do the same in libgo. Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/351313 gotools/: * Makefile.am (check-runtime): Add goroot.go to --extrafiles. * Makefile.in: Regenerate. --- libgo/go/runtime/extern.go | 2 -- 1 file changed, 2 deletions(-) (limited to 'libgo/go') diff --git a/libgo/go/runtime/extern.go b/libgo/go/runtime/extern.go index 0d7f357..6bd612f 100644 --- a/libgo/go/runtime/extern.go +++ b/libgo/go/runtime/extern.go @@ -211,8 +211,6 @@ func Caller(skip int) (pc uintptr, file string, line int, ok bool) // program counter adjustment. func Callers(skip int, pc []uintptr) int -var defaultGOROOT string // set by cmd/link - // GOROOT returns the root of the Go tree. It uses the // GOROOT environment variable, if set at process start, // or else the root used during the Go build. -- cgit v1.1