]> code.ossystems Code Review - openembedded-core.git/commitdiff
gcc: Add patch to allow disabling of libstdc++ linkage and hence fix gcc-runtime...
authorRichard Purdie <rpurdie@linux.intel.com>
Mon, 28 Jun 2010 23:35:02 +0000 (00:35 +0100)
committerRichard Purdie <rpurdie@linux.intel.com>
Mon, 28 Jun 2010 23:35:02 +0000 (00:35 +0100)
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
meta/packages/gcc/gcc-4.3.3.inc
meta/packages/gcc/gcc-4.3.3/optional_libstdc.patch [new file with mode: 0644]
meta/packages/gcc/gcc-configure-runtime.inc
meta/packages/gcc/gcc-cross_4.3.3.bb
meta/packages/gcc/gcc-runtime_4.3.3.bb

index dcd905ccfe6825688693ef350d73cb9143455090..5cfa0f68d811e5ece24c4bba641ca4aad4ebbb8a 100644 (file)
@@ -53,6 +53,7 @@ SRC_URI = "${GNU_MIRROR}/gcc/gcc-${PV}/gcc-${PV}.tar.bz2 \
        file://zecke-xgcc-cpp.patch;patch=1 \
        file://gcc-flags-for-build.patch;patch=1 \
        file://pr35942.patch;patch=1 \
+       file://optional_libstdc.patch;patch=1 \
 "
 
 SRC_URI_append_sh3  = " file://sh3-installfix-fixheaders.patch;patch=1 "
diff --git a/meta/packages/gcc/gcc-4.3.3/optional_libstdc.patch b/meta/packages/gcc/gcc-4.3.3/optional_libstdc.patch
new file mode 100644 (file)
index 0000000..0f74353
--- /dev/null
@@ -0,0 +1,23 @@
+gcc-runtime builds libstdc++ separately from gcc-cross-*. Its configure tests using g++ 
+will not run correctly since my default the linker will try and link against libstdc++
+which shouldn't exist yet. We need an option to disable the automatically added -lstdc++
+option whilst leaving -lc, -lgcc and other automatic library dependencies. This patch 
+adds such an option which only disables the -lstdc++ linkage.
+
+A "standard" gcc build uses xgcc and hence avoids this. We should ask upstream how to 
+do this officially, the likely answer is don't build libstdc++ separately.
+
+RP 29/6/10
+
+Index: gcc-4.3.3/gcc/cp/g++spec.c
+===================================================================
+--- gcc-4.3.3.orig/gcc/cp/g++spec.c    2010-06-29 00:06:03.901695025 +0100
++++ gcc-4.3.3/gcc/cp/g++spec.c 2010-06-29 00:06:58.800325439 +0100
+@@ -131,6 +131,7 @@
+       if (argv[i][0] == '-')
+       {
+         if (strcmp (argv[i], "-nostdlib") == 0
++            || strcmp (argv[i], "-nostdlib++") == 0
+             || strcmp (argv[i], "-nodefaultlibs") == 0)
+           {
+             library = -1;
index 180ca8d0ee74aee8fedaabec676feff6f569a73e..9719e48ab568b5ce852b39823553b66e36493c40 100644 (file)
@@ -13,7 +13,7 @@ RUNTIMETARGET = "libssp libstdc++-v3"
 # libgfortran
 
 do_configure () {
-       export CXX="${CXX} -nostdinc++"
+       export CXX="${CXX} -nostdinc++ -nostdlib++"
        for d in ${RUNTIMETARGET}; do
                echo "Configuring $d"
                mkdir -p ${B}/$d/
index 76d32673c1375183244d8875ed2d7fc0cb495bd2..98573f0c5a906c2cde00f4e3f68a3c49d36aa19d 100644 (file)
@@ -1,4 +1,4 @@
-PR = "r12"
+PR = "r14"
 
 require gcc-${PV}.inc
 require gcc-cross4.inc
index f94e07ce2bccb295f9cc637b1b44645f831cafec..6768674c1e48211e7f6fa345ccb2a6e464490f20 100644 (file)
@@ -1,4 +1,4 @@
-PR = "r12"
+PR = "r14"
 
 require gcc-${PV}.inc
 require gcc-configure-runtime.inc