diff options
author | Leah Rowe <leah@libreboot.org> | 2025-05-04 08:07:06 +0100 |
---|---|---|
committer | Leah Rowe <leah@libreboot.org> | 2025-05-05 12:18:22 +0100 |
commit | b3bb9eba598f65ffc01b17964f9cc3f0a9fd432e (patch) | |
tree | b4175459cb53669cfdea5906a06746df93db4370 | |
parent | 41f12003b8d15807b1f5ecbf8480e61c13d581ff (diff) |
mk: tidy up check_cross_compiler
only initialise variables at the point they're needed.
Signed-off-by: Leah Rowe <leah@libreboot.org>
-rwxr-xr-x | mk | 6 |
1 files changed, 2 insertions, 4 deletions
@@ -297,7 +297,6 @@ check_project_hashes() check_cross_compiler() { remkdir "$XBMK_CACHE/gnupath" - xgccargs="UPDATED_SUBMODULES=1 CPUS=$XBMK_THREADS" cbdir="src/coreboot/$tree" [ "$project" != "coreboot" ] && cbdir="src/coreboot/default" @@ -309,12 +308,11 @@ check_cross_compiler() export CROSS_COMPILE="${xarch% *}-" [ -n "$xlang" ] && export BUILD_LANGUAGES="$xlang" - xfix="${1%-*}" && [ "$xfix" = "x86_64" ] && xfix="x64" - # match gnat-X to gcc check_gnu_path gcc gnat || x_ check_gnu_path gnat gcc - # sometimes buildgcc fails for like no reason. try twice. + xfix="${1%-*}" && [ "$xfix" = "x86_64" ] && xfix="x64" + xgccargs="UPDATED_SUBMODULES=1 CPUS=$XBMK_THREADS" make -C "$cbdir" crossgcc-$xfix $xgccargs || \ x_ make -C "$cbdir" crossgcc-$xfix $xgccargs |