cmd/dist: use gccgo as bootstrap compiler

Fixes #10092

This change makes it possible to use gccgo 5 as the GOROOT_BOOTSTRAP
compiler.

Change-Id: Ie3a312781ac1a09ea77f95b5a78c9488d437e0aa
Reviewed-on: https://go-review.googlesource.com/8809
Run-TryBot: Dave Cheney <dave@cheney.net>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
This commit is contained in:
Dave Cheney 2015-04-13 21:50:47 +10:00
parent 8543cc5635
commit 67805eaa95
5 changed files with 31 additions and 13 deletions

View File

@ -2,6 +2,8 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// +build !gccgo
TEXT ·cpuid(SB),$0-12
MOVL ax+8(FP), AX
CPUID

View File

@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// +build !386,!amd64
// +build !386,!amd64,!gccgo
#include "textflag.h"

12
src/cmd/dist/util.go vendored
View File

@ -480,18 +480,6 @@ func xsamefile(f1, f2 string) bool {
return os.SameFile(fi1, fi2)
}
func cpuid(info *[4]uint32, ax uint32)
func cansse2() bool {
if gohostarch != "386" && gohostarch != "amd64" {
return false
}
var info [4]uint32
cpuid(&info, 1)
return info[3]&(1<<26) != 0 // SSE2
}
func xgetgoarm() string {
if goos == "nacl" {
// NaCl guarantees VFPv3 and is always cross-compiled.

19
src/cmd/dist/util_gc.go vendored Normal file
View File

@ -0,0 +1,19 @@
// Copyright 2015 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// +build !gccgo
package main
func cpuid(info *[4]uint32, ax uint32)
func cansse2() bool {
if gohostarch != "386" && gohostarch != "amd64" {
return false
}
var info [4]uint32
cpuid(&info, 1)
return info[3]&(1<<26) != 0 // SSE2
}

9
src/cmd/dist/util_gccgo.go vendored Normal file
View File

@ -0,0 +1,9 @@
// Copyright 2015 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// +build gccgo
package main
func cansse2() bool { return false }