[Buildroot] [PATCH 2/2] buildroot:package: Avoids prefix absolute compiler path when external toolchain path is empty.

Thomas Petazzoni thomas.petazzoni at free-electrons.com
Mon Aug 6 12:50:30 UTC 2012


Le Mon, 6 Aug 2012 19:17:26 +0800,
Sonic Zhang <sonic.adi at gmail.com> a écrit :

> From: Sonic Zhang <sonic.zhang at analog.com>
> 
> Current external compiler is always prefixed by he customer path.
> When external toolchain path is left empty, this patch avoids prefix absolute path.
> 
> Signed-off-by: Sonic Zhang <sonic.zhang at analog.com>
> ---
>  package/Makefile.in |    5 +++++
>  1 files changed, 5 insertions(+), 0 deletions(-)
> 
> diff --git a/package/Makefile.in b/package/Makefile.in
> index 6fad224..ecbdc00 100644
> --- a/package/Makefile.in
> +++ b/package/Makefile.in
> @@ -101,8 +101,13 @@ TARGET_LDFLAGS=$(call qstrip,$(BR2_TARGET_LDFLAGS))
>  ifeq ($(BR2_TOOLCHAIN_BUILDROOT)$(BR2_TOOLCHAIN_CTNG),y)
>  TARGET_CROSS=$(HOST_DIR)/usr/bin/$(GNU_TARGET_NAME)-
>  else
> +TOOLCHAIN_EXTERNAL_LOCATION=$(call qstrip,$(BR2_TOOLCHAIN_EXTERNAL_PATH))
> +ifeq ($(TOOLCHAIN_EXTERNAL_LOCATION),)
> +TARGET_CROSS=$(call qstrip,$(BR2_TOOLCHAIN_EXTERNAL_PREFIX))-
> +else
>  TARGET_CROSS=$(HOST_DIR)/usr/bin/$(call qstrip,$(BR2_TOOLCHAIN_EXTERNAL_PREFIX))-
>  endif
> +endif

I am sorry but this is not correct. It will lead to packages calling
directly the compiler without going through our external toolchain
wrapper, which is mandatory to ensure that the correct sysroot (and
other flags) are passed correctly.

Passing an empty BR2_TOOLCHAIN_EXTERNAL_PATH works just fine for me if
the toolchain binaries are in the PATH.

Could you explain in more details what you are trying to achieve here?

Thanks,

Thomas
-- 
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com


More information about the buildroot mailing list