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

Prevent false i386 on 64-bit OS X.
This commit is contained in:
Nathan Rajlich 2012-02-18 12:02:53 -08:00 committed by Ben Noordhuis
parent 4af673e161
commit af4a96ce6e

4
configure vendored
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')