[PATCH] dtoc: Allow overriding cc with $CC
Alper Nebi Yasak
alpernebiyasak at gmail.com
Mon Jun 7 20:08:40 CEST 2021
On 07/06/2021 18:48, Simon Glass wrote:
> From: Patrick Georgi <pgeorgi at google.com>
> The Chromium OS build system isn't particularly happy about using cc
> directly and fails the build when doing so.
> Update it to allow overriding this.
> Signed-off-by: Patrick Georgi <pgeorgi at google.com>
> Signed-off-by: Simon Glass <sjg at chromium.org>
> tools/dtoc/fdt_util.py | 1 +
> 1 file changed, 1 insertion(+)
> diff --git a/tools/dtoc/fdt_util.py b/tools/dtoc/fdt_util.py
> index 37e96b98642..34e1844ff18 100644
> --- a/tools/dtoc/fdt_util.py
> +++ b/tools/dtoc/fdt_util.py
> @@ -74,6 +74,7 @@ def EnsureCompiled(fname, tmpdir=None, capture_stderr=False):
Some important diff context:
cc, args = tools.GetTargetCompileTool('cc')
> for path in search_paths:
> args.extend(['-I', path])
> args += ['-o', dts_input, fname]
> + cc = os.environ.get('CC') or 'cc'
> command.Run(cc, *args)
Since commit 1e4687aa47ed ("binman: Use target-specific tools when
cross-compiling") this should already be using the value from the CC
environment variable, handled in GetTargetCompileTool call above.
In fact, it should have been defaulting to "gcc" with no environment
variables set, but it doesn't do that. I'll send a patch.
> # If we don't have a directory, put it in the tools tempdir
More information about the U-Boot