diff options
Diffstat (limited to 'src/cmd/dist')
-rw-r--r-- | src/cmd/dist/build.c | 23 | ||||
-rw-r--r-- | src/cmd/dist/buildruntime.c | 41 | ||||
-rw-r--r-- | src/cmd/dist/unix.c | 4 |
3 files changed, 12 insertions, 56 deletions
diff --git a/src/cmd/dist/build.c b/src/cmd/dist/build.c index bfb3d15b8..5feb77612 100644 --- a/src/cmd/dist/build.c +++ b/src/cmd/dist/build.c @@ -48,8 +48,8 @@ static char *okgoarch[] = { "amd64", "amd64p32", "386", - "power64", - "power64le", + "ppc64", + "ppc64le", }; // The known operating systems. @@ -588,9 +588,6 @@ static struct { }}, {"runtime", { "zaexperiment.h", - "zsys_$GOOS_$GOARCH.s", - "zgoarch_$GOARCH.go", - "zgoos_$GOOS.go", "zversion.go", }}, }; @@ -614,7 +611,6 @@ static struct { {"anames8.c", mkanames}, {"anames9.c", mkanames}, {"zdefaultcc.go", mkzdefaultcc}, - {"zsys_", mkzsys}, {"zversion.go", mkzversion}, {"zaexperiment.h", mkzexperiment}, @@ -1391,6 +1387,11 @@ static char *cleantab[] = { "unicode/utf8", }; +static char *runtimegen[] = { + "zaexperiment.h", + "zversion.go", +}; + static void clean(void) { @@ -1417,15 +1418,11 @@ clean(void) xremove(bpathf(&b, "%s/%s", bstr(&path), cleantab[i]+4)); } - // remove src/runtime/z* unconditionally, + // remove src/runtime/zaexperiment.h and // except leave zgoos and zgoarch, now maintained with go generate. - vreset(&dir); bpathf(&path, "%s/src/runtime", goroot); - xreaddir(&dir, bstr(&path)); - for(j=0; j<dir.len; j++) { - if(hasprefix(dir.p[j], "z") && !hasprefix(dir.p[j], "zg")) - xremove(bpathf(&b, "%s/%s", bstr(&path), dir.p[j])); - } + for(j=0; j<nelem(runtimegen); j++) + xremove(bpathf(&b, "%s/%s", bstr(&path), runtimegen[j])); if(rebuildall) { // Remove object tree. diff --git a/src/cmd/dist/buildruntime.c b/src/cmd/dist/buildruntime.c index 38e99e116..add689768 100644 --- a/src/cmd/dist/buildruntime.c +++ b/src/cmd/dist/buildruntime.c @@ -66,44 +66,3 @@ mkzexperiment(char *dir, char *file) bfree(&out); bfree(&exp); } - -#define MAXWINCB 2000 /* maximum number of windows callbacks allowed */ - -// mkzsys writes zsys_$GOOS_$GOARCH.s, -// which contains arch or os specific asm code. -// -void -mkzsys(char *dir, char *file) -{ - int i; - Buf out; - - USED(dir); - - binit(&out); - - bwritestr(&out, "// auto generated by go tool dist\n\n"); - if(streq(goos, "linux")) { - bwritestr(&out, "// +build !android\n\n"); - } - - if(streq(goos, "windows")) { - bwritef(&out, - "// runtime·callbackasm is called by external code to\n" - "// execute Go implemented callback function. It is not\n" - "// called from the start, instead runtime·compilecallback\n" - "// always returns address into runtime·callbackasm offset\n" - "// appropriately so different callbacks start with different\n" - "// CALL instruction in runtime·callbackasm. This determines\n" - "// which Go callback function is executed later on.\n" - "TEXT runtime·callbackasm(SB),7,$0\n"); - for(i=0; i<MAXWINCB; i++) { - bwritef(&out, "\tCALL\truntime·callbackasm1(SB)\n"); - } - bwritef(&out, "\tRET\n"); - } - - writefile(&out, file, 0); - - bfree(&out); -} diff --git a/src/cmd/dist/unix.c b/src/cmd/dist/unix.c index 893ed5cdd..0fd17c150 100644 --- a/src/cmd/dist/unix.c +++ b/src/cmd/dist/unix.c @@ -709,9 +709,9 @@ main(int argc, char **argv) else if(contains(u.machine, "arm")) gohostarch = "arm"; else if(contains(u.machine, "ppc64le")) - gohostarch = "power64le"; + gohostarch = "ppc64le"; else if(contains(u.machine, "ppc64")) - gohostarch = "power64"; + gohostarch = "ppc64"; else fatal("unknown architecture: %s", u.machine); } |