Patchwork [RFCv1,03/11] toolchain-external: make ext-tool.mk includable in all cases

login
register
mail settings
Submitter Thomas Petazzoni
Date Sept. 5, 2013, 9:27 p.m.
Message ID <1378416469-17708-4-git-send-email-thomas.petazzoni@free-electrons.com>
Download mbox | patch
Permalink /patch/272981/
State Accepted
Commit c58a80b4cd6b620622e567218ded34104c6d46b6
Headers show

Comments

Thomas Petazzoni - Sept. 5, 2013, 9:27 p.m.
The ext-tool.mk logic uses the TOOLCHAIN_EXTERNAL_PREFIX variable
unconditionally, even if the external toolchain is not used. Until now
this wasn't a problem since ext-tool.mk was only included when the
external toolchain backend was selected, but the next patches are
going to include this file unconditionally.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
 toolchain/toolchain-external/ext-tool.mk | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
Thomas De Schampheleire - Sept. 8, 2013, 3:31 p.m.
On Thu, Sep 5, 2013 at 11:27 PM, Thomas Petazzoni
<thomas.petazzoni@free-electrons.com> wrote:
> The ext-tool.mk logic uses the TOOLCHAIN_EXTERNAL_PREFIX variable
> unconditionally, even if the external toolchain is not used. Until now
> this wasn't a problem since ext-tool.mk was only included when the
> external toolchain backend was selected, but the next patches are
> going to include this file unconditionally.
>
> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
> ---
>  toolchain/toolchain-external/ext-tool.mk | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/toolchain/toolchain-external/ext-tool.mk b/toolchain/toolchain-external/ext-tool.mk
> index e92afbd..fbcbe6c 100644
> --- a/toolchain/toolchain-external/ext-tool.mk
> +++ b/toolchain/toolchain-external/ext-tool.mk
> @@ -1,4 +1,3 @@
> -
>  #
>  # This file implements the support for external toolchains, i.e
>  # toolchains that have not been produced by Buildroot itself and that
> @@ -112,8 +111,10 @@ TOOLCHAIN_EXTERNAL_DIR=$(call qstrip,$(BR2_TOOLCHAIN_EXTERNAL_PATH))
>  endif
>
>  ifeq ($(TOOLCHAIN_EXTERNAL_DIR),)
> +ifneq ($(TOOLCHAIN_EXTERNAL_PREFIX),)
>  # if no path set, figure it out from path
>  TOOLCHAIN_EXTERNAL_BIN := $(shell dirname $(shell which $(TOOLCHAIN_EXTERNAL_PREFIX)-gcc))
> +endif
>  else
>  ifeq ($(BR2_bfin),y)
>  TOOLCHAIN_EXTERNAL_BIN := $(TOOLCHAIN_EXTERNAL_DIR)/$(TOOLCHAIN_EXTERNAL_PREFIX)/bin

Acked-by: Thomas De Schampheleire <thomas.de.schampheleire@gmail.com>

Patch

diff --git a/toolchain/toolchain-external/ext-tool.mk b/toolchain/toolchain-external/ext-tool.mk
index e92afbd..fbcbe6c 100644
--- a/toolchain/toolchain-external/ext-tool.mk
+++ b/toolchain/toolchain-external/ext-tool.mk
@@ -1,4 +1,3 @@ 
-
 #
 # This file implements the support for external toolchains, i.e
 # toolchains that have not been produced by Buildroot itself and that
@@ -112,8 +111,10 @@  TOOLCHAIN_EXTERNAL_DIR=$(call qstrip,$(BR2_TOOLCHAIN_EXTERNAL_PATH))
 endif
 
 ifeq ($(TOOLCHAIN_EXTERNAL_DIR),)
+ifneq ($(TOOLCHAIN_EXTERNAL_PREFIX),)
 # if no path set, figure it out from path
 TOOLCHAIN_EXTERNAL_BIN := $(shell dirname $(shell which $(TOOLCHAIN_EXTERNAL_PREFIX)-gcc))
+endif
 else
 ifeq ($(BR2_bfin),y)
 TOOLCHAIN_EXTERNAL_BIN := $(TOOLCHAIN_EXTERNAL_DIR)/$(TOOLCHAIN_EXTERNAL_PREFIX)/bin