]> Cypherpunks repositories - gostls13.git/commit
cmd/dist: goc2c ignores GOROOT_FINAL
authorHenning Schmiedehausen <henning@schmiedehausen.org>
Fri, 15 Aug 2014 22:19:02 +0000 (15:19 -0700)
committerIan Lance Taylor <iant@golang.org>
Fri, 15 Aug 2014 22:19:02 +0000 (15:19 -0700)
commit7eba885ba5fa2b077b95e32e4ba435aa340d0957
treed4b5bf2b4dfda14cf710855c8b811908c16a9a2c
parent40182102e3a6caffb3b01de90b6a7c04276d0465
cmd/dist: goc2c ignores GOROOT_FINAL

When building golang, the environment variable GOROOT_FINAL can be set
to indicate a different installation location from the build
location. This works fine, except that the goc2c build step embeds
line numbers in the resulting c source files that refer to the build
location, no the install location.

This would not be a big deal, except that in turn the linker uses the
location of runtime/string.goc to embed the gdb script in the
resulting binary and as a net result, the debugger now complains that
the script is outside its load path (it has the install location
configured).

See https://code.google.com/p/go/issues/detail?id=8524 for the full
description.

Fixes #8524.

LGTM=iant
R=golang-codereviews, iant
CC=golang-codereviews
https://golang.org/cl/128230046
src/cmd/dist/a.h
src/cmd/dist/build.c
src/cmd/dist/goc2c.c