Skip to content
This repository
Browse code

build: detect host_arch better

  • Loading branch information...
commit 09ccbef3bbfc4ca14c58dbed4c3c067bd1f1e14c 1 parent 3f43b1c
Karl Skomski Skomski authored bnoordhuis committed

Showing 1 changed file with 8 additions and 7 deletions. Show diff stats Hide diff stats

  1. +8 7 configure
15 configure
@@ -148,17 +148,18 @@ def uname(switch):
148 148
149 149 def host_arch():
150 150 """Host architecture. One of arm, ia32 or x64."""
151   - arch = uname('-p')
152   -
153   - if arch == 'unknown':
154   - arch = uname('-m')
155   -
156   - return {
  151 + arch = uname('-p')
  152 + arches = {
157 153 'arm': 'arm',
158 154 'x86': 'ia32',
159 155 'i386': 'ia32',
160 156 'x86_64': 'x64',
161   - }.get(arch, 'ia32')
  157 + }
  158 +
  159 + if arches.get(arch) == None:
  160 + arch = uname('-m')
  161 +
  162 + return arches.get(arch, 'ia32')
162 163
163 164
164 165 def target_arch():

0 comments on commit 09ccbef

Please sign in to comment.
Something went wrong with that request. Please try again.