[Buildroot] [PATCHv2] toolchain: fix installing gconv libs with multi-arch toolchain

Thomas Petazzoni thomas.petazzoni at free-electrons.com
Sun Mar 8 21:48:31 UTC 2015


Dear Yann E. MORIN,

On Sun, 22 Feb 2015 23:23:04 +0100, Yann E. MORIN wrote:

> diff --git a/toolchain/toolchain.mk b/toolchain/toolchain.mk
> index 3f9900b..51294c3 100644
> --- a/toolchain/toolchain.mk
> +++ b/toolchain/toolchain.mk
> @@ -17,28 +17,39 @@ endif
>  ifeq ($(BR2_TOOLCHAIN_GLIBC_GCONV_LIBS_COPY),y)
>  GCONV_LIBS = $(call qstrip,$(BR2_TOOLCHAIN_GLIBC_GCONV_LIBS_LIST))
>  define COPY_GCONV_LIBS
> -	$(Q)if [ -z "$(GCONV_LIBS)" ]; then \
> -		$(INSTALL) -m 0644 -D $(STAGING_DIR)/usr/lib/gconv/gconv-modules \
> -				      $(TARGET_DIR)/usr/lib/gconv/gconv-modules; \
> -		$(INSTALL) -m 0644 $(STAGING_DIR)/usr/lib/gconv/*.so \
> +	$(Q)machine=$$($(TOOLCHAIN_EXTERNAL_CC) $(TOOLCHAIN_EXTERNAL_CFLAGS) -dumpmachine); \

Unless I'm mistaken, this piece of code copying gconv libraries is used
for both the internal and external toolchain backends, no? If that's
the case, then using TOOLCHAIN_EXTERNAL_* here seems wrong, no?

And indeed, the resulting code is not really nice. For sure not worse
than the average toolchain-external.mk code :-/

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com


More information about the buildroot mailing list