Commit d10ede5e authored by Russ Cox's avatar Russ Cox

[dev.cc] cmd/dist, cmd/go: stop building C implementations of compilers, assemblers

Also stop building objwriter, which was only used by them.

Change-Id: Ia2353abd9426026a81a263cb46a72dd39c360ce4
Reviewed-on: https://go-review.googlesource.com/5634Reviewed-by: default avatarRob Pike <r@golang.org>
parent 9c8c0e72
...@@ -536,21 +536,6 @@ var deptab = []struct { ...@@ -536,21 +536,6 @@ var deptab = []struct {
"anames8.c", "anames8.c",
"anames9.c", "anames9.c",
}}, }},
{"cmd/gc", []string{
"opnames.h",
}},
{"cmd/5g", []string{
"$GOROOT/pkg/obj/${GOHOSTOS}_$GOHOSTARCH/libgc.a",
}},
{"cmd/6g", []string{
"$GOROOT/pkg/obj/${GOHOSTOS}_$GOHOSTARCH/libgc.a",
}},
{"cmd/8g", []string{
"$GOROOT/pkg/obj/${GOHOSTOS}_$GOHOSTARCH/libgc.a",
}},
{"cmd/9g", []string{
"$GOROOT/pkg/obj/${GOHOSTOS}_$GOHOSTARCH/libgc.a",
}},
{"cmd/5l", []string{ {"cmd/5l", []string{
"$GOROOT/pkg/obj/${GOHOSTOS}_$GOHOSTARCH/libld.a", "$GOROOT/pkg/obj/${GOHOSTOS}_$GOHOSTARCH/libld.a",
}}, }},
...@@ -589,7 +574,6 @@ var gentab = []struct { ...@@ -589,7 +574,6 @@ var gentab = []struct {
nameprefix string nameprefix string
gen func(string, string) gen func(string, string)
}{ }{
{"opnames.h", gcopnames},
{"anames5.c", mkanames}, {"anames5.c", mkanames},
{"anames6.c", mkanames}, {"anames6.c", mkanames},
{"anames8.c", mkanames}, {"anames8.c", mkanames},
...@@ -656,10 +640,10 @@ func install(dir string) { ...@@ -656,10 +640,10 @@ func install(dir string) {
case "lib9", "libbio", "liblink", "cmd/gc", "cmd/ld": case "lib9", "libbio", "liblink", "cmd/gc", "cmd/ld":
islib = true islib = true
isgo = false isgo = false
case "cmd/5a", "cmd/5g", "cmd/5l", case "cmd/5l",
"cmd/6a", "cmd/6g", "cmd/6l", "cmd/6l",
"cmd/8a", "cmd/8g", "cmd/8l", "cmd/8l",
"cmd/9a", "cmd/9g", "cmd/9l": "cmd/9l":
isgo = false isgo = false
} }
...@@ -1134,12 +1118,8 @@ var buildorder = []string{ ...@@ -1134,12 +1118,8 @@ var buildorder = []string{
"lib9", "lib9",
"libbio", "libbio",
"liblink", "liblink",
"cmd/gc", // must be before g
"cmd/ld", // must be before l "cmd/ld", // must be before l
"cmd/%sl", // must be before a, g "cmd/%sl", // must be before a, g
"cmd/%sa",
"cmd/%sg",
// Go libraries and programs for bootstrap. // Go libraries and programs for bootstrap.
"runtime", "runtime",
...@@ -1184,12 +1164,6 @@ var buildorder = []string{ ...@@ -1184,12 +1164,6 @@ var buildorder = []string{
"text/template", "text/template",
"go/doc", "go/doc",
"go/build", "go/build",
"cmd/internal/obj",
"cmd/internal/obj/arm",
"cmd/internal/obj/i386",
"cmd/internal/obj/ppc64",
"cmd/internal/obj/x86",
"cmd/objwriter",
"cmd/go", "cmd/go",
} }
...@@ -1210,7 +1184,6 @@ var cleantab = []string{ ...@@ -1210,7 +1184,6 @@ var cleantab = []string{
"cmd/9a", "cmd/9a",
"cmd/9g", "cmd/9g",
"cmd/9l", "cmd/9l",
"cmd/gc",
"cmd/go", "cmd/go",
"lib9", "lib9",
"libbio", "libbio",
......
...@@ -23,6 +23,14 @@ import ( ...@@ -23,6 +23,14 @@ import (
// which are commands, and entries beginning with internal/, which are // which are commands, and entries beginning with internal/, which are
// packages supporting the commands. // packages supporting the commands.
var bootstrapDirs = []string{ var bootstrapDirs = []string{
"5a",
"5g",
"6a",
"6g",
"8a",
"8g",
"9a",
"9g",
"asm", "asm",
"asm/internal/arch", "asm/internal/arch",
"asm/internal/asm", "asm/internal/asm",
...@@ -35,15 +43,6 @@ var bootstrapDirs = []string{ ...@@ -35,15 +43,6 @@ var bootstrapDirs = []string{
"internal/obj/i386", "internal/obj/i386",
"internal/obj/ppc64", "internal/obj/ppc64",
"internal/obj/x86", "internal/obj/x86",
"new5a",
"new6a",
"new8a",
"new9a",
"new5g",
"new6g",
"new8g",
"new9g",
"objwriter",
} }
func bootstrapBuildTools() { func bootstrapBuildTools() {
......
...@@ -1645,11 +1645,6 @@ func (gcToolchain) linker() string { ...@@ -1645,11 +1645,6 @@ func (gcToolchain) linker() string {
return tool(archChar + "l") return tool(archChar + "l")
} }
// verifyCompiler specifies whether to check the compilers written in Go
// against the assemblers written in C. If set, asm will run both (say) 6g and new6g
// and fail if the two produce different output files.
const verifyCompiler = true
func (gcToolchain) gc(b *builder, p *Package, archive, obj string, asmhdr bool, importArgs []string, gofiles []string) (ofile string, output []byte, err error) { func (gcToolchain) gc(b *builder, p *Package, archive, obj string, asmhdr bool, importArgs []string, gofiles []string) (ofile string, output []byte, err error) {
if archive != "" { if archive != "" {
ofile = archive ofile = archive
...@@ -1695,11 +1690,6 @@ func (gcToolchain) gc(b *builder, p *Package, archive, obj string, asmhdr bool, ...@@ -1695,11 +1690,6 @@ func (gcToolchain) gc(b *builder, p *Package, archive, obj string, asmhdr bool,
} }
output, err = b.runOut(p.Dir, p.ImportPath, nil, args...) output, err = b.runOut(p.Dir, p.ImportPath, nil, args...)
if err == nil && verifyCompiler {
if err := toolVerify(b, p, "new"+archChar+"g", ofile, args); err != nil {
return ofile, output, err
}
}
return ofile, output, err return ofile, output, err
} }
...@@ -1717,9 +1707,6 @@ func (gcToolchain) asm(b *builder, p *Package, obj, ofile, sfile string) error { ...@@ -1717,9 +1707,6 @@ func (gcToolchain) asm(b *builder, p *Package, obj, ofile, sfile string) error {
return err return err
} }
if verifyAsm { if verifyAsm {
if err := toolVerify(b, p, "new"+archChar+"a", ofile, args); err != nil {
return err
}
if err := toolVerify(b, p, "asm", ofile, args); err != nil { if err := toolVerify(b, p, "asm", ofile, args); err != nil {
return err return err
} }
......
...@@ -391,6 +391,14 @@ const ( ...@@ -391,6 +391,14 @@ const (
// goTools is a map of Go program import path to install target directory. // goTools is a map of Go program import path to install target directory.
var goTools = map[string]targetDir{ var goTools = map[string]targetDir{
"cmd/5a": toTool,
"cmd/5g": toTool,
"cmd/6a": toTool,
"cmd/6g": toTool,
"cmd/8a": toTool,
"cmd/8g": toTool,
"cmd/9a": toTool,
"cmd/9g": toTool,
"cmd/addr2line": toTool, "cmd/addr2line": toTool,
"cmd/api": toTool, "cmd/api": toTool,
"cmd/asm": toTool, "cmd/asm": toTool,
...@@ -398,17 +406,8 @@ var goTools = map[string]targetDir{ ...@@ -398,17 +406,8 @@ var goTools = map[string]targetDir{
"cmd/dist": toTool, "cmd/dist": toTool,
"cmd/fix": toTool, "cmd/fix": toTool,
"cmd/link": toTool, "cmd/link": toTool,
"cmd/new5a": toTool,
"cmd/new6a": toTool,
"cmd/new8a": toTool,
"cmd/new9a": toTool,
"cmd/new5g": toTool,
"cmd/new6g": toTool,
"cmd/new8g": toTool,
"cmd/new9g": toTool,
"cmd/nm": toTool, "cmd/nm": toTool,
"cmd/objdump": toTool, "cmd/objdump": toTool,
"cmd/objwriter": toTool,
"cmd/pack": toTool, "cmd/pack": toTool,
"cmd/pprof": toTool, "cmd/pprof": toTool,
"cmd/trace": toTool, "cmd/trace": toTool,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment