[Buildroot] [PATCH] toolchain-external: fix lib64 symlinks

Markos Chandras markos.chandras at gmail.com
Tue Aug 13 08:37:37 UTC 2013


Hi Samuel,

> ---
>
> This patch needs heavy testing, especially with external non-CodeSourcery
> toolchains, and maybe with the old CodeSourcery ones.
>
> Once again, it raises the question, does 64-bit toolchain need 32-bit
> stuff?

It does for MIPS/n32. n32 is a 32bit ABI for MIPS64, so a lib32->lib
symlink is required.

> ---
>  Makefile                                 |  4 ++--
>  toolchain/helpers.mk                     | 23 ++++++++++++++++++-----
>  toolchain/toolchain-external/ext-tool.mk |  1 -
>  3 files changed, 20 insertions(+), 8 deletions(-)
>
> diff --git a/Makefile b/Makefile
> index fcfc0be..756d4b1 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -424,8 +424,8 @@ $(BUILD_DIR) $(HOST_DIR) $(BINARIES_DIR) $(STAMP_DIR) $(LEGAL_INFO_DIR) $(REDIST
>
>  $(STAGING_DIR):
>         @mkdir -p $(STAGING_DIR)/bin
> -       @mkdir -p $(STAGING_DIR)/lib
> -       @mkdir -p $(STAGING_DIR)/usr/lib
> +       @mkdir -p $(STAGING_DIR)/lib$(if $(BR2_ARCH_IS_64),64)
> +       @mkdir -p $(STAGING_DIR)/usr/lib$(if $(BR2_ARCH_IS_64),64)

Again, this should also handle the MIPS64/n32 case where lib32 is
needed instead of lib or lib64

Thomas suggested to have new symbols like ARCH_NEEDS_LIB32 or
ARCH_NEEDS_LIB64 selected by architectures that need lib32->lib or
lib64->lib symlinks respectively.

-- 
Regards,
Markos Chandras


More information about the buildroot mailing list