[PATCH] dtoc: Allow overriding cc with $CC

Simon Glass sjg at chromium.org
Mon Jun 7 17:48:07 CEST 2021


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):
     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)
 
     # If we don't have a directory, put it in the tools tempdir
-- 
2.32.0.rc1.229.g3e70b5a671-goog



More information about the U-Boot mailing list