diff options
author | Leah Rowe <leah@libreboot.org> | 2024-11-29 00:36:40 +0000 |
---|---|---|
committer | Leah Rowe <leah@libreboot.org> | 2024-11-29 00:39:35 +0000 |
commit | 7f6e47d27c673e29250cbdac03e326b9ba044b05 (patch) | |
tree | 53be3d715c88080e19eccec8c830a927df0f33d2 | |
parent | f4b6aeea281407d2dd5aafcd823b2d5ca8c9131f (diff) |
trees: reset PATH per-target
Otherwise, if PATH was set before, it will be re-used
again in the next pass. We previously unset CROSS_COMPILE
to avoid using the wrong cross-compiler when switching to
another target within a multi-tree project such as U-Boot.
Well, PATH was also being set, to use coreboot xgcc first.
This is fine, but the next target may not use the same one.
This patch solves a similar problem to the following patch
which was mentioned above:
commit 637c0a1521a03e3f65de85dcc5ffd478b37a5360
Author: Leah Rowe <leah@libreboot.org>
Date: Tue Nov 19 02:52:28 2024 +0000
trees: unset CROSS_COMPILE per target
Signed-off-by: Leah Rowe <leah@libreboot.org>
-rwxr-xr-x | script/trees | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/script/trees b/script/trees index 8f468d49..698d2b34 100755 --- a/script/trees +++ b/script/trees @@ -9,6 +9,8 @@ set -u -e . "include/lib.sh" . "include/git.sh" +XBMKPATH="$PATH" + eval `setvars "" xarch srcdir premake cmakedir xlang mode makeargs elfdir cmd \ project target target_dir targets xtree _f release bootstrapargs mkhelper \ autoconfargs listfile autogenargs btype tree rev tree_depend build_depend \ @@ -74,6 +76,7 @@ build_targets() for x in $targets; do unset CROSS_COMPILE + export PATH="$XBMKPATH" [ "$x" = "list" ] && x_ ls -1 "config/$project" && \ listfile="" && break target="$x" |