[oe-commits] [openembedded-core] 08/11: newlib: Enable building libstdc++ for newlib based toolchains
git at git.openembedded.org
git at git.openembedded.org
Sun Jan 19 14:04:58 UTC 2020
This is an automated email from the git hooks/post-receive script.
rpurdie pushed a commit to branch master-next
in repository openembedded-core.
commit 46d2e93399068ee87723800691eded6f4c4d2af9
Author: Alejandro Enedino Hernandez Samaniego <alejandro at enedino.org>
AuthorDate: Sat Jan 18 19:01:59 2020 -0800
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 at enedino.org>
Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
---
meta/conf/distro/include/tclibc-newlib.inc | 7 +++----
meta/recipes-devtools/gcc/gcc-runtime.inc | 6 ++++++
2 files changed, 9 insertions(+), 4 deletions(-)
diff --git a/meta/conf/distro/include/tclibc-newlib.inc b/meta/conf/distro/include/tclibc-newlib.inc
index 896c0b1..8338003 100644
--- a/meta/conf/distro/include/tclibc-newlib.inc
+++ b/meta/conf/distro/include/tclibc-newlib.inc
@@ -25,12 +25,11 @@ LIBC_DEPENDENCIES = "\
libgloss-dbg \
libgcc-dev \
libgcc-dbg \
+ libstdc++-dev \
+ libstdc++-staticdev \
"
-# compilerlibs defaults to gcc-runtime, but we get runtime from libgloss
-# we set ASSUME_PROVIDED because we cant set PREFERRED_PROVIDER
-# for compilerlibs since its overridden by tcmode-default
-ASSUME_PROVIDED += "virtual/${TARGET_PREFIX}compilerlibs virtual/crypt"
+ASSUME_PROVIDED += "virtual/crypt"
# Its useful to be able to extend newlib, but we dont provide a native variant of libgloss
NEWLIB_EXTENDED ?= "libgloss libgcc"
diff --git a/meta/recipes-devtools/gcc/gcc-runtime.inc b/meta/recipes-devtools/gcc/gcc-runtime.inc
index d3f8ae8..b2c5d43 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
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Openembedded-commits
mailing list