mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
cmd/cgo: support Linux/ARM
Part 3 of CL 5601044 (cgo: Linux/ARM support) R=golang-dev, dave, rsc CC=golang-dev https://golang.org/cl/5991066
This commit is contained in:
parent
5cffce611a
commit
9602dd5e87
1 changed files with 3 additions and 1 deletions
|
|
@ -730,13 +730,15 @@ func (p *Package) gccName() (ret string) {
|
|||
return
|
||||
}
|
||||
|
||||
// gccMachine returns the gcc -m flag to use, either "-m32" or "-m64".
|
||||
// gccMachine returns the gcc -m flag to use, either "-m32", "-m64" or "-marm".
|
||||
func (p *Package) gccMachine() []string {
|
||||
switch goarch {
|
||||
case "amd64":
|
||||
return []string{"-m64"}
|
||||
case "386":
|
||||
return []string{"-m32"}
|
||||
case "arm":
|
||||
return []string{"-marm"} // not thumb
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue