summaryrefslogtreecommitdiffstats
path: root/meta/conf
diff options
context:
space:
mode:
authorAlejandro Enedino Hernandez Samaniego <alejandr@xilinx.com>2018-04-27 13:21:20 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2018-06-15 17:56:24 +0100
commit073dbcedf528ba817f828cc9d0a604a4c8c99927 (patch)
treed68895a09af47d2567a9f865dd96882becbb3262 /meta/conf
parent361f7a902d4a90c422c8aca1cc23eda55bd18a27 (diff)
downloadpoky-073dbcedf528ba817f828cc9d0a604a4c8c99927.tar.gz
tclibc-newlib: Adds a new TCLIBC variant to build with newlib as C library
This patch adds the posibility to build using TCLIBC=newlib. It allows users to build baremetal applications with the use of a C library. Newlib is a lightweight C library meant to be used on embedded systems, it is meant to be easily portable for new platforms and to provide basic functionality on them, by design, it provides stubs for some of these core functions declared as weak, so they can be built correctly and then linked against some other library which provides specifics about the platform being used if need be, libgloss takes care of these in some cases, but it can also be extended, this patch also allows the user to easily add other libraries to it by adding them to NEWLIB_EXTENDED for this specific reason. (From OE-Core rev: 9f0570351a7b0877aa50efff5fe9a9ef368cb38f) Signed-off-by: Alejandro Enedino Hernandez Samaniego <alejandr@xilinx.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/conf')
-rw-r--r--meta/conf/distro/include/tclibc-newlib.inc44
1 files changed, 44 insertions, 0 deletions
diff --git a/meta/conf/distro/include/tclibc-newlib.inc b/meta/conf/distro/include/tclibc-newlib.inc
new file mode 100644
index 0000000000..dc631d8ada
--- /dev/null
+++ b/meta/conf/distro/include/tclibc-newlib.inc
@@ -0,0 +1,44 @@
1#
2# Newlib configuration
3#
4
5LIBCEXTENSION = "-newlib"
6LIBCOVERRIDE = ":libc-newlib"
7
8PREFERRED_PROVIDER_virtual/libc ?= "newlib"
9PREFERRED_PROVIDER_virtual/libiconv ?= "newlib"
10PREFERRED_PROVIDER_virtual/libintl ?= "newlib"
11PREFERRED_PROVIDER_virtual/nativesdk-libintl ?= "nativesdk-glibc"
12PREFERRED_PROVIDER_virtual/nativesdk-libiconv ?= "nativesdk-glibc"
13
14DISTRO_FEATURES_BACKFILL_CONSIDERED += "ldconfig"
15
16#USE_NLS ?= "no"
17
18IMAGE_LINGUAS = ""
19
20LIBC_DEPENDENCIES = "\
21 newlib-dbg \
22 newlib-dev \
23 libgloss \
24 libgloss-dev \
25 libgloss-dbg \
26 libgcc-dev \
27 libgcc-dbg \
28 "
29
30# compilerlibs defaults to gcc-runtime, but we get runtime from libgloss
31# we set ASSUME_PROVIDED because we cant set PREFERRED_PROVIDER
32# for compilerlibs since its overridden by tcmode-default
33ASSUME_PROVIDED += "virtual/${TARGET_PREFIX}compilerlibs virtual/crypt"
34
35# Its useful to be able to extend newlib, but we dont provide a native variant of libgloss
36NEWLIB_EXTENDED ?= "libgloss libgcc"
37BASE_DEFAULT_DEPS_append_class-target = " ${NEWLIB_EXTENDED}"
38
39TARGET_OS = "elf"
40TARGET_OS_arm = "eabi"
41
42TOOLCHAIN_HOST_TASK ?= "packagegroup-cross-canadian-${MACHINE}"
43TOOLCHAIN_TARGET_TASK ?= "${LIBC_DEPENDENCIES}"
44TOOLCHAIN_NEED_CONFIGSITE_CACHE_remove = "zlib ncurses"