summaryrefslogtreecommitdiff
path: root/common/flash.c
diff options
context:
space:
mode:
authorJerome Forissier <jerome.forissier@linaro.org>2024-09-11 11:58:14 +0200
committerTom Rini <trini@konsulko.com>2024-09-24 13:41:20 -0600
commit0c2d7ad3e0635a52d291035d9044922ef7b19e7a (patch)
treeb956b77e979bb3cb42557945d14c67f35ed974e8 /common/flash.c
parent78d898eec080b02059c8dc09318b8761044fea85 (diff)
buildman/toolchain.py: do not set CROSS_COMPILE for sandbox
When building for sandbox, self.cross is empty. In MakeEnvironment(), CROSS_COMPILE is defined to be self.cross (with or without a full path), optionally prefixed by the toolchain wrapper defined in ~/.buildman. This is fine when self.cross is not empty, but it doesn't make sense when it is: - Either there is no wrapper and we end up with an empty CROSS_COMPILE which is the same as not defining it (the host compiler will be used), - Or there is a wrapper and CROSS_COMPILE will contain only the wrapper which obviously is not a valid compiler, hence an error. Test case: $ sudo apt install ccache $ grep -q toolchain-wrapper ~/.buildman || \ printf "[toolchain-wrapper]\nwrapper = ccache\n" >>~/.buildman $ make mrproper $ ./tools/buildman/buildman sandbox_noinst $ ./tools/buildman/buildman sandbox_noinst Building current source for 1 boards (1 thread, 24 jobs per thread) sandbox: + sandbox_noinst +arch/sandbox/lib/reloc_sandbox_efi.c:10:15: error: operator '==' has no left operand + 10 | #if HOST_ARCH == HOST_ARCH_X86_64 + | ^~ [...] The GetEnvArgs function is modified too, since the VAR_CROSS_COMPILE case has the same issue. In tools/buildman/test.py, testGetEnvArgs is extended and testMakeEnvironment is added. They check the 'arm' and 'sandbox' toolchains, with and without a wrapper. Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org> Reviewed-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'common/flash.c')
0 files changed, 0 insertions, 0 deletions