mirror of git://gcc.gnu.org/git/gcc.git
cmd/go: Adjust finding gccgo to match current upstream sources.
From-SVN: r219406
This commit is contained in:
parent
adfac8dfed
commit
b44fb4c37a
|
|
@ -1783,15 +1783,22 @@ func (gcToolchain) cc(b *builder, p *Package, objdir, ofile, cfile string) error
|
||||||
// The Gccgo toolchain.
|
// The Gccgo toolchain.
|
||||||
type gccgoToolchain struct{}
|
type gccgoToolchain struct{}
|
||||||
|
|
||||||
func (gccgoToolchain) compiler() string {
|
var gccgoName, gccgoBin string
|
||||||
if v := os.Getenv("GOC"); v != "" {
|
|
||||||
return v
|
func init() {
|
||||||
|
gccgoName = os.Getenv("GCCGO")
|
||||||
|
if gccgoName == "" {
|
||||||
|
gccgoName = defaultGCCGO
|
||||||
}
|
}
|
||||||
return defaultGOC
|
gccgoBin, _ = exec.LookPath(gccgoName)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (tools gccgoToolchain) linker() string {
|
func (gccgoToolchain) compiler() string {
|
||||||
return tools.compiler()
|
return gccgoBin
|
||||||
|
}
|
||||||
|
|
||||||
|
func (gccgoToolchain) linker() string {
|
||||||
|
return gccgoBin
|
||||||
}
|
}
|
||||||
|
|
||||||
func (tools gccgoToolchain) gc(b *builder, p *Package, archive, obj string, importArgs []string, gofiles []string) (ofile string, output []byte, err error) {
|
func (tools gccgoToolchain) gc(b *builder, p *Package, archive, obj string, importArgs []string, gofiles []string) (ofile string, output []byte, err error) {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue