Skip to contentSkip to conversation

Revert "buildman: Correct CROSS_COMPILE output for sandbox"

PATCH In review Simon Glass 1 participant 4 messages Mar 10, 2023 – Mar 13, 2023

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 Revert "buildman: Correct CROSS_COMPILE output for sandbox"

This reverts commit bd0a548ad4a155fec29473d4cc8e135832926973.

---

 tools/buildman/toolchain.py | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
tools/buildman/toolchain.py +2 -1
index 8f9130bdcdf..688f2e26872 100644
@@ -156,8 +156,9 @@ class Toolchain:
         Returns:
             Value of that environment variable or arguments
         """
+        wrapper = self.GetWrapper()
         if which == VAR_CROSS_COMPILE:
-            return self.GetWrapper() + self.cross
+            return wrapper + os.path.join(self.path, self.cross)
         elif which == VAR_PATH:
             return self.path
         elif which == VAR_ARCH:
Signature · 1 line
2.40.0.rc1.284.g88254d51c5-goog
#1 lore raw

PATCH 2/2 buildman: Fix CROSS_COMPILE output for sandbox

The previous attempt at fixing this broke the normal usage of the -A flag.

At present, 'buildman -A sandbox' adds the path containing the toolchain. We can assume that this is in the path and we don't want to set CROSS_COMPILE=/bin/

Change this to align with what MakeEnvironment() does, but only for sandbox boards.

---

 tools/buildman/toolchain.py | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
tools/buildman/toolchain.py +3 -2
index 688f2e26872..241e8e69307 100644
@@ -156,9 +156,10 @@ class Toolchain:
         Returns:
             Value of that environment variable or arguments
         """
-        wrapper = self.GetWrapper()
         if which == VAR_CROSS_COMPILE:
-            return wrapper + os.path.join(self.path, self.cross)
+            wrapper = self.GetWrapper()
+            base = '' if self.arch == 'sandbox' else self.path
+            return wrapper + os.path.join(base, self.cross)
         elif which == VAR_PATH:
             return self.path
         elif which == VAR_ARCH:
Signature · 1 line
2.40.0.rc1.284.g88254d51c5-goog
#2 lore raw

Re: [PATCH 2/2] buildman: Fix CROSS_COMPILE output for sandbox

The previous attempt at fixing this broke the normal usage of the -A flag.

At present, 'buildman -A sandbox' adds the path containing the toolchain. We can assume that this is in the path and we don't want to set CROSS_COMPILE=/bin/

Change this to align with what MakeEnvironment() does, but only for sandbox boards.

---

 tools/buildman/toolchain.py | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

Applied to u-boot-dm/next, thanks!