summaryrefslogtreecommitdiff
path: root/ybd.py
diff options
context:
space:
mode:
authorPaul Martin <paul.martin@codethink.co.uk>2015-06-16 12:30:27 +0000
committerPaul Martin <paul.martin@codethink.co.uk>2015-06-16 12:30:27 +0000
commit8c31ccfdf1d9f3198b68569d75f182354bb783d9 (patch)
tree49de24a4e47ec19bc196ce0995b337dc7f87ef1f /ybd.py
parent45e676d848624e00d30840317dae8c9a2e50f0b1 (diff)
downloadybd-8c31ccfdf1d9f3198b68569d75f182354bb783d9.tar.gz
MIPS: Autodetect host platform and set target arch correctly
Diffstat (limited to 'ybd.py')
-rwxr-xr-xybd.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/ybd.py b/ybd.py
index f2c7fcc..7c957a7 100755
--- a/ybd.py
+++ b/ybd.py
@@ -41,6 +41,13 @@ if len(sys.argv) == 3:
arch = sys.argv[2]
else:
arch = platform.machine()
+ if arch in ('mips', 'mips64'):
+ if arch == 'mips':
+ arch = 'mips32'
+ if sys.byteorder == 'big':
+ arch = arch + 'b'
+ else:
+ arch = arch + 'l'
with app.setup(target, arch):
with app.timer('TOTAL', 'ybd starts, version %s' %