From 71091e03a7a5bc5cfe1d0d2f56a5b145768524d5 Mon Sep 17 00:00:00 2001 From: Leah Rowe Date: Wed, 17 Jul 2024 23:25:44 +0100 Subject: [PATCH] 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 --- script/trees | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/script/trees b/script/trees index d3ac03f..2cee435 100755 --- a/script/trees +++ b/script/trees @@ -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 }