summaryrefslogtreecommitdiff
path: root/script
diff options
context:
space:
mode:
authorLeah Rowe <leah@libreboot.org>2024-07-17 23:25:44 +0100
committerLeah Rowe <leah@libreboot.org>2024-07-17 23:25:44 +0100
commitbf85246c4cd9d4f970ed6b3f66b435d39106a182 (patch)
treeef25bac62f8e215043af6c06b43c4dfba87b2f30 /script
parentc6e6d96ce16b821b5e956d98715907fb9d8ae096 (diff)
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>
Diffstat (limited to 'script')
-rwxr-xr-xscript/trees7
1 files changed, 4 insertions, 3 deletions
diff --git a/script/trees b/script/trees
index d3ac03f9..2cee435d 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
}