summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--kconfig/toolchain.kconfig24
-rw-r--r--mk/arm-arch.mk14
2 files changed, 37 insertions, 1 deletions
diff --git a/kconfig/toolchain.kconfig b/kconfig/toolchain.kconfig
index 45de866..6efa032 100644
--- a/kconfig/toolchain.kconfig
+++ b/kconfig/toolchain.kconfig
@@ -22,8 +22,30 @@
# \date July 2009
################################################################################
-menu "EGLIBC C library"
+menu "C library to use"
+choice
+ prompt "Choose which C library to use"
+ help
+ Choose here which C library your toolchain will use.
+ config EMBTK_CLIB_EGLIBC
+ bool "eglibc"
+ help
+ EGLIBC is suitable for source and binary compatibility with
+ glibc, but care is also taken to satisfy embedded systems
+ constraints.
+ see http://www.eglibc.org for more information about eglibc.
+ config EMBTK_CLIB_UCLIBC
+ bool "uClibc"
+ help
+ uClibc is suitable for high memory constraints and MMU-less
+ embedded systems. But compatibility with glibc is not guaranted
+ and even between different uClibc versions.
+ see http://www.uclibc.org for more information about uclibc.
+endchoice
+
+if EMBTK_CLIB_EGLIBC
source "kconfig/eglibc.kconfig"
+endif
endmenu
menu "GCC compiler"
diff --git a/mk/arm-arch.mk b/mk/arm-arch.mk
index 16483db..c7486fd 100644
--- a/mk/arm-arch.mk
+++ b/mk/arm-arch.mk
@@ -26,6 +26,8 @@ LINUX_ARCH := arm
GNU_TARGET_ARCH := arm
EMBTK_MCU_FLAG := $(subst ",,$(strip $(CONFIG_EMBTK_ARM_MCU_STRING)))
+ifeq ($(CONFIG_EMBTK_CLIB_EGLIBC),y)
+#EGLIBC C library
ifeq ($(CONFIG_EMBTK_ARCH_ARM_BIG_ENDIAN),y)
GNU_TARGET := armeb-linux
STRICT_GNU_TARGET := armeb-unknown-linux-gnueabi
@@ -34,6 +36,18 @@ GNU_TARGET := armel-linux
STRICT_GNU_TARGET := armel-unknown-linux-gnueabi
endif
+else
+#uClibc C library
+ifeq ($(CONFIG_EMBTK_ARCH_ARM_BIG_ENDIAN),y)
+GNU_TARGET := armeb-linux
+STRICT_GNU_TARGET := armeb-unknown-linux-uclibceabi
+else
+GNU_TARGET := armel-linux
+STRICT_GNU_TARGET := armel-unknown-linux-uclibceabi
+endif
+
+endif
+
#GCC configure options
GCC_WITH_CPU := --with-cpu=$(subst ",,$(strip $(CONFIG_EMBTK_ARM_MCU_STRING)))