diff options
author | Jo-Philipp Wich <jow@openwrt.org> | 2013-02-20 15:06:10 +0000 |
---|---|---|
committer | Jo-Philipp Wich <jow@openwrt.org> | 2013-02-20 15:06:10 +0000 |
commit | 9622f68581cea9d607bbd641b89350c2420720d5 (patch) | |
tree | c5bce9c0e9c3c31376ed6bec317a21ddb008e427 /toolchain | |
parent | 330ae61b1b8e136b268d2a9316e434a6ca842979 (diff) | |
download | mtk-20170518-9622f68581cea9d607bbd641b89350c2420720d5.zip mtk-20170518-9622f68581cea9d607bbd641b89350c2420720d5.tar.gz mtk-20170518-9622f68581cea9d607bbd641b89350c2420720d5.tar.bz2 |
buildroot: allow specifying libc personality for external toolchains
SVN-Revision: 35703
Diffstat (limited to 'toolchain')
-rw-r--r-- | toolchain/Config.in | 11 | ||||
-rw-r--r-- | toolchain/wrapper/Makefile | 2 |
2 files changed, 12 insertions, 1 deletions
diff --git a/toolchain/Config.in b/toolchain/Config.in index 32de4b1..8677b87 100644 --- a/toolchain/Config.in +++ b/toolchain/Config.in @@ -50,6 +50,17 @@ menuconfig EXTERNAL_TOOLCHAIN default "/opt/cross/powerpc-unknown-linux-gnu" if powerpc default "/opt/cross/x86_64-unknown-linux-gnu" if x86_64 + config TOOLCHAIN_LIBC + string + prompt "Toolchain libc" if DEVEL + depends EXTERNAL_TOOLCHAIN && !NATIVE_TOOLCHAIN + default "uclibc" + help + Specify the libc type used by the external toolchain. The given value us passed as -m + flag to all gcc and g++ invocations. This is mainly intended for multilib toolchains + which support glibc and uclibc at the same time. If no value is specified, no -m flag + is passed. + config TOOLCHAIN_BIN_PATH string prompt "Toolchain program path" if DEVEL diff --git a/toolchain/wrapper/Makefile b/toolchain/wrapper/Makefile index 417ed8c..3398e40 100644 --- a/toolchain/wrapper/Makefile +++ b/toolchain/wrapper/Makefile @@ -17,7 +17,7 @@ include $(INCLUDE_DIR)/toolchain-build.mk define toolchain_util $(strip $(SCRIPT_DIR)/ext-toolchain.sh --toolchain $(CONFIG_TOOLCHAIN_ROOT) \ --cflags $(CONFIG_TARGET_OPTIMIZATION) \ - --cflags "-muclibc $(if $(CONFIG_SOFT_FLOAT),-msoft-float)" \ + --cflags "$(if $(call qstrip,$(CONFIG_TOOLCHAIN_LIBC)),-m$(call qstrip,$(CONFIG_TOOLCHAIN_LIBC))) $(if $(CONFIG_SOFT_FLOAT),-msoft-float)" \ --cflags "$(patsubst ./%,-I$(TOOLCHAIN_ROOT_DIR)/%,$(call qstrip,$(CONFIG_TOOLCHAIN_INC_PATH)))" \ --cflags "$(patsubst ./%,-L$(TOOLCHAIN_ROOT_DIR)/%,$(call qstrip,$(CONFIG_TOOLCHAIN_LIB_PATH)))" \ $(1)) |