All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] dtoc: Allow overriding cc with $CC
@ 2021-06-07 15:48 Simon Glass
  2021-06-07 18:08 ` Alper Nebi Yasak
  0 siblings, 1 reply; 2+ messages in thread
From: Simon Glass @ 2021-06-07 15:48 UTC (permalink / raw)
  To: U-Boot Mailing List; +Cc: Patrick Georgi, Simon Glass, Alper Nebi Yasak

From: Patrick Georgi <pgeorgi@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@google.com>
Signed-off-by: Simon Glass <sjg@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


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] dtoc: Allow overriding cc with $CC
  2021-06-07 15:48 [PATCH] dtoc: Allow overriding cc with $CC Simon Glass
@ 2021-06-07 18:08 ` Alper Nebi Yasak
  0 siblings, 0 replies; 2+ messages in thread
From: Alper Nebi Yasak @ 2021-06-07 18:08 UTC (permalink / raw)
  To: Simon Glass, U-Boot Mailing List; +Cc: Patrick Georgi

On 07/06/2021 18:48, Simon Glass wrote:
> From: Patrick Georgi <pgeorgi@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@google.com>
> Signed-off-by: Simon Glass <sjg@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
> 

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-06-07 18:08 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-07 15:48 [PATCH] dtoc: Allow overriding cc with $CC Simon Glass
2021-06-07 18:08 ` Alper Nebi Yasak

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.