summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAbdoulaye Walsimou Gaye <awg@embtoolkit.org>2014-03-01 23:11:34 +0100
committerAbdoulaye Walsimou Gaye <awg@embtoolkit.org>2014-03-01 23:11:34 +0100
commitec427a3a9140df00a650ce2819469f8099dfe3a5 (patch)
treed922c1e9450269adb1ca05e3d679bedde736de76
parentf1369f459ab0a1fcd2193a36425eeb9529cf1940 (diff)
downloadembtoolkit-ec427a3a9140df00a650ce2819469f8099dfe3a5.tar.gz
embtoolkit-ec427a3a9140df00a650ce2819469f8099dfe3a5.tar.bz2
embtoolkit-ec427a3a9140df00a650ce2819469f8099dfe3a5.tar.xz
Toolchain: add musl among C libraries
Signed-off-by: Abdoulaye Walsimou Gaye <awg@embtoolkit.org>
-rw-r--r--kconfig/musl.kconfig6
-rw-r--r--kconfig/toolchain.kconfig18
-rw-r--r--mk/binutils.mk1
-rw-r--r--mk/musl.mk4
-rw-r--r--mk/pkg-macros/configure.mk1
-rw-r--r--mk/targetsys.mk1
6 files changed, 27 insertions, 4 deletions
diff --git a/kconfig/musl.kconfig b/kconfig/musl.kconfig
index 4bae574..0c4488f 100644
--- a/kconfig/musl.kconfig
+++ b/kconfig/musl.kconfig
@@ -33,8 +33,8 @@ choice
help
Which musl version to use.
- config EMBTK_MUSL_VERSION_0_9_14
- bool "musl-0.9.14"
+ config EMBTK_MUSL_VERSION_0_9_15
+ bool "musl-0.9.15"
select EMBTK_MUSL_NEED_PATCH
config EMBTK_MUSL_VERSION_GIT
bool "Use a branch of musl git repository"
@@ -44,7 +44,7 @@ endchoice
config EMBTK_MUSL_VERSION_STRING
string
- default "0.9.14" if EMBTK_MUSL_VERSION_0_9_14
+ default "0.9.15" if EMBTK_MUSL_VERSION_0_9_15
default "git" if EMBTK_MUSL_VERSION_GIT
config EMBTK_MUSL_REFSPEC
diff --git a/kconfig/toolchain.kconfig b/kconfig/toolchain.kconfig
index 14b5e68..343d1c7 100644
--- a/kconfig/toolchain.kconfig
+++ b/kconfig/toolchain.kconfig
@@ -109,6 +109,7 @@ choice
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_GLIBC
@@ -117,6 +118,19 @@ choice
GNU GLIBC is the well known general purpose c library found on
most general purpose GNU Linux distribution.
+ See http://www.gnu.org/software/libc for more information about
+ glibc.
+
+ config EMBTK_CLIB_MUSL
+ bool "musl"
+ depends on EMBTK_TARGET_ARCH_32BITS
+ help
+ musl is a new general-purpose implementation of the C library.
+ It is lightweight, fast, simple, free, and aims to be correct
+ in the sense of standards-conformance and safety.
+
+ see http://www.musl-libc.org for more information about musl.
+
config EMBTK_CLIB_UCLIBC
bool "uClibc"
help
@@ -137,6 +151,10 @@ if EMBTK_CLIB_GLIBC
source "kconfig/glibc.kconfig"
endif
+if EMBTK_CLIB_MUSL
+source "kconfig/musl.kconfig"
+endif
+
if EMBTK_CLIB_UCLIBC
source "kconfig/uclibc-kconfigs/embtk-uclibc.kconfig"
endif
diff --git a/mk/binutils.mk b/mk/binutils.mk
index d4cf8e5..242d7bd 100644
--- a/mk/binutils.mk
+++ b/mk/binutils.mk
@@ -41,6 +41,7 @@ BINUTILS_CONFIGURE_OPTS += --target=$(STRICT_GNU_TARGET)
BINUTILS_PREFIX := $(embtk_tools)
define embtk_beforeinstall_binutils
+ $(if $(CONFIG_EMBTK_CLIB_MUSL),$(call __embtk_fixgconfigsfor_pkg,binutils))
$(if $(findstring freebsd,$(embtk_buildhost_os)),
bfdmk=$(call __embtk_pkg_srcdir,binutils)/bfd/Makefile.in; \
goldmk=$(call __embtk_pkg_srcdir,binutils)/gold/Makefile.in; \
diff --git a/mk/musl.mk b/mk/musl.mk
index 354949e..ec0dc3d 100644
--- a/mk/musl.mk
+++ b/mk/musl.mk
@@ -54,7 +54,9 @@ define __embtk_install_musl
$(embtk_beforeinstall_musl)
$(Q)$(MAKE) -C $(MUSL_BUILD_DIR) \
DESTDIR=$(embtk_sysroot) install-libs install-headers
- cd $(embtk_sysroot)/$(LIBDIR); ln -sf libc.so ld-musl-$(LINUX_ARCH).so.1
+ cd $(embtk_sysroot)/$(LIBDIR); \
+ ln -sf libc.so ld-musl-$(LINUX_ARCH).so.1; \
+ ln -sf ld-musl-$(LINUX_ARCH).so.1 ld-musl.so.1
$(call __embtk_setinstalled_pkg,musl)
$(call __embtk_pkg_gen_dotkconfig_f,musl)
endef
diff --git a/mk/pkg-macros/configure.mk b/mk/pkg-macros/configure.mk
index 28d1a7e..5f5e0b0 100644
--- a/mk/pkg-macros/configure.mk
+++ b/mk/pkg-macros/configure.mk
@@ -73,6 +73,7 @@ define embtk_configure_pkg
$(call __embtk_configure_autoreconfpkg,$(1))
$(Q)test -e $(__embtk_pkg_srcdir)/configure || exit 1
$(call __embtk_print_configure_opts,$(__embtk_pkg_configureopts))
+ $(if $(CONFIG_EMBTK_CLIB_MUSL),$(call __embtk_fixgconfigsfor_pkg,$(1)))
$(Q)cd $(__embtk_pkg_builddir); \
CC=$(TARGETCC_CACHED) \
$(if $(CONFIG_EMBTK_GCC_LANGUAGE_CPP),CXX=$(TARGETCXX_CACHED)) \
diff --git a/mk/targetsys.mk b/mk/targetsys.mk
index dec0f48..093fb7b 100644
--- a/mk/targetsys.mk
+++ b/mk/targetsys.mk
@@ -28,6 +28,7 @@ embtk_os := $(or $(embtk_os-y),invalid-os)
embtk_clib-$(CONFIG_EMBTK_CLIB_EGLIBC) := eglibc
embtk_clib-$(CONFIG_EMBTK_CLIB_GLIBC) := glibc
+embtk_clib-$(CONFIG_EMBTK_CLIB_MUSL) := musl
embtk_clib-$(CONFIG_EMBTK_CLIB_UCLIBC) := uclibc
embtk_clib := $(or $(embtk_clib-y),invalid-clib)
embtk_clib_version := $(call embtk_get_pkgversion,$(embtk_clib))