Skip to contentSkip to conversation

fix a LSB test issue

PATCH In review Nitin A Kamble 3 participants 6 messages Mar 7, 2011 – Mar 8, 2011

lore
Share & tools
lore
#0 lore raw

cover fix a LSB test issue

From: Nitin A Kamble <[email protected]>

More details in the commit email.

Pull URL: git://git.pokylinux.org/poky-contrib.git
Branch: nitin/misc
Browse: http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=nitin/misc

Thanks,
Nitin A Kamble <[email protected]>
---

Nitin A Kamble (1):
gcc-runtime: fix LSB library checks for libstdc++.so.6

 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(-)
Signature · 1 line
1.7.3.4
#1 lore raw

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

From: Nitin A Kamble <[email protected]>

[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.

---
 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(-)
meta/conf/bitbake.conf +1 -1
index cf99a81..473306a 100644
@@ -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} \
meta/conf/distro/include/poky-eglibc.inc +1 -1
index 3d2c362..44a0146 100644
@@ -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 \
meta/conf/distro/include/poky-glibc.inc +1 -1
index 4be7122..d3f28c0 100644
@@ -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 \
meta/conf/distro/include/poky-uclibc.inc +1 -1
index def9dfe..13c17f9 100644
@@ -15,7 +15,7 @@ USE_NLS_glib-2.0 = "yes"
 
 TARGET_OS = "${UCLIBCTARGETOS}"
 
-CXXFLAGS += "-fvisibility-inlines-hidden"
+CXXFLAGS_EXTRA += "-fvisibility-inlines-hidden"
 
 IMAGE_LINGUAS = ""
 
meta/recipes-devtools/gcc/gcc-configure-runtime.inc +1 -0
index 6cc11e2..d4dfbc2 100644
@@ -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++/ \
meta/recipes-devtools/gcc/gcc-runtime_4.5.1.bb +1 -1
index 093f9bf..c1e680d 100644
@@ -1,4 +1,4 @@
-PR = "r2"
+PR = "r3"
 
 require gcc-${PV}.inc
 require gcc-configure-runtime.inc
Signature · 1 line
1.7.3.4
#2 lore raw

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

Quoted 18 lines · Nitin A Kamble

From: Nitin A Kamble <[email protected]>

