aboutsummaryrefslogtreecommitdiff
path: root/libgo
diff options
context:
space:
mode:
authorIan Lance Taylor <iant@golang.org>2021-09-21 14:32:26 -0700
committerIan Lance Taylor <iant@golang.org>2021-09-21 14:32:26 -0700
commita5b5cabc91c38710adbe5c8a2b53882abe994441 (patch)
tree66b099a6ebc2076ef353afa90d9703824d023812 /libgo
parenta0791d0ed4f147ef347e83f4aedc7ad03f1a2008 (diff)
parent09e18d113b3c3dae896ac1a8ad1e0087adbb153b (diff)
downloadgcc-a5b5cabc91c38710adbe5c8a2b53882abe994441.zip
gcc-a5b5cabc91c38710adbe5c8a2b53882abe994441.tar.gz
gcc-a5b5cabc91c38710adbe5c8a2b53882abe994441.tar.bz2
Merge from trunk revision 09e18d113b3c3dae896ac1a8ad1e0087adbb153b.
Diffstat (limited to 'libgo')
-rw-r--r--libgo/Makefile.am11
-rw-r--r--libgo/Makefile.in12
-rw-r--r--libgo/go/runtime/extern.go2
3 files changed, 21 insertions, 4 deletions
diff --git a/libgo/Makefile.am b/libgo/Makefile.am
index 92fedcf..5c377a3 100644
--- a/libgo/Makefile.am
+++ b/libgo/Makefile.am
@@ -545,6 +545,14 @@ s-gcpu: Makefile
$(SHELL) $(srcdir)/mvifdiff.sh gcpugen.go.tmp gcpugen.go
$(STAMP) $@
+goroot.go: s-goroot; @true
+s-goroot: Makefile
+ rm -f goroot.go.tmp
+ echo "package runtime" > goroot.go.tmp
+ echo 'var defaultGOROOT = `$(prefix)`' >> goroot.go.tmp
+ $(SHELL) $(srcdir)/mvifdiff.sh goroot.go.tmp goroot.go
+ $(STAMP) $@
+
buildcfg.go: s-buildcfg; @true
s-buildcfg: Makefile
rm -f buildcfg.go.tmp
@@ -1005,7 +1013,8 @@ math_lo_GOCFLAGS = $(MATH_FLAG)
math_check_GOCFLAGS = $(MATH_FLAG)
# Add generated files to the runtime package.
-extra_go_files_runtime = runtime_linknames.go runtime_sysinfo.go sigtab.go
+extra_go_files_runtime = \
+ runtime_linknames.go runtime_sysinfo.go sigtab.go goroot.go
runtime.lo.dep: $(extra_go_files_runtime)
# Add generated files to the syscall package.
diff --git a/libgo/Makefile.in b/libgo/Makefile.in
index 3b2bdf9..1240b16 100644
--- a/libgo/Makefile.in
+++ b/libgo/Makefile.in
@@ -1098,7 +1098,9 @@ math_lo_GOCFLAGS = $(MATH_FLAG)
math_check_GOCFLAGS = $(MATH_FLAG)
# Add generated files to the runtime package.
-extra_go_files_runtime = runtime_linknames.go runtime_sysinfo.go sigtab.go
+extra_go_files_runtime = \
+ runtime_linknames.go runtime_sysinfo.go sigtab.go goroot.go
+
# Add generated files to the syscall package.
extra_go_files_syscall = \
@@ -2752,6 +2754,14 @@ s-gcpu: Makefile
$(SHELL) $(srcdir)/mvifdiff.sh gcpugen.go.tmp gcpugen.go
$(STAMP) $@
+goroot.go: s-goroot; @true
+s-goroot: Makefile
+ rm -f goroot.go.tmp
+ echo "package runtime" > goroot.go.tmp
+ echo 'var defaultGOROOT = `$(prefix)`' >> goroot.go.tmp
+ $(SHELL) $(srcdir)/mvifdiff.sh goroot.go.tmp goroot.go
+ $(STAMP) $@
+
buildcfg.go: s-buildcfg; @true
s-buildcfg: Makefile
rm -f buildcfg.go.tmp
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.