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

Commit

Permalink
build: detect host_arch better
Browse files Browse the repository at this point in the history
  • Loading branch information
skomski authored and bnoordhuis committed Feb 13, 2012
1 parent 3f43b1c commit 09ccbef
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions configure
Expand Up @@ -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():
Expand Down

0 comments on commit 09ccbef

Please sign in to comment.