}
// disable word wrapping in error messages
gccargs = append(gccargs, "-fmessage-length=0")
- if gohostos == "darwin" {
+ if gohostos == "darwin" && gohostarch != "arm" {
// golang.org/issue/5261
gccargs = append(gccargs, "-mmacosx-version-min=10.6")
}
if gohostarch == "" {
// Default Unix system.
- out := run("", CheckExit, "uname", "-m")
+ out := run("", CheckExit, "uname", "-m", "-v")
switch {
case strings.Contains(out, "x86_64"), strings.Contains(out, "amd64"):
gohostarch = "amd64"
gohostarch = "ppc64le"
case strings.Contains(out, "ppc64"):
gohostarch = "ppc64"
+ case gohostos == "darwin":
+ if strings.Contains(out, "RELEASE_ARM_") {
+ gohostarch = "arm"
+ }
default:
fatal("unknown architecture: %s", out)
}
// NaCl guarantees VFPv3 and is always cross-compiled.
return "7"
}
+ if goos == "darwin" {
+ // Assume all darwin/arm devices are have VFPv3. This
+ // port is also mostly cross-compiled, so it makes little
+ // sense to auto-detect the setting.
+ return "7"
+ }
if gohostarch != "arm" || goos != gohostos {
// Conservative default for cross-compilation.
return "5"