From 8f3d3eada9afd9ecc19d180aa2899062435501b6 Mon Sep 17 00:00:00 2001 From: Leah Rowe Date: Sun, 21 Jan 2024 06:26:23 +0000 Subject: re-use crossgcc builds on the coreboot trees don't build crossgcc twice, especially if two coreboot trees use the same revision! Signed-off-by: Leah Rowe --- include/git.sh | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/git.sh b/include/git.sh index d1e9389b..7840671f 100755 --- a/include/git.sh +++ b/include/git.sh @@ -4,7 +4,7 @@ # This file is only used by update/project/trees -eval "$(setvars "" _target rev _xm loc url bkup_url depend)" +eval "$(setvars "" _target rev _xm loc url bkup_url depend xtree)" fetch_project_trees() { @@ -97,10 +97,21 @@ git_prep() if [ "$project" != "coreboot" ] || [ $# -gt 2 ]; then [ ! -f "$tmpgit/.gitmodules" ] || git -C "$tmpgit" submodule \ update --init --checkout || err "git_prep $_loc: !submod" + if [ "$project" = "coreboot" ] && [ -n "$xtree" ] && \ + [ "$xtree" != "$tree" ]; then + ( + cd "$tmpgit/util" || err "prep $_loc: !cd $tmpgit/util" + rm -Rf crossgcc || err "prep $_loc: !rm xgcc" + ln -s "../../$xtree/util/crossgcc" crossgcc || \ + err "prep $_loc: can't create xgcc symlink" + ) || err "prep $_loc: can't create xgcc symlink" + fi fi [ "$_loc" = "${_loc%/*}" ] || x_ mkdir -p "${_loc%/*}" mv "$tmpgit" "$_loc" || err "git_prep: !mv $tmpgit $_loc" + [ -n "$xtree" ] && [ ! -d "src/coreboot/$xtree" ] && \ + x_ ./update project trees -f coreboot "$xtree"; return 0 } git_am_patches() -- cgit v1.2.1