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 <leah@libreboot.org>
audit2
Leah Rowe 2024-06-24 14:23:56 +01:00 committed by Leah Rowe
parent bd59d01ea2
commit df66dbd72d
1 changed files with 5 additions and 2 deletions

View File

@ -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()