summaryrefslogtreecommitdiff
path: root/src/cmd/ld/lib.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/cmd/ld/lib.c')
-rw-r--r--src/cmd/ld/lib.c16
1 files changed, 2 insertions, 14 deletions
diff --git a/src/cmd/ld/lib.c b/src/cmd/ld/lib.c
index f702bae23..b70c87439 100644
--- a/src/cmd/ld/lib.c
+++ b/src/cmd/ld/lib.c
@@ -720,21 +720,9 @@ mywhatsys(void)
{
char *s;
- goroot = getenv("GOROOT");
- goos = getenv("GOOS");
-
- if(goroot == nil) {
- s = getenv("HOME");
- if(s == nil)
- s = "/home/ken";
- goroot = mal(strlen(s) + 10);
- strcpy(goroot, s);
- strcat(goroot, "/go");
- }
+ goroot = getgoroot();
+ goos = getgoos();
goarch = thestring; // ignore $GOARCH - we know who we are
- if(goos == nil) {
- goos = "linux";
- }
}
int