trees: hardcode makeargs for xgcc

if coreboot itself is being handled, crossgcc has the
correct makeargs, setting the number of build threads.

however, other projects can specify "xtree" pointing to
a given coreboot tree, and build crossgcc for it.

one workaround may be to use trees -d coreboot TREE,
but then extra code would have to be written to make
it avoid other things like building cbfstool, which is
not required for just building crossgcc.

the cleanest way to do it is to simply hardcode it. the
value is set exactly the same as regular coreboot makeargs.

this fixes a bug, where some builds of crossgcc are made
on a single thread, rather than using XBMK_THREADS. this
patch forces it to always use CPUS=$XBMK_THREADS

Signed-off-by: Leah Rowe <leah@libreboot.org>
This commit is contained in:
Leah Rowe
2024-07-17 23:25:44 +01:00
parent c6e6d96ce1
commit bf85246c4c
+4 -3
View File
@@ -204,6 +204,7 @@ check_project_hashes()
check_cross_compiler()
{
xgccargs="UPDATED_SUBMODULES=1 CPUS=$XBMK_THREADS"
for _xarch in $xarch; do
cbdir="src/coreboot/$tree"
[ "$project" != "coreboot" ] && cbdir="src/coreboot/default"
@@ -216,9 +217,9 @@ check_cross_compiler()
[ -n "$xlang" ] && export BUILD_LANGUAGES="$xlang"
# sometimes buildgcc fails for like no reason. try twice.
make -C "$cbdir" crossgcc-${_xarch%-*} $makeargs || \
make -C "$cbdir" crossgcc-${_xarch%-*} $makeargs || \
$err "!mkxgcc $project/$xtree '${_xarch%-*}' '$makeargs'"
make -C "$cbdir" crossgcc-${_xarch%-*} $xgccargs || \
make -C "$cbdir" crossgcc-${_xarch%-*} $xgccargs || \
$err "!mkxgcc $project/$xtree '${_xarch%-*}' '$xgccargs'"
done; return 0
}