Skip to contentSkip to conversation

gcc 4.1.2: fix dependency_libs for libstdc++ and libsupc++

PATCH In review Frans Meulenbroeks 2 participants 2 messages Feb 23, 2011

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 gcc 4.1.2: fix dependency_libs for libstdc++ and libsupc++

This fixes a QA issue in gcc 4.1.2.
The patch is identical to what is done in gcc 4.2.2 and 4.2.4 The issues caused neek compilations to fail

---

NOTE: gcc 4.1.0 4.1.1 4.2.1 4.2.3 are also missing this patch. Can't easily test those now so not submitting a patch for these. and maybe the patch is also needed for gcc 4.0.*
No idea about gcc3.

 recipes/gcc/gcc-4.1.2.inc |   15 ++++++++++++++-
 1 files changed, 14 insertions(+), 1 deletions(-)
recipes/gcc/gcc-4.1.2.inc +14 -1
index 36b45db..9df67e2 100644
@@ -5,7 +5,7 @@ NATIVEDEPS = "mpfr-native gmp-native"
 
 COMPATIBLE_TARGET_SYS = "."
 
-INC_PR = "r27"
+INC_PR = "r28"
 
 SRC_URI = "${GNU_MIRROR}/gcc/gcc-${PV}/gcc-${PV}.tar.bz2;name=archive \
 	file://100-uclibc-conf.patch \
@@ -60,6 +60,19 @@ do_compile_prepend_avr32() {
        ln -sf ${S}/libstdc++-v3/config/os/uclibc/ ${S}/libstdc++-v3/config/os/uclibc-linux
 }
 
+# with sysroot this change is not needed for gcc 4.3+ but its needed
+# for older compilers because of bug in libtool as well as this PR
+# http://gcc.gnu.org/bugzilla/show_bug.cgi?id=5291
+# we append the .la munging specially for libstdc++ and libsupc++ here
+# This change if needed for other compilers in use should be put
+# in there specific inc file.
+
+do_install_append () {
+        for d in ${target_libdir} ${target_libdir}/nof; do
+                sed -i "s|dependency_libs\s*=\s*.*|dependency_libs='-lm '|" ${D}$d/libsupc++.la || true
+                sed -i "s|dependency_libs\s*=\s*.*|dependency_libs='-lm '|" ${D}$d/libstdc++.la || true
+        done
+}
 
 # Language Overrides
 FORTRAN = ""
Signature · 1 line
1.7.1
#1 lore raw
Quoted 5 lines · Frans Meulenbroeks

This fixes a QA issue in gcc 4.1.2.
The patch is identical to what is done in gcc 4.2.2 and 4.2.4 The issues caused neek compilations to fail

Looks ok can you look at

commit 457d5b9818e21492a1425d8b6811cf57702394eb

Author: Khem Raj <[email protected]>
Date:   Sun Jun 6 10:40:01 2010 -0700

gcc-4.2.4: Fix libstdc++ build failures with new sysrooted staging.

* New sysrooted staging exposed few problems in GCC configury which were latent previously.

and do those changes for 4.1.x

Quoted 52 lines

---

NOTE: gcc 4.1.0 4.1.1 4.2.1 4.2.3 are also missing this patch. Can't easily test those now so not submitting a patch for these. and maybe the patch is also needed for gcc 4.0.*
No idea about gcc3.

 recipes/gcc/gcc-4.1.2.inc |   15 ++++++++++++++-

 1 files changed, 14 insertions(+), 1 deletions(-)
recipes/gcc/gcc-4.1.2.inc +0 -0
index 36b45db..9df67e2 100644
@@ -5,7 +5,7 @@ NATIVEDEPS = "mpfr-native gmp-native"
 

 COMPATIBLE_TARGET_SYS = "."

recipes/gcc/gcc-4.1.2.inc +1 -1
-INC_PR = "r27"
+INC_PR = "r28"

 SRC_URI = "${GNU_MIRROR}/gcc/gcc-${PV}/gcc-${PV}.tar.bz2;name=archive \
       file://100-uclibc-conf.patch \

recipes/gcc/gcc-4.1.2.inc +0 -0
@@ -60,6 +60,19 @@ do_compile_prepend_avr32() {

       ln -sf ${S}/libstdc++-v3/config/os/uclibc/ ${S}/libstdc++-v3/config/os/uclibc-linux }

recipes/gcc/gcc-4.1.2.inc +13 -0
+# with sysroot this change is not needed for gcc 4.3+ but its needed
+# for older compilers because of bug in libtool as well as this PR
+# http://gcc.gnu.org/bugzilla/show_bug.cgi?id=5291
+# we append the .la munging specially for libstdc++ and libsupc++ here
+# This change if needed for other compilers in use should be put
+# in there specific inc file.
+
+do_install_append () {
+        for d in ${target_libdir} ${target_libdir}/nof; do
+                sed -i "s|dependency_libs\s*=\s*.*|dependency_libs='-lm '|" ${D}$d/libsupc++.la || true
+                sed -i "s|dependency_libs\s*=\s*.*|dependency_libs='-lm '|" ${D}$d/libstdc++.la || true
+        done
+}

 # Language Overrides
 FORTRAN = ""
--
1.7.1

_______________________________________________
Openembedded-devel mailing list
[email protected]
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-devel