Changeset 35703


Ignore:
Timestamp:
2013-02-20T16:06:10+01:00 (5 years ago)
Author:
jow
Message:

buildroot: allow specifying libc personality for external toolchains

Location:
trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/scripts/ext-toolchain.sh

    r31549 r35703  
    356356        echo "CONFIG_TOOLCHAIN_PREFIX=\"$prefix\"" >> "$config" 
    357357        echo "CONFIG_TARGET_NAME=\"$target\"" >> "$config" 
     358 
     359        if [ "$LIBC_TYPE" != glibc ]; then 
     360                echo "CONFIG_TOOLCHAIN_LIBC=\"$LIBC_TYPE\"" >> "$config" 
     361        fi 
    358362 
    359363        local lib 
  • trunk/toolchain/Config.in

    r34314 r35703  
    5050                default "/opt/cross/powerpc-unknown-linux-gnu"  if powerpc 
    5151                default "/opt/cross/x86_64-unknown-linux-gnu"   if x86_64 
     52 
     53        config TOOLCHAIN_LIBC 
     54                string 
     55                prompt "Toolchain libc"  if DEVEL 
     56                depends EXTERNAL_TOOLCHAIN && !NATIVE_TOOLCHAIN 
     57                default "uclibc" 
     58                help 
     59                  Specify the libc type used by the external toolchain. The given value us passed as -m 
     60                  flag to all gcc and g++ invocations. This is mainly intended for multilib toolchains 
     61                  which support glibc and uclibc at the same time. If no value is specified, no -m flag 
     62                  is passed. 
    5263 
    5364        config TOOLCHAIN_BIN_PATH 
  • trunk/toolchain/wrapper/Makefile

    r29766 r35703  
    1818$(strip $(SCRIPT_DIR)/ext-toolchain.sh --toolchain $(CONFIG_TOOLCHAIN_ROOT) \ 
    1919        --cflags $(CONFIG_TARGET_OPTIMIZATION) \ 
    20         --cflags "-muclibc $(if $(CONFIG_SOFT_FLOAT),-msoft-float)" \ 
     20        --cflags "$(if $(call qstrip,$(CONFIG_TOOLCHAIN_LIBC)),-m$(call qstrip,$(CONFIG_TOOLCHAIN_LIBC))) $(if $(CONFIG_SOFT_FLOAT),-msoft-float)" \ 
    2121        --cflags "$(patsubst ./%,-I$(TOOLCHAIN_ROOT_DIR)/%,$(call qstrip,$(CONFIG_TOOLCHAIN_INC_PATH)))" \ 
    2222        --cflags "$(patsubst ./%,-L$(TOOLCHAIN_ROOT_DIR)/%,$(call qstrip,$(CONFIG_TOOLCHAIN_LIB_PATH)))" \ 
Note: See TracChangeset for help on using the changeset viewer.