summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorLeah Rowe <leah@libreboot.org>2025-08-23 17:38:29 +0100
committerLeah Rowe <leah@libreboot.org>2025-08-23 17:38:29 +0100
commit89238c057928376c9ebee92c1a5a2976ef8de33c (patch)
tree09eba253e1232b4463897f017dd3951f9f27c655 /include
parent07562e3f281492cb040072e78468114d1a960bee (diff)
tree.sh: tidy up check_cross_compiler
group related operations together, without whitespace. declare all variables at the start of the function. Signed-off-by: Leah Rowe <leah@libreboot.org>
Diffstat (limited to 'include')
-rw-r--r--include/tree.sh11
1 files changed, 3 insertions, 8 deletions
diff --git a/include/tree.sh b/include/tree.sh
index 75dd230b..a3b8de08 100644
--- a/include/tree.sh
+++ b/include/tree.sh
@@ -224,29 +224,24 @@ check_cross_compiler()
cbdir="src/coreboot/$tree"
xfix="${1%-*}" && [ "$xfix" = "x86_64" ] && xfix="x64"
xgccfile="elf/coreboot/$tree/xgcc_${xfix}_was_compiled"
- x_ mkdir -p "elf/coreboot/$tree"
+ xgccargs="crossgcc-$xfix UPDATED_SUBMODULES=1 CPUS=$XBMK_THREADS"
[ "$project" != "coreboot" ] && cbdir="src/coreboot/default"
[ -n "$xtree" ] && cbdir="src/coreboot/$xtree"
x_ ./mk -f coreboot "${cbdir#src/coreboot/}"
+ x_ mkdir -p "elf/coreboot/$tree"
export PATH="$xbmkpwd/$cbdir/util/crossgcc/xgcc/bin:$PATH"
export CROSS_COMPILE="${xarch% *}-"
[ -n "$xlang" ] && export BUILD_LANGUAGES="$xlang"
-
[ -f "$xgccfile" ] && return 0 # skip build if already done
- # match gnat-X to gcc
check_gnu_path gcc gnat || x_ check_gnu_path gnat gcc
-
- xgccargs="crossgcc-$xfix UPDATED_SUBMODULES=1 CPUS=$XBMK_THREADS"
make -C "$cbdir" $xgccargs || x_ make -C "$cbdir" $xgccargs
-
x_ touch "$xgccfile"
- # we only want to mess with hostcc to build xgcc
- remkdir "$XBMK_CACHE/gnupath"
+ remkdir "$XBMK_CACHE/gnupath" # reset hostcc
}
# fix mismatching gcc/gnat versions on debian trixie/sid. as of december 2024,