[oe-commits] Khem Raj : gcc-4.2.4: Fix libstdc++ build failures with new sysrooted staging.

git version control git at git.openembedded.org
Sun Jun 6 17:41:24 UTC 2010


Module: openembedded.git
Branch: org.openembedded.dev
Commit: 457d5b9818e21492a1425d8b6811cf57702394eb
URL:    http://gitweb.openembedded.net/?p=openembedded.git&a=commit;h=457d5b9818e21492a1425d8b6811cf57702394eb

Author: Khem Raj <raj.khem at gmail.com>
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.

Signed-off-by: Khem Raj <raj.khem at gmail.com>

---

 recipes/gcc/gcc-4.2.4.inc                          |   15 ++++++++++++++-
 .../libstdc++-hack-libtool-remove-lstdc++.patch    |   18 ++++++++++++++++++
 2 files changed, 32 insertions(+), 1 deletions(-)

diff --git a/recipes/gcc/gcc-4.2.4.inc b/recipes/gcc/gcc-4.2.4.inc
index d2a6b3e..e072731 100644
--- a/recipes/gcc/gcc-4.2.4.inc
+++ b/recipes/gcc/gcc-4.2.4.inc
@@ -4,7 +4,7 @@ LICENSE = "GPLv3"
 DEPENDS = "mpfr gmp"
 NATIVEDEPS = "mpfr-native gmp-native"
 
-INC_PR = "r10"
+INC_PR = "r11"
 
 SRC_URI = "${GNU_MIRROR}/gcc/gcc-${PV}/gcc-${PV}.tar.bz2;name=archive \
 	file://100-uclibc-conf.patch \
@@ -39,6 +39,7 @@ SRC_URI = "${GNU_MIRROR}/gcc/gcc-${PV}/gcc-${PV}.tar.bz2;name=archive \
 	file://gcc-4.0.2-e300c2c3.patch \
 	file://fortran-static-linking.patch \
 	file://intermask-bigendian.patch \
+	file://libstdc++-hack-libtool-remove-lstdc++.patch \
 "
 
 SRC_URI_append_ep93xx = " \
@@ -77,7 +78,19 @@ SRC_URI_append_sh3  = " file://sh3-installfix-fixheaders.patch "
 SRC_URI_append_sh4  = " file://sh_unwind.patch \
 			file://cppdefault_cross.patch \
 		      "
+# 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 = ""
diff --git a/recipes/gcc/gcc-4.2.4/libstdc++-hack-libtool-remove-lstdc++.patch b/recipes/gcc/gcc-4.2.4/libstdc++-hack-libtool-remove-lstdc++.patch
new file mode 100644
index 0000000..0987efa
--- /dev/null
+++ b/recipes/gcc/gcc-4.2.4/libstdc++-hack-libtool-remove-lstdc++.patch
@@ -0,0 +1,18 @@
+This is a hacked backport of backport http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35942
+which is in no way similar in implementation but achieves same results. libtool in
+gcc 4.2 does not have postdeps_CXX separated out so it can not be used.
+
+-Khem
+
+Index: gcc-4.2.4/Makefile.in
+===================================================================
+--- gcc-4.2.4.orig/Makefile.in	2010-06-06 09:49:36.724619615 -0700
++++ gcc-4.2.4/Makefile.in	2010-06-06 10:03:59.092090624 -0700
+@@ -33586,6 +33586,7 @@ all-target-libstdc++-v3: configure-targe
+ 	@: $(MAKE); $(unstage)
+ 	@r=`${PWD_COMMAND}`; export r; \
+ 	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
++	sed -i 's|postdeps=\"-lstdc++|postdeps=\"|' $(TARGET_SUBDIR)/libstdc++-v3/libtool; \
+ 	$(RAW_CXX_TARGET_EXPORTS) \
+ 	(cd $(TARGET_SUBDIR)/libstdc++-v3 && \
+ 	  $(MAKE) $(TARGET_FLAGS_TO_PASS) 'CXX=$$(RAW_CXX_FOR_TARGET)' 'CXX_FOR_TARGET=$$(RAW_CXX_FOR_TARGET)'  $(TARGET-target-libstdc++-v3))





More information about the Openembedded-commits mailing list