summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlper Nebi Yasak <alpernebiyasak@gmail.com>2021-06-07 21:11:37 +0300
committerSimon Glass <sjg@chromium.org>2021-07-06 10:38:03 -0600
commit880e4768c20b99b1f9a50f35c180f8522dd82c9a (patch)
treee4cf6c83d72574b8acbc7e9cef89b695d4cdd367
parente712245d08d95fac6467fd0d05a12d6506aeda2d (diff)
tools: Fix default target compile tools in Python tools
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>
-rw-r--r--tools/patman/tools.py2
1 files changed, 0 insertions, 2 deletions
diff --git a/tools/patman/tools.py b/tools/patman/tools.py
index e5f391b7aa..ec95a543bd 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