Skip to content
This repository has been archived by the owner on Apr 22, 2023. It is now read-only.

Commit

Permalink
build: test uname -m first, then uname -p
Browse files Browse the repository at this point in the history
Prevent false i386 on 64-bit OS X.
  • Loading branch information
TooTallNate authored and bnoordhuis committed Feb 20, 2012
1 parent 4af673e commit af4a96c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions configure
Expand Up @@ -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',
Expand All @@ -157,7 +157,7 @@ def host_arch():
}

if arches.get(arch) == None:
arch = uname('-m')
arch = uname('-p')

return arches.get(arch, 'ia32')

Expand Down

0 comments on commit af4a96c

Please sign in to comment.