summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/gcc/gcc-runtime.inc
diff options
context:
space:
mode:
authorAlejandro Enedino Hernandez Samaniego <alejandro@enedino.org>2020-01-18 19:01:59 -0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2020-01-19 23:49:15 +0000
commit18af9ecef6e247519d8a1573e32208bb69cf81fe (patch)
tree06fe0f311518c7863f87e076a2e36a4b7b2c369e /meta/recipes-devtools/gcc/gcc-runtime.inc
parentf850931173fc210ed25706fd8fbfe0a310f99dfc (diff)
downloadopenembedded-core-contrib-18af9ecef6e247519d8a1573e32208bb69cf81fe.tar.gz
newlib: Enable building libstdc++ for newlib based toolchains
Some baremetal applications might require support from libstdc++ On newlib based toolchains, libstdc++ can be built as a static library that applications can then link against it. Pass libsdtc++-(static)dev to LIBC_DEPENDENCIES allowing the library to be present for cross compilation as well as on sdk builds. 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/gcc-runtime.inc')
-rw-r--r--meta/recipes-devtools/gcc/gcc-runtime.inc6
1 files changed, 6 insertions, 0 deletions
diff --git a/meta/recipes-devtools/gcc/gcc-runtime.inc b/meta/recipes-devtools/gcc/gcc-runtime.inc
index d3f8ae8b9b..b2c5d43bd4 100644
--- a/meta/recipes-devtools/gcc/gcc-runtime.inc
+++ b/meta/recipes-devtools/gcc/gcc-runtime.inc
@@ -16,10 +16,14 @@ EXTRA_OECONF_PATHS = "\
EXTRA_OECONF_append_linuxstdbase = " --enable-clocale=gnu"
EXTRA_OECONF_append = " --cache-file=${B}/config.cache"
+EXTRA_OECONF_append_libc-newlib = " --with-newlib"
# Disable ifuncs for libatomic on arm conflicts -march/-mcpu
EXTRA_OECONF_append_arm = " libat_cv_have_ifunc=no "
+# Newlib does not support symbol versioning on libsdtcc++
+SYMVERS_CONF_libc-newlib = ""
+
# Building with thumb enabled on armv6t fails
ARM_INSTRUCTION_SET_armv6 = "arm"
@@ -36,6 +40,8 @@ RUNTIMELIBSSP_mingw32 ?= "libssp"
RUNTIMETARGET = "${RUNTIMELIBSSP} libstdc++-v3 libgomp libatomic ${RUNTIMELIBITM} \
${@bb.utils.contains_any('FORTRAN', [',fortran',',f77'], 'libquadmath', '', d)} \
"
+# Only build libstdc++ for newlib
+RUNTIMETARGET_libc-newlib = "libstdc++-v3"
# libiberty
# libmudflap