diff mbox

[07/13] autobuild-run: get host arch once

Message ID 1424899050-24932-8-git-send-email-dywi@mailerd.de
State Accepted
Headers show

Commit Message

André Erdmann Feb. 25, 2015, 9:17 p.m. UTC
in get_toolchain_configs()

Signed-off-by: André Erdmann <dywi@mailerd.de>
---
 scripts/autobuild-run | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)
diff mbox

Patch

diff --git a/scripts/autobuild-run b/scripts/autobuild-run
index fee68b7..e0971cb 100755
--- a/scripts/autobuild-run
+++ b/scripts/autobuild-run
@@ -162,15 +162,17 @@  def get_toolchain_configs():
     with urlopen_closing(tc_cfg_uri) as r:
         l = decode_byte_list(r.readlines())
     configs = []
+
+    (_, _, _, _, hostarch) = os.uname()
+    if hostarch == 'i686' or hostarch == 'x86_64':
+        hostarch = 'x86'
+
     for row in csv.reader(l):
         config = {}
         config["url"] = row[0]
         config["hostarch"] = row[1]
         # Ignore toolchains that are not built for the appropriate
         # host architecture
-        (_, _, _, _, hostarch) = os.uname()
-        if hostarch == 'i686' or hostarch == 'x86_64':
-            hostarch = 'x86'
         if hostarch != config["hostarch"]:
             continue
         config["libc"] = row[2]