[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
...

Quoted 5 lines

 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

Quoted 94 lines

see http://bugzilla.pokylinux.org/show_bug.cgi?id=795 for more information on the bug.

---
 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(-)
meta/conf/bitbake.conf +0 -0
index cf99a81..473306a 100644
@@ -463,7 +463,7 @@ export CFLAGS = "${TARGET_CFLAGS}"

 export TARGET_CFLAGS = "${TARGET_CPPFLAGS} ${SELECTED_OPTIMIZATION}"

 export BUILD_CXXFLAGS = "${BUILD_CFLAGS} -fpermissive"

meta/conf/bitbake.conf +1 -1
-export CXXFLAGS = "${TARGET_CXXFLAGS}"
+export CXXFLAGS = "${TARGET_CXXFLAGS} ${CXXFLAGS_EXTRA}"

 export TARGET_CXXFLAGS = "${TARGET_CFLAGS} -fpermissive"

 export BUILD_LDFLAGS = "-L${STAGING_LIBDIR_NATIVE} \

meta/conf/distro/include/poky-eglibc.inc +0 -0
index 3d2c362..44a0146 100644
@@ -19,7 +19,7 @@ PREFERRED_PROVIDER_virtual/${SDK_PREFIX}libc-initial-nativesdk ?= "eglibc-initia
 

 TARGET_OS = "${GLIBCTARGETOS}"

meta/conf/distro/include/poky-eglibc.inc +1 -1
-CXXFLAGS += "-fvisibility-inlines-hidden"
+CXXFLAGS_EXTRA += "-fvisibility-inlines-hidden"

 LIBC_DEPENDENCIES = "libsegfault \
                    eglibc \

meta/conf/distro/include/poky-glibc.inc +0 -0
index 4be7122..d3f28c0 100644
@@ -18,7 +18,7 @@ PREFERRED_PROVIDER_virtual/${SDK_PREFIX}libc-initial-nativesdk ?= "glibc-initial
 

 TARGET_OS = "${GLIBCTARGETOS}"

meta/conf/distro/include/poky-glibc.inc +1 -1
-CXXFLAGS += "-fvisibility-inlines-hidden"
+CXXFLAGS_EXTRA += "-fvisibility-inlines-hidden"

 LIBC_DEPENDENCIES = "\
    libsegfault \

meta/conf/distro/include/poky-uclibc.inc +0 -0
index def9dfe..13c17f9 100644
@@ -15,7 +15,7 @@ USE_NLS_glib-2.0 = "yes"
 

 TARGET_OS = "${UCLIBCTARGETOS}"

meta/conf/distro/include/poky-uclibc.inc +1 -1
-CXXFLAGS += "-fvisibility-inlines-hidden"
+CXXFLAGS_EXTRA += "-fvisibility-inlines-hidden"

 IMAGE_LINGUAS = ""

meta/recipes-devtools/gcc/gcc-configure-runtime.inc +0 -0
index 6cc11e2..d4dfbc2 100644
@@ -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++/ \

meta/recipes-devtools/gcc/gcc-runtime_4.5.1.bb +1 -1
index 093f9bf..c1e680d 100644
@@ -1,4 +1,4 @@
-PR = "r2"
+PR = "r3"
 

 require gcc-${PV}.inc
 require gcc-configure-runtime.inc
--
1.7.3.4

_______________________________________________
poky mailing list
[email protected]
https://lists.yoctoproject.org/listinfo/poky

#3 lore raw

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

Quoted 46 lines

-----Original Message-----
From: Khem Raj [mailto:[email protected]]
Sent: Monday, March 07, 2011 9:14 AM
To: Kamble, Nitin A
Cc: [email protected]; [email protected]
Subject: Re: [poky] [PATCH 1/1] gcc-runtime: fix LSB library checks for libstdc++.so.6

Quoted 5 lines · Nitin A Kamble

From: Nitin A Kamble <[email protected]>

[YOCTO #795]

When we run library check of LSB on qemux86 and qemuppc, we got some

failures

Quoted 5 lines

about 'libstdc++.so.6'.

Test environment:
Platform: Qemu-x86, Qemu-ppc
lsb image: poky-image-lsb-qemux86-test.ext3(Feb 26th, auto-build

server)

Quoted 4 lines

Library check of LSB: 4.1.0-1

The error log:
Did not find _ZNKSt5ctypeIcE8do_widenEPKcS2_Pc (GLIBCXX_3.4) in

libstdc++.so.6

Quoted 1 line

Unmangled symbol name: std::ctype<char>::do_widen(char const*, char

const*,

Quoted 4 lines

char*) const
...

 found that some weak symbols ('W') change into local ('t') during

link time

Quoted 2 lines

and be stripped. According to compiling log, the option "-fvisibility-inlines-hidden" is used for gcc. And this option caused

some weak

Quoted 2 lines

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

Quoted 6 lines

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

Thanks

-Khem

Good to know another trick. Thanks Khem.
Nitin

Quoted 103 lines
Quoted 2 lines

see http://bugzilla.pokylinux.org/show_bug.cgi?id=795 for more

information on the bug.

Quoted 24 lines

---
 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(-)
meta/conf/bitbake.conf +0 -0
index cf99a81..473306a 100644
@@ -463,7 +463,7 @@ export CFLAGS = "${TARGET_CFLAGS}"

 export TARGET_CFLAGS = "${TARGET_CPPFLAGS} ${SELECTED_OPTIMIZATION}"

 export BUILD_CXXFLAGS = "${BUILD_CFLAGS} -fpermissive"

meta/conf/bitbake.conf +1 -1
-export CXXFLAGS = "${TARGET_CXXFLAGS}"
+export CXXFLAGS = "${TARGET_CXXFLAGS} ${CXXFLAGS_EXTRA}"

 export TARGET_CXXFLAGS = "${TARGET_CFLAGS} -fpermissive"

Review

Quoted 2 lines

 export BUILD_LDFLAGS = "-L${STAGING_LIBDIR_NATIVE} \

(quoted diff) +0 -0

b/meta/conf/distro/include/poky-eglibc.inc

meta/conf/distro/include/poky-eglibc.inc PREFERRED_PROVIDER_virtual/${SDK_PREFIX}libc-

Quoted 4 lines

index 3d2c362..44a0146 100644

meta/conf/distro/include/poky-eglibc.inc +0 -0
@@ -19,7 +19,7 @@ PREFERRED_PROVIDER_virtual/${SDK_PREFIX}libc-

initial-nativesdk ?= "eglibc-initia

Review

Quoted 9 lines

 TARGET_OS = "${GLIBCTARGETOS}"

meta/conf/distro/include/poky-eglibc.inc +1 -1
-CXXFLAGS += "-fvisibility-inlines-hidden"
+CXXFLAGS_EXTRA += "-fvisibility-inlines-hidden"

 LIBC_DEPENDENCIES = "libsegfault \
                    eglibc \

(quoted diff) +0 -0

b/meta/conf/distro/include/poky-glibc.inc

meta/conf/distro/include/poky-glibc.inc PREFERRED_PROVIDER_virtual/${SDK_PREFIX}libc-

Quoted 4 lines

index 4be7122..d3f28c0 100644

meta/conf/distro/include/poky-glibc.inc +0 -0
@@ -18,7 +18,7 @@ PREFERRED_PROVIDER_virtual/${SDK_PREFIX}libc-

initial-nativesdk ?= "glibc-initial

Review

Quoted 9 lines

 TARGET_OS = "${GLIBCTARGETOS}"

meta/conf/distro/include/poky-glibc.inc +1 -1
-CXXFLAGS += "-fvisibility-inlines-hidden"
+CXXFLAGS_EXTRA += "-fvisibility-inlines-hidden"

 LIBC_DEPENDENCIES = "\
    libsegfault \

(quoted diff) +0 -0

b/meta/conf/distro/include/poky-uclibc.inc

Quoted 10 lines

index def9dfe..13c17f9 100644

meta/conf/distro/include/poky-uclibc.inc +0 -0
@@ -15,7 +15,7 @@ USE_NLS_glib-2.0 = "yes"
 

 TARGET_OS = "${UCLIBCTARGETOS}"

meta/conf/distro/include/poky-uclibc.inc +1 -1
-CXXFLAGS += "-fvisibility-inlines-hidden"
+CXXFLAGS_EXTRA += "-fvisibility-inlines-hidden"

Review

Quoted 3 lines

 IMAGE_LINGUAS = ""

(quoted diff) +0 -0

b/meta/recipes-devtools/gcc/gcc-configure-runtime.inc

Review

Quoted 11 lines

index 6cc11e2..d4dfbc2 100644

meta/recipes-devtools/gcc/gcc-configure-runtime.inc +0 -0
@@ -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++/ \

(quoted diff) +0 -0

b/meta/recipes-devtools/gcc/gcc-runtime_4.5.1.bb

Quoted 17 lines

index 093f9bf..c1e680d 100644

meta/recipes-devtools/gcc/gcc-runtime_4.5.1.bb +1 -1
@@ -1,4 +1,4 @@
-PR = "r2"
+PR = "r3"
 

 require gcc-${PV}.inc
 require gcc-configure-runtime.inc
--
1.7.3.4

_______________________________________________
poky mailing list
[email protected]
https://lists.yoctoproject.org/listinfo/poky

#4 lore raw

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

In reply to Nitin A Kamble

meta/recipes-devtools/gcc/gcc-configure-runtime.inc line 3

Quoted 10 lines · Nitin A Kamble

...

meta/recipes-devtools/gcc/gcc-configure-runtime.inc +1 -0
index 6cc11e2..d4dfbc2 100644
@@ -1,5 +1,6 @@
  require gcc-configure-common.inc
 
+CXXFLAGS_EXTA = ""

Maybe a little spell mistake, should be "EXTRA". :-)

Quoted 13 lines
meta/recipes-devtools/gcc/gcc-configure-runtime.inc +0 -0
  EXTRA_OECONF_PATHS = " \
      --with-local-prefix=${STAGING_DIR_TARGET}${prefix} \
      --with-gxx-include-dir=${includedir}/c++/ \
meta/recipes-devtools/gcc/gcc-runtime_4.5.1.bb +1 -1
index 093f9bf..c1e680d 100644
@@ -1,4 +1,4 @@
-PR = "r2"
+PR = "r3"
 
  require gcc-${PV}.inc
  require gcc-configure-runtime.inc
Signature · 3 lines
Lu Jingdong
[email protected]
China, Wind River
#5 lore raw

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

Quoted 14 lines

-----Original Message-----
From: Lu Jingdong [mailto:[email protected]]
Sent: Monday, March 07, 2011 5:00 PM
To: Kamble, Nitin A
Cc: [email protected]
Subject: Re: [PATCH 1/1] gcc-runtime: fix LSB library checks for libstdc++.so.6

Review

Quoted 3 lines · Nitin A Kamble

...

(quoted diff) +0 -0

b/meta/recipes-devtools/gcc/gcc-configure-runtime.inc

Quoted 8 lines

meta/recipes-devtools/gcc/gcc-configure-runtime.inc line 3

Quoted 7 lines

index 6cc11e2..d4dfbc2 100644

meta/recipes-devtools/gcc/gcc-configure-runtime.inc +1 -0
@@ -1,5 +1,6 @@
  require gcc-configure-common.inc
 
+CXXFLAGS_EXTA = ""

Maybe a little spell mistake, should be "EXTRA". :-)

Jingdong, Good Catch. I will update the commit.
Thanks,
Nitin

Quoted 20 lines

Review

Quoted 4 lines
meta/recipes-devtools/gcc/gcc-configure-runtime.inc +0 -0
  EXTRA_OECONF_PATHS = " \
      --with-local-prefix=${STAGING_DIR_TARGET}${prefix} \
      --with-gxx-include-dir=${includedir}/c++/ \
(quoted diff) +0 -0

b/meta/recipes-devtools/gcc/gcc-runtime_4.5.1.bb

meta/recipes-devtools/gcc/gcc-runtime_4.5.1.bb line 4

Quoted 9 lines

index 093f9bf..c1e680d 100644

meta/recipes-devtools/gcc/gcc-runtime_4.5.1.bb +1 -1
@@ -1,4 +1,4 @@
-PR = "r2"
+PR = "r3"
 
  require gcc-${PV}.inc
  require gcc-configure-runtime.inc

--
Lu Jingdong
[email protected]
China, Wind River