aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/ld/lib.c
diff options
context:
space:
mode:
authorRob Pike <r@golang.org>2010-01-13 14:39:16 +1100
committerRob Pike <r@golang.org>2010-01-13 14:39:16 +1100
commitccbcefe2b63382eb7771de9054cb5eb774d8dac8 (patch)
tree14bbb7be6b2ffb80d6841f90951653feda9d70a5 /src/cmd/ld/lib.c
parentea1a36efcda31c159655be5e8258bb88fb600a1a (diff)
downloadgo-ccbcefe2b63382eb7771de9054cb5eb774d8dac8.tar.xz
ignore $GOARCH inside the compiler and linker.
by definition, they know what they are building for. makes it easier to switch architectures when testing. % 6g x.go % 6l x.6 % 6.out "Wed Jan 13 10:57:46 EST 2010" % 8g x.go % 8l x.8 % 8.out "Wed Jan 13 10:57:46 EST 2010" % echo $GOARCH % R=rsc CC=golang-dev https://golang.org/cl/186116
Diffstat (limited to 'src/cmd/ld/lib.c')
-rw-r--r--src/cmd/ld/lib.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/src/cmd/ld/lib.c b/src/cmd/ld/lib.c
index 232916845e..f702bae237 100644
--- a/src/cmd/ld/lib.c
+++ b/src/cmd/ld/lib.c
@@ -721,7 +721,6 @@ mywhatsys(void)
char *s;
goroot = getenv("GOROOT");
- goarch = getenv("GOARCH");
goos = getenv("GOOS");
if(goroot == nil) {
@@ -732,9 +731,7 @@ mywhatsys(void)
strcpy(goroot, s);
strcat(goroot, "/go");
}
- if(goarch == nil) {
- goarch = "amd64";
- }
+ goarch = thestring; // ignore $GOARCH - we know who we are
if(goos == nil) {
goos = "linux";
}