Permalink
Browse files

build: detect host_arch better

  • Loading branch information...
1 parent 3f43b1c commit 09ccbef3bbfc4ca14c58dbed4c3c067bd1f1e14c @skomski skomski committed with bnoordhuis Feb 13, 2012
Showing with 8 additions and 7 deletions.
  1. +8 −7 configure
View
15 configure
@@ -148,17 +148,18 @@ def uname(switch):
def host_arch():
"""Host architecture. One of arm, ia32 or x64."""
- arch = uname('-p')
-
- if arch == 'unknown':
- arch = uname('-m')
-
- return {
+ arch = uname('-p')
+ arches = {
'arm': 'arm',
'x86': 'ia32',
'i386': 'ia32',
'x86_64': 'x64',
- }.get(arch, 'ia32')
+ }
+
+ if arches.get(arch) == None:
+ arch = uname('-m')
+
+ return arches.get(arch, 'ia32')
def target_arch():

0 comments on commit 09ccbef

Please sign in to comment.