"$GOROOT/include/ureg_arm.h",
"$GOROOT/include/ureg_x86.h",
}},
+ {"liblink", {
+ "$GOROOT/include/u.h",
+ "$GOROOT/include/utf.h",
+ "$GOROOT/include/fmt.h",
+ "$GOROOT/include/libc.h",
+ "$GOROOT/include/bio.h",
+ "$GOROOT/include/ar.h",
+ "$GOROOT/include/link.h",
+ "anames5.c",
+ "anames6.c",
+ "anames8.c",
+ }},
{"cmd/cc", {
"-pgen.c",
"-pswt.c",
{"cmd/5c", {
"../cc/pgen.c",
"../cc/pswt.c",
- "../5l/enam.c",
"$GOROOT/pkg/obj/$GOOS_$GOARCH/libcc.a",
}},
{"cmd/6c", {
"../cc/pgen.c",
"../cc/pswt.c",
- "../6l/enam.c",
"$GOROOT/pkg/obj/$GOOS_$GOARCH/libcc.a",
}},
{"cmd/8c", {
"../cc/pgen.c",
"../cc/pswt.c",
- "../8l/enam.c",
"$GOROOT/pkg/obj/$GOOS_$GOARCH/libcc.a",
}},
{"cmd/5g", {
"../gc/plive.c",
"../gc/popt.c",
"../gc/popt.h",
- "../5l/enam.c",
"$GOROOT/pkg/obj/$GOOS_$GOARCH/libgc.a",
}},
{"cmd/6g", {
"../gc/plive.c",
"../gc/popt.c",
"../gc/popt.h",
- "../6l/enam.c",
"$GOROOT/pkg/obj/$GOOS_$GOARCH/libgc.a",
}},
{"cmd/8g", {
"../gc/plive.c",
"../gc/popt.c",
"../gc/popt.h",
- "../8l/enam.c",
"$GOROOT/pkg/obj/$GOOS_$GOARCH/libgc.a",
}},
{"cmd/5l", {
"../ld/*",
- "enam.c",
}},
{"cmd/6l", {
"../ld/*",
- "enam.c",
}},
{"cmd/8l", {
"../ld/*",
- "enam.c",
}},
{"cmd/go", {
"zdefaultcc.go",
}},
{"cmd/", {
+ "$GOROOT/pkg/obj/$GOOS_$GOARCH/liblink.a",
"$GOROOT/pkg/obj/$GOOS_$GOARCH/libmach.a",
"$GOROOT/pkg/obj/$GOOS_$GOARCH/libbio.a",
"$GOROOT/pkg/obj/$GOOS_$GOARCH/lib9.a",
void (*gen)(char*, char*);
} gentab[] = {
{"opnames.h", gcopnames},
- {"enam.c", mkenam},
+ {"anames5.c", mkanames},
+ {"anames6.c", mkanames},
+ {"anames8.c", mkanames},
{"zasm_", mkzasm},
{"zdefaultcc.go", mkzdefaultcc},
{"zsys_", mkzsys},
{"zruntime_defs_", mkzruntimedefs},
{"zversion.go", mkzversion},
{"zaexperiment.h", mkzexperiment},
+
+ // not generated anymore, but delete the file if we see it
+ {"enam.c", nil},
};
// install installs the library, package, or binary associated with dir,
p = files.p[i];
elem = lastelem(p);
for(j=0; j<nelem(gentab); j++) {
+ if(gentab[j].gen == nil)
+ continue;
if(hasprefix(elem, gentab[j].nameprefix)) {
if(vflag > 1)
errprintf("generate %s\n", p);
"lib9",
"libbio",
"libmach",
+ "liblink",
"misc/pprof",
"lib9",
"libbio",
"libmach",
+ "liblink",
"pkg/bufio",
"pkg/bytes",
"pkg/container/heap",
vfree(&fields);
}
-// mkenam reads [568].out.h and writes enam.c
+// mkanames reads [568].out.h and writes anames[568].c
// The format is much the same as the Go opcodes above.
void
-mkenam(char *dir, char *file)
+mkanames(char *dir, char *file)
{
int i, ch;
Buf in, b, out;
binit(&out);
vinit(&lines);
- ch = dir[xstrlen(dir)-2];
- bprintf(&b, "%s/../%cl/%c.out.h", dir, ch, ch);
+ ch = file[xstrlen(file)-3];
+ bprintf(&b, "%s/../cmd/%cl/%c.out.h", dir, ch, ch);
readfile(&in, bstr(&b));
splitlines(&lines, bstr(&in));
- bwritestr(&out, "char* anames[] = {\n");
+ bprintf(&out, "char* anames%c[] = {\n", ch);
for(i=0; i<lines.len; i++) {
if(hasprefix(lines.p[i], "\tA")) {
p = xstrstr(lines.p[i], ",");