From df66dbd72de9de7de7540a29153ad757c97a8a16 Mon Sep 17 00:00:00 2001 From: Leah Rowe Date: Mon, 24 Jun 2024 14:23:56 +0100 Subject: [PATCH] trees: try xgcc build twice if first attempt fails sometimes buildgcc just fails for like no reason. we had this the other day and another fix was made to the trees script, to mitigate; the user ran it again and buildgcc worked just fine. run it twice, and then call err only if the second one fails. Signed-off-by: Leah Rowe --- script/trees | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/script/trees b/script/trees index 3d3d67d..2595c38 100755 --- a/script/trees +++ b/script/trees @@ -168,8 +168,11 @@ check_cross_compiler() export CROSS_COMPILE="${xarch% *}-" [ -n "$xlang" ] && export BUILD_LANGUAGES="$xlang" - x_ make -C "$cbdir" crossgcc-${_xarch%-*} $cbmakeargs - done + # sometimes buildgcc fails for like no reason. try twice. + make -C "$cbdir" crossgcc-${_xarch%-*} $cbmakeargs || \ + make -C "$cbdir" crossgcc-${_xarch%-*} $cbmakeargs || \ + $err "!mkxgcc $project/$xtree '${_xarch%-*}' '$cbmakeargs'" + done; return 0 } check_coreboot_utils()