[OE-core] [poky] [PATCH 1/1] gcc-runtime: fix LSB library checks for libstdc++.so.6

Khem Raj raj.khem at gmail.com
Mon Mar 7 17:14:26 UTC 2011


On Mon, Mar 7, 2011 at 8:55 AM, Nitin A Kamble <nitin.a.kamble at intel.com> wrote:
> From: Nitin A Kamble <nitin.a.kamble at intel.com>
>
> [YOCTO #795]
>
> When we run library check of LSB on qemux86 and qemuppc, we got some failures
> about 'libstdc++.so.6'.
>
> Test environment:
> Platform: Qemu-x86, Qemu-ppc
> lsb image: poky-image-lsb-qemux86-test.ext3(Feb 26th, auto-build server)
> Library check of LSB: 4.1.0-1
>
> The error log:
> Did not find _ZNKSt5ctypeIcE8do_widenEPKcS2_Pc (GLIBCXX_3.4) in libstdc++.so.6
> Unmangled symbol name: std::ctype<char>::do_widen(char const*, char const*,
> char*) const
> ...
>
>  found that some weak symbols ('W') change into local ('t') during link time
> and be stripped. According to compiling log, the option
> "-fvisibility-inlines-hidden" is used for gcc. And this option caused some weak
> symbols change into local.
>


you could use oe_filter_out functionality to strip out a given option
and you wont need to touch so many parts. Just do something like

CXXFLAGS = "${@oe_filter_out('-fvisibility-inlines-hidden',
'${CXXFLAGS}', d)}" in gcc runtime recipe and you should be set

Thanks

-Khem

> see http://bugzilla.pokylinux.org/show_bug.cgi?id=795 for more information on the bug.
>
> Signed-off-by: Nitin A Kamble <nitin.a.kamble at intel.com>
> Signed-off-by: Jingdong Lu <jingdong.lu at windriver.com>
> ---
>  meta/conf/bitbake.conf                             |    2 +-
>  meta/conf/distro/include/poky-eglibc.inc           |    2 +-
>  meta/conf/distro/include/poky-glibc.inc            |    2 +-
>  meta/conf/distro/include/poky-uclibc.inc           |    2 +-
>  .../recipes-devtools/gcc/gcc-configure-runtime.inc |    1 +
>  meta/recipes-devtools/gcc/gcc-runtime_4.5.1.bb     |    2 +-
>  6 files changed, 6 insertions(+), 5 deletions(-)
>
> diff --git a/meta/conf/bitbake.conf b/meta/conf/bitbake.conf
> index cf99a81..473306a 100644
> --- a/meta/conf/bitbake.conf
> +++ b/meta/conf/bitbake.conf
> @@ -463,7 +463,7 @@ export CFLAGS = "${TARGET_CFLAGS}"
>  export TARGET_CFLAGS = "${TARGET_CPPFLAGS} ${SELECTED_OPTIMIZATION}"
>
>  export BUILD_CXXFLAGS = "${BUILD_CFLAGS} -fpermissive"
> -export CXXFLAGS = "${TARGET_CXXFLAGS}"
> +export CXXFLAGS = "${TARGET_CXXFLAGS} ${CXXFLAGS_EXTRA}"
>  export TARGET_CXXFLAGS = "${TARGET_CFLAGS} -fpermissive"
>
>  export BUILD_LDFLAGS = "-L${STAGING_LIBDIR_NATIVE} \
> diff --git a/meta/conf/distro/include/poky-eglibc.inc b/meta/conf/distro/include/poky-eglibc.inc
> index 3d2c362..44a0146 100644
> --- a/meta/conf/distro/include/poky-eglibc.inc
> +++ b/meta/conf/distro/include/poky-eglibc.inc
> @@ -19,7 +19,7 @@ PREFERRED_PROVIDER_virtual/${SDK_PREFIX}libc-initial-nativesdk ?= "eglibc-initia
>
>  TARGET_OS = "${GLIBCTARGETOS}"
>
> -CXXFLAGS += "-fvisibility-inlines-hidden"
> +CXXFLAGS_EXTRA += "-fvisibility-inlines-hidden"
>
>  LIBC_DEPENDENCIES = "libsegfault \
>                     eglibc \
> diff --git a/meta/conf/distro/include/poky-glibc.inc b/meta/conf/distro/include/poky-glibc.inc
> index 4be7122..d3f28c0 100644
> --- a/meta/conf/distro/include/poky-glibc.inc
> +++ b/meta/conf/distro/include/poky-glibc.inc
> @@ -18,7 +18,7 @@ PREFERRED_PROVIDER_virtual/${SDK_PREFIX}libc-initial-nativesdk ?= "glibc-initial
>
>  TARGET_OS = "${GLIBCTARGETOS}"
>
> -CXXFLAGS += "-fvisibility-inlines-hidden"
> +CXXFLAGS_EXTRA += "-fvisibility-inlines-hidden"
>
>  LIBC_DEPENDENCIES = "\
>     libsegfault \
> diff --git a/meta/conf/distro/include/poky-uclibc.inc b/meta/conf/distro/include/poky-uclibc.inc
> index def9dfe..13c17f9 100644
> --- a/meta/conf/distro/include/poky-uclibc.inc
> +++ b/meta/conf/distro/include/poky-uclibc.inc
> @@ -15,7 +15,7 @@ USE_NLS_glib-2.0 = "yes"
>
>  TARGET_OS = "${UCLIBCTARGETOS}"
>
> -CXXFLAGS += "-fvisibility-inlines-hidden"
> +CXXFLAGS_EXTRA += "-fvisibility-inlines-hidden"
>
>  IMAGE_LINGUAS = ""
>
> diff --git a/meta/recipes-devtools/gcc/gcc-configure-runtime.inc b/meta/recipes-devtools/gcc/gcc-configure-runtime.inc
> index 6cc11e2..d4dfbc2 100644
> --- a/meta/recipes-devtools/gcc/gcc-configure-runtime.inc
> +++ b/meta/recipes-devtools/gcc/gcc-configure-runtime.inc
> @@ -1,5 +1,6 @@
>  require gcc-configure-common.inc
>
> +CXXFLAGS_EXTA = ""
>  EXTRA_OECONF_PATHS = " \
>     --with-local-prefix=${STAGING_DIR_TARGET}${prefix} \
>     --with-gxx-include-dir=${includedir}/c++/ \
> diff --git a/meta/recipes-devtools/gcc/gcc-runtime_4.5.1.bb b/meta/recipes-devtools/gcc/gcc-runtime_4.5.1.bb
> index 093f9bf..c1e680d 100644
> --- a/meta/recipes-devtools/gcc/gcc-runtime_4.5.1.bb
> +++ b/meta/recipes-devtools/gcc/gcc-runtime_4.5.1.bb
> @@ -1,4 +1,4 @@
> -PR = "r2"
> +PR = "r3"
>
>  require gcc-${PV}.inc
>  require gcc-configure-runtime.inc
> --
> 1.7.3.4
>
> _______________________________________________
> poky mailing list
> poky at yoctoproject.org
> https://lists.yoctoproject.org/listinfo/poky
>




More information about the Openembedded-core mailing list