From e0187df61bea98d506c8cddf5d7674d09cb50390 Mon Sep 17 00:00:00 2001 From: Patrick Georgi Date: Wed, 14 May 2014 14:32:11 +0200 Subject: xcompile: break out big loop content into function Change-Id: Id98afa956a2af7113a6ef848b436d661a1fa39f2 Signed-off-by: Patrick Georgi Reviewed-on: http://review.coreboot.org/5745 Reviewed-by: Edward O'Callaghan Tested-by: build bot (Jenkins) Reviewed-by: Stefan Reinauer --- util/xcompile/xcompile | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/util/xcompile/xcompile b/util/xcompile/xcompile index cb27306935..239c23375c 100644 --- a/util/xcompile/xcompile +++ b/util/xcompile/xcompile @@ -185,8 +185,9 @@ arch_config_x86() { 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 @@ for architecture in $SUPPORTED_ARCHITECTURE; do detect_special_flags "$architecture" report_arch_toolchain +} + +# This loops over all supported architectures. +for architecture in $SUPPORTED_ARCHITECTURE; do + test_architecture $architecture done -- cgit v1.2.3