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
if(goroot == nil) {
goroot = getenv("GOROOT");
goos = getenv("GOOS");
- goarch = getenv("GOARCH");
+ goarch = thestring;
}
if(islocalname(name)) {
char *s;
goroot = getenv("GOROOT");
- goarch = getenv("GOARCH");
goos = getenv("GOOS");
if(goroot == nil) {
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";
}
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);