]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
buildman: Fix CROSS_COMPILE output for sandbox
authorSimon Glass <sjg@chromium.org>
Fri, 10 Mar 2023 20:48:51 +0000 (12:48 -0800)
committerSimon Glass <sjg@chromium.org>
Tue, 14 Mar 2023 22:08:52 +0000 (16:08 -0600)
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.

Signed-off-by: Simon Glass <sjg@chromium.org>
tools/buildman/toolchain.py

index 688f2e26872600cfb05c30713038391a21e21ae4..241e8e69307f610921edc1912d78230962d0eec7 100644 (file)
@@ -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: