diff mbox

[U-Boot,09/17] buildman: Put the toolchain path first instead of last in PATH

Message ID 1417480447-5763-10-git-send-email-sjg@chromium.org
State Accepted
Delegated to: Simon Glass
Headers show

Commit Message

Simon Glass Dec. 2, 2014, 12:33 a.m. UTC
If:

1. Toolchains A and B have the same filename
2. Toolchain A is in the PATH
3. Toolchain B is given in ~/.buildman and buildman uses it to build

then buildman will add toolchain B to the end of its path but will not
necessarily use it since U-Boot will find toolchain A first in the PATH.

Try to fix this by putting the toolchain first in the path instead of
last.

Signed-off-by: Simon Glass <sjg@chromium.org>
---

 tools/buildman/toolchain.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox

Patch

diff --git a/tools/buildman/toolchain.py b/tools/buildman/toolchain.py
index e2a851e..ab08193 100644
--- a/tools/buildman/toolchain.py
+++ b/tools/buildman/toolchain.py
@@ -89,7 +89,7 @@  class Toolchain:
         """
         env = dict(os.environ)
         env['CROSS_COMPILE'] = self.cross
-        env['PATH'] += (':' + self.path)
+        env['PATH'] = self.path + ':' + env['PATH']
         return env