build: test uname -m first, then uname -p

Prevent false i386 on 64-bit OS X.
This commit is contained in:
Nathan Rajlich authored and Ben Noordhuis committed 2012-02-20 11:49:25 +01:00
1 parent 4af673e161
commit af4a96ce6e
1 file changed
+2 -2
Vendored
+2 -2
View File
@@ -148,7 +148,7 @@ def uname(switch):
def host_arch():
"""Host architecture. One of arm, ia32 or x64."""
arch = uname('-p')
arch = uname('-m')
arches = {
'arm': 'arm',
'x86': 'ia32',
@@ -157,7 +157,7 @@ def host_arch():
}
if arches.get(arch) == None:
arch = uname('-m')
arch = uname('-p')
return arches.get(arch, 'ia32')