All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] tools: Fix default target compile tools in Python tools
@ 2021-06-07 18:11 Alper Nebi Yasak
  2021-07-04 20:15 ` Simon Glass
  0 siblings, 1 reply; 2+ messages in thread
From: Alper Nebi Yasak @ 2021-06-07 18:11 UTC (permalink / raw)
  To: u-boot; +Cc: Simon Glass, Patrick Georgi, Alper Nebi Yasak

In commit 1e4687aa47ed ("binman: Use target-specific tools when
cross-compiling"), a utility function was implemented to get preferred
compilation tools using environment variables like CC and CROSS_COMPILE.
Although it intended to provide custom default tools (same as those in
the global Makefile) when no relevant variables were set (for example
using "gcc" for "cc"), it is only doing so when CROSS_COMPILE is set and
returning the literal name of the tool otherwise.

Remove the check for an empty CROSS_COMPILE, which makes the function
use it as an empty prefix to the custom defaults and return the intended
executables.

Fixes: 1e4687aa47ed ("binman: Use target-specific tools when cross-compiling")
Signed-off-by: Alper Nebi Yasak <alpernebiyasak@gmail.com>
---

 tools/patman/tools.py | 2 --
 1 file changed, 2 deletions(-)

diff --git a/tools/patman/tools.py b/tools/patman/tools.py
index e5f391b7aa9a..ec95a543bd92 100644
--- a/tools/patman/tools.py
+++ b/tools/patman/tools.py
@@ -292,8 +292,6 @@ def GetTargetCompileTool(name, cross_compile=None):
 
     if cross_compile is None:
         cross_compile = env.get('CROSS_COMPILE', '')
-    if not cross_compile:
-        return name, []
 
     if name in ('as', 'ar', 'nm', 'ldr', 'strip', 'objcopy', 'objdump'):
         target_name = cross_compile + name
-- 
2.32.0.rc2


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

* Re: [PATCH] tools: Fix default target compile tools in Python tools
  2021-06-07 18:11 [PATCH] tools: Fix default target compile tools in Python tools Alper Nebi Yasak
@ 2021-07-04 20:15 ` Simon Glass
  0 siblings, 0 replies; 2+ messages in thread
From: Simon Glass @ 2021-07-04 20:15 UTC (permalink / raw)
  To: Alper Nebi Yasak; +Cc: Simon Glass, Patrick Georgi, u-boot

In commit 1e4687aa47ed ("binman: Use target-specific tools when
cross-compiling"), a utility function was implemented to get preferred
compilation tools using environment variables like CC and CROSS_COMPILE.
Although it intended to provide custom default tools (same as those in
the global Makefile) when no relevant variables were set (for example
using "gcc" for "cc"), it is only doing so when CROSS_COMPILE is set and
returning the literal name of the tool otherwise.

Remove the check for an empty CROSS_COMPILE, which makes the function
use it as an empty prefix to the custom defaults and return the intended
executables.

Fixes: 1e4687aa47ed ("binman: Use target-specific tools when cross-compiling")
Signed-off-by: Alper Nebi Yasak <alpernebiyasak@gmail.com>
---

 tools/patman/tools.py | 2 --
 1 file changed, 2 deletions(-)

Applied to u-boot-dm/next, thanks!

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

end of thread, other threads:[~2021-07-04 20:15 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-07 18:11 [PATCH] tools: Fix default target compile tools in Python tools Alper Nebi Yasak
2021-07-04 20:15 ` Simon Glass

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.