Patchwork [1/1] gcc-runtime: fix LSB library checks for libstdc++.so.6

login
register
mail settings
Submitter Nitin A Kamble
Date March 7, 2011, 4:55 p.m.
Message ID <0cfc1314469e2fe9412ec0285a9bbe577a195258.1299516806.git.nitin.a.kamble@intel.com>
Download mbox | patch
Permalink /patch/1191/
State Superseded
Headers show

Comments

Nitin A Kamble - March 7, 2011, 4:55 p.m.
From: Nitin A Kamble <nitin.a.kamble@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.

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@intel.com>
Signed-off-by: Jingdong Lu <jingdong.lu@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(-)

Patch

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