external toolchain: Only prefix path if specified
authorSonic Zhang <sonic.zhang@analog.com>
Thu, 10 Mar 2011 11:12:41 +0000 (19:12 +0800)
committerPeter Korsgaard <jacmet@sunsite.dk>
Mon, 28 Mar 2011 08:00:37 +0000 (10:00 +0200)
Only prefix the external toolchain calls with its absolute path if
BR2_TOOLCHAIN_EXTERNAL_PATH is set, otherwise just assume it will
be available in the path.

Signed-off-by: Sonic Zhang <sonic.zhang@analog.com>
Acked-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
package/Makefile.in

index e1ffe158b52c79375a9d7fd7e72c300ac23592b2..f98b3e79226e98dfe6cc981d44c7793d8ea4a130 100644 (file)
@@ -115,7 +115,11 @@ TOOLCHAIN_EXTERNAL_LOCATION=$(TOOLCHAIN_EXTERNAL_DIR)
 else
 TOOLCHAIN_EXTERNAL_LOCATION=$(call qstrip,$(BR2_TOOLCHAIN_EXTERNAL_PATH))
 endif
+ifneq ($(TOOLCHAIN_EXTERNAL_LOCATION),)
 TARGET_CROSS=$(TOOLCHAIN_EXTERNAL_LOCATION)/bin/$(TOOLCHAIN_EXTERNAL_PREFIX)-
+else
+TARGET_CROSS=$(TOOLCHAIN_EXTERNAL_PREFIX)-
+endif
 endif
 
 # Quotes are needed for spaces et al in path components.