Commit c5b45aa9 authored by Ian Lance Taylor's avatar Ian Lance Taylor

cmd/go: use .o, not .{5,6,8}, for gccgo created object files

R=golang-dev, r
CC=golang-dev
https://golang.org/cl/5861044
parent a84e3baf
......@@ -1466,6 +1466,8 @@ func (b *builder) cgo(p *Package, cgoExe, obj string, gccfiles []string) (outGo,
cgoflags := []string{}
// TODO: make cgo not depend on $GOARCH?
objExt := archChar
if p.Standard && p.ImportPath == "runtime/cgo" {
cgoflags = append(cgoflags, "-import_runtime_cgo=false")
}
......@@ -1474,6 +1476,7 @@ func (b *builder) cgo(p *Package, cgoExe, obj string, gccfiles []string) (outGo,
if prefix := gccgoPrefix(p); prefix != "" {
cgoflags = append(cgoflags, "-gccgoprefix="+gccgoPrefix(p))
}
objExt = "o"
}
if err := b.run(p.Dir, p.ImportPath, cgoExe, "-objdir", obj, cgoflags, "--", cgoCFLAGS, p.CgoFiles); err != nil {
return nil, nil, err
......@@ -1481,7 +1484,7 @@ func (b *builder) cgo(p *Package, cgoExe, obj string, gccfiles []string) (outGo,
outGo = append(outGo, gofiles...)
// cc _cgo_defun.c
defunObj := obj + "_cgo_defun." + archChar
defunObj := obj + "_cgo_defun." + objExt
if err := buildToolchain.cc(b, p, obj, defunObj, defunC); err != nil {
return nil, nil, err
}
......@@ -1524,7 +1527,7 @@ func (b *builder) cgo(p *Package, cgoExe, obj string, gccfiles []string) (outGo,
}
// cc _cgo_import.ARCH
importObj := obj + "_cgo_import." + archChar
importObj := obj + "_cgo_import." + objExt
if err := buildToolchain.cc(b, p, obj, importObj, importC); err != nil {
return nil, nil, err
}
......
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