summaryrefslogtreecommitdiff
path: root/util/xcompile
diff options
context:
space:
mode:
authorPatrick Georgi <patrick@georgi-clan.de>2014-05-14 14:30:08 +0200
committerPatrick Georgi <patrick@georgi-clan.de>2014-05-15 10:07:22 +0200
commitadc241326c6b751911d4ef6763aa9bea0fa12934 (patch)
tree9128281dc0fb113c3e2bb6dbc2e4377b7688a8d4 /util/xcompile
parentee46712da0d02b2f11923e89bcddb7dc84c0939f (diff)
downloadcoreboot-adc241326c6b751911d4ef6763aa9bea0fa12934.tar.xz
xcompile: move tempfile cleanup closer together
Change-Id: I4fb3041d505402de3cbcd7ec079dde5e168a90cf Signed-off-by: Patrick Georgi <patrick@georgi-clan.de> Reviewed-on: http://review.coreboot.org/5744 Tested-by: build bot (Jenkins) Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
Diffstat (limited to 'util/xcompile')
-rw-r--r--util/xcompile/xcompile11
1 files changed, 6 insertions, 5 deletions
diff --git a/util/xcompile/xcompile b/util/xcompile/xcompile
index e256c0d749..cb27306935 100644
--- a/util/xcompile/xcompile
+++ b/util/xcompile/xcompile
@@ -33,6 +33,12 @@ clean_up() {
fi
}
+# Create temporary file(s).
+TMPFILE="$(mktemp /tmp/temp.XXXX 2>/dev/null || echo /tmp/temp.78gOIUGz)"
+touch "$TMPFILE"
+trap clean_up EXIT
+
+
program_exists() {
type "$1" >/dev/null 2>&1
}
@@ -155,11 +161,6 @@ AR_${TARCH}:=${GCCPREFIX}ar
EOF
}
-# Create temporary file(s).
-TMPFILE="$(mktemp /tmp/temp.XXXX 2>/dev/null || echo /tmp/temp.78gOIUGz)"
-touch "$TMPFILE"
-trap clean_up EXIT
-
# Architecture definition
SUPPORTED_ARCHITECTURE="x86 armv7 aarch64"