When initially adding support for building with clang with buildman, there was some minimum logic in the Makefile to inform clang what the expected target was, without CROSS_COMPILE being set. This has long been deprecated / removed from the Linux kernel, and also not functional in U-Boot. The normal expectation, especially so that an intentional mix-and-match of GNU binutils and LLVM C compiler can be used relies on CROSS_COMPILE also being set and passed. To have buildman do this we only need to remove the logic that was not setting CROSS_COMPILE when we had an override. Correct the comment about what override_toolchain does as it is functional outside of sandbox too.
Signed-off-by: Tom Rini <[email protected]> --- Cc: Simon Glass <[email protected]> tools/buildman/toolchain.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/tools/buildman/toolchain.py b/tools/buildman/toolchain.py index 5e5bb4b0aedd..80468dfb4175 100644 --- a/tools/buildman/toolchain.py +++ b/tools/buildman/toolchain.py @@ -57,7 +57,7 @@ class Toolchain: arch: Architecture of toolchain as determined from the first component of the filename. E.g. arm-linux-gcc becomes arm priority: Toolchain priority (0=highest, 20=lowest) - override_toolchain: Toolchain to use for sandbox, overriding the normal + override_toolchain: Toolchain to use for CC/HOSTC, overriding the normal one """ def __init__(self, fname, test, verbose=False, priority=PRIORITY_CALC, @@ -208,10 +208,7 @@ class Toolchain: wrapper = self.GetWrapper() - if self.override_toolchain: - # We'll use MakeArgs() to provide this - pass - elif full_path and self.cross: + if full_path and self.cross: env[b'CROSS_COMPILE'] = tools.to_bytes( wrapper + os.path.join(self.path, self.cross)) elif self.cross: -- 2.43.0

