mirror of
https://github.com/golang/go
synced 2024-11-21 16:04:45 -07:00
cgo: fix build: use $GCC, not $CC
I'm not sure there's a better way. Cgo is juggling two different C compilers. Fixes #1008. R=iant CC=golang-dev https://golang.org/cl/1972044
This commit is contained in:
parent
3bf656327e
commit
31339c3224
@ -450,11 +450,11 @@ func (p *Package) rewriteRef(f *File) {
|
||||
}
|
||||
}
|
||||
|
||||
// gccName returns the name of the compiler to run. Use CC if set in
|
||||
// gccName returns the name of the compiler to run. Use $GCC if set in
|
||||
// the environment, otherwise just "gcc".
|
||||
|
||||
func (p *Package) gccName() (ret string) {
|
||||
if ret = os.Getenv("CC"); ret == "" {
|
||||
if ret = os.Getenv("GCC"); ret == "" {
|
||||
ret = "gcc"
|
||||
}
|
||||
return
|
||||
|
Loading…
Reference in New Issue
Block a user