summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/gcc/libgcc-common.inc
diff options
context:
space:
mode:
authorAlejandro Hernandez Samaniego <alejandro@enedino.org>2024-06-18 12:12:26 -0600
committerRichard Purdie <richard.purdie@linuxfoundation.org>2024-07-26 12:28:42 +0100
commit09b49a35e1cd68f2e7aac35c8094adfc3ca38685 (patch)
tree0dca38b6f20a5f90d89c339ebc675bae6e3c0715 /meta/recipes-devtools/gcc/libgcc-common.inc
parentbeabc787cacb9b399f19eac39903948154dcce18 (diff)
downloadpoky-09b49a35e1cd68f2e7aac35c8094adfc3ca38685.tar.gz
tclibc-picolibc: Adds a new TCLIBC variant to build with picolibc as C library
Enables usage of TCLIBC=picolibc extending OE functionality to build and use picolibc based toolchains to build baremetal applications. Picolibc is a set of standard C libraries, both libc and libm, designed for smaller embedded systems with limited ROM and RAM. Picolibc includes code from Newlib and AVR Libc, but adresses some of newlibs concerns, it retains newlibs directory structure, math, string and locale implementations, but removed the GPL bits used to build the library, swiches old C style code for C18 and replaces autotools with meson. This patch adds a picolibc recipe for the C library, a picolibc-helloworld recipe that contains an example application and a testcase that builds it. Picolibc can be built for ARM and RISCV architectures, its been tested both for 32 and 64 bits, the provided example recipe produces the following output: hello, world Runqemu does not automatically show any output since it hides QEMU stderr which is where the QEMU monitors output is directed to when using semihosting, but, manually running the same QEMU command does work properly. (From OE-Core rev: c7535ecaccb72ef21a61f9aec5c68e61fb4f6fb6) Signed-off-by: Alejandro Enedino Hernandez Samaniego <alejandro@enedino.org> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools/gcc/libgcc-common.inc')
-rw-r--r--meta/recipes-devtools/gcc/libgcc-common.inc5
1 files changed, 5 insertions, 0 deletions
diff --git a/meta/recipes-devtools/gcc/libgcc-common.inc b/meta/recipes-devtools/gcc/libgcc-common.inc
index d9084af51a..e3db17d700 100644
--- a/meta/recipes-devtools/gcc/libgcc-common.inc
+++ b/meta/recipes-devtools/gcc/libgcc-common.inc
@@ -53,6 +53,11 @@ do_install:append:libc-newlib () {
53 rmdir ${D}${base_libdir} 53 rmdir ${D}${base_libdir}
54 fi 54 fi
55} 55}
56do_install:append:libc-picolibc () {
57 if [ "${base_libdir}" != "${libdir}" ]; then
58 rmdir ${D}${base_libdir}
59 fi
60}
56 61
57# No rpm package is actually created but -dev depends on it, avoid dnf error 62# No rpm package is actually created but -dev depends on it, avoid dnf error
58DEV_PKG_DEPENDENCY:libc-baremetal = "" 63DEV_PKG_DEPENDENCY:libc-baremetal = ""