mirror of
https://github.com/golang/go
synced 2024-11-21 21:34:40 -07:00
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
This commit is contained in:
parent
ea1a36efcd
commit
ccbcefe2b6
@ -225,7 +225,7 @@ findpkg(Strlit *name)
|
||||
if(goroot == nil) {
|
||||
goroot = getenv("GOROOT");
|
||||
goos = getenv("GOOS");
|
||||
goarch = getenv("GOARCH");
|
||||
goarch = thestring;
|
||||
}
|
||||
|
||||
if(islocalname(name)) {
|
||||
|
@ -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";
|
||||
}
|
||||
|
@ -52,6 +52,7 @@ EXTERN uchar inuxi4[4];
|
||||
EXTERN uchar inuxi8[8];
|
||||
EXTERN char* outfile;
|
||||
EXTERN int32 nsymbol;
|
||||
EXTERN char* thestring;
|
||||
|
||||
void addlib(char *src, char *obj);
|
||||
void copyhistfrog(char *buf, int nbuf);
|
||||
|
Loading…
Reference in New Issue
Block a user