]> git.kernelconcepts.de Git - karo-tx-uboot.git/commitdiff
buildman: Put the toolchain path first instead of last in PATH
authorSimon Glass <sjg@chromium.org>
Tue, 2 Dec 2014 00:33:59 +0000 (17:33 -0700)
committerSimon Glass <sjg@chromium.org>
Thu, 15 Jan 2015 05:16:53 +0000 (21:16 -0800)
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

index e2a851ebd6fb24cd37f368753f9183301953f8a1..ab08193349002aa6199dae6a377c6194303c01a8 100644 (file)
@@ -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