xcompile: break out big loop content into function
Change-Id: Id98afa956a2af7113a6ef848b436d661a1fa39f2
Signed-off-by: Patrick Georgi <patrick@georgi-clan.de>
Reviewed-on: http://review.coreboot.org/5745
Reviewed-by: Edward O'Callaghan <eocallaghan@alterapraxis.com>
Tested-by: build bot (Jenkins)
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
diff --git a/util/xcompile/xcompile b/util/xcompile/xcompile
index cb27306..239c233 100644
--- a/util/xcompile/xcompile
+++ b/util/xcompile/xcompile
@@ -185,8 +185,9 @@
TWIDTH="32"
}
-# This loops over all supported architectures.
-for architecture in $SUPPORTED_ARCHITECTURE; do
+test_architecture() {
+ architecture=$1
+
GCCPREFIX="invalid"
if type arch_config_$architecture > /dev/null; then
arch_config_$architecture
@@ -225,5 +226,10 @@
detect_special_flags "$architecture"
report_arch_toolchain
+}
+
+# This loops over all supported architectures.
+for architecture in $SUPPORTED_ARCHITECTURE; do
+ test_architecture $architecture
done