Skip to contentSkip to conversation

gcc: move --enable-target-optspace workaround to just gcc-4.5.1

PATCH In review Kumar Gala 1 participant 2 messages Aug 10, 2011 – Aug 11, 2011

lore
Share & tools
lore

Kumar Gala

author
#0 lore raw

PATCH 1/1 gcc: move --enable-target-optspace workaround to just gcc-4.5.1

For ppc we disable '--enable-target-optspace' because of a bug in gcc 4.5.x. gcc 4.6.x fixes this issue so no need to do this.

---
 meta/recipes-devtools/gcc/gcc-4.5.1.inc            |    8 ++++++++
 meta/recipes-devtools/gcc/gcc-4.6.inc              |    2 +-
 meta/recipes-devtools/gcc/gcc-configure-common.inc |    7 +------
 3 files changed, 10 insertions(+), 7 deletions(-)
meta/recipes-devtools/gcc/gcc-4.5.1.inc +8 -0
index 1b21a75..54a2d87 100644
@@ -93,6 +93,14 @@ EXTRA_OECONF_INTERMEDIATE = "--disable-libmudflap \
 				--disable-libgomp \
 				--disable-libssp"
 
+# disable --enable-target-optspace for powerpc SPE
+# at -Os libgcc.so.1 creates references into
+# hidden symbols in libgcc.a which linker complains
+# when linking shared libraries further in the build like (gnutls)
+
+SPECIAL_ARCH_LIST = "powerpc"
+OPTSPACE = ${@base_contains("SPECIAL_ARCH_LIST", "${TARGET_ARCH}", "", "--enable-target-optspace",d)}
+
 EXTRA_OECONF_append_linux-uclibc = " --disable-decimal-float "
 EXTRA_OECONF_append_linux-uclibceabi = " --disable-decimal-float "
 EXTRA_OECONF_append_linux-uclibcspe = " --disable-decimal-float "
meta/recipes-devtools/gcc/gcc-4.6.inc +1 -1
index f952ac8..0f40ac9 100644
@@ -1,6 +1,6 @@
 require gcc-common.inc
 
-PR = "r4"
+PR = "r5"
 
 # Third digit in PV should be incremented after a minor release
 # happens from this branch on gcc e.g. currently its 4.6.0
meta/recipes-devtools/gcc/gcc-configure-common.inc +1 -6
index 869d1b6..56721ce 100644
@@ -12,13 +12,8 @@ JAVA_sh3 ?= ""
 # gcc 3.x expects 'f77', 4.0 expects 'f95', 4.1 and 4.2 expect 'fortran'
 FORTRAN ?= ",f77"
 LANGUAGES ?= "c,c++${FORTRAN}${JAVA}"
-# disable --enable-target-optspace for powerpc SPE
-# at -Os libgcc.so.1 creates references into
-# hidden symbols in libgcc.a which linker complains
-# when linking shared libraries further in the build like (gnutls)
 
-SPECIAL_ARCH_LIST = "powerpc"
-OPTSPACE = ${@base_contains("SPECIAL_ARCH_LIST", "${TARGET_ARCH}", "", "--enable-target-optspace",d)}
+OPTSPACE ?= "--enable-target-optspace"
 
 EXTRA_OECONF_BASE ?= ""
 EXTRA_OECONF_PATHS ?= ""
Signature · 1 line
1.7.3.4
author
#1 lore raw
Quoted 9 lines · Kumar Gala

For ppc we disable '--enable-target-optspace' because of a bug in gcc 4.5.x. gcc 4.6.x fixes this issue so no need to do this.

---

meta/recipes-devtools/gcc/gcc-4.5.1.inc            |    8 ++++++++
meta/recipes-devtools/gcc/gcc-4.6.inc              |    2 +-
meta/recipes-devtools/gcc/gcc-configure-common.inc |    7 +------
3 files changed, 10 insertions(+), 7 deletions(-)

Khem,

When I drop to do this I see the following:

| /local/home/galak/git/poky-gcc-opt/build/tmp/sysroots/x86_64-linux/usr/lib/ppc603e-poky-linux.gcc-cross-intermediate/gcc/powerpc-poky-linux/4.6.1/crtend.o: In function `__do_global_ctors_aux':
| crtstuff.c:(.text+0xc): undefined reference to `_savegpr_31'

I noticed some gcc bug about 4.5.x that you where on, but not sure why we same issue on 4.6 as it has the patch you reference about this issue.

I don't quite understand what it was the patch was doing that you referenced so I'm a bit stuck at this point.

- k