[oe-commits] Khem Raj : gcc-4.5.inc: Enable -flto on 4. 5 so it can be used but its not on by default.

git version control git at git.openembedded.org
Tue Jun 8 22:19:11 UTC 2010


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

Author: Khem Raj <raj.khem at gmail.com>
Date:   Tue Jun  8 15:12:08 2010 -0700

gcc-4.5.inc: Enable -flto on 4.5 so it can be used but its not on by default.

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

---

 recipes/gcc/gcc-4.5.inc                            |    5 ++-
 .../libstdc++-emit-__cxa_end_cleanup-in-text.patch |   31 +++++++++++++------
 2 files changed, 24 insertions(+), 12 deletions(-)

diff --git a/recipes/gcc/gcc-4.5.inc b/recipes/gcc/gcc-4.5.inc
index 6c5b044..9304191 100644
--- a/recipes/gcc/gcc-4.5.inc
+++ b/recipes/gcc/gcc-4.5.inc
@@ -8,7 +8,7 @@ DEPENDS = "mpfr gmp libmpc"
 NATIVEDEPS = "mpfr-native gmp-native libmpc-native"
 
 
-INC_PR = "r2"
+INC_PR = "r3"
 
 SRCREV = "160413"
 PV = "4.5"
@@ -42,7 +42,8 @@ do_unpack_append() {
         bb.build.exec_func('rename_srcdir', d)
 }
 
-EXTRA_OECONF_BASE = " --enable-libssp \
+EXTRA_OECONF_BASE = " --enable-lto \
+		      --enable-libssp \
 		      --disable-bootstrap --disable-libgomp \
 		      --disable-libmudflap"
 
diff --git a/recipes/gcc/gcc-4.5/libstdc++-emit-__cxa_end_cleanup-in-text.patch b/recipes/gcc/gcc-4.5/libstdc++-emit-__cxa_end_cleanup-in-text.patch
index 307327c..ada36a5 100644
--- a/recipes/gcc/gcc-4.5/libstdc++-emit-__cxa_end_cleanup-in-text.patch
+++ b/recipes/gcc/gcc-4.5/libstdc++-emit-__cxa_end_cleanup-in-text.patch
@@ -1,29 +1,40 @@
 2010-06-07  Khem Raj  <raj.khem at gmail.com>
 
-	* libsupc++/eh_arm.cc (__cxa_end_cleanup): Switch to
-	.text section before emitting inline assembly.
+	* libsupc++/eh_arm.cc (__cxa_end_cleanup): Use .pushsection/.popsection
+	to emit inline assembly into .text section.
 
-Index: gcc/libstdc++-v3/libsupc++/eh_arm.cc
+Index: gcc-4.5/libstdc++-v3/libsupc++/eh_arm.cc
 ===================================================================
---- gcc/libstdc++-v3/libsupc++/eh_arm.cc	(revision 160410)
-+++ gcc/libstdc++v3/libsupc++/eh_arm.cc	(working copy)
-@@ -157,7 +157,8 @@
+--- gcc-4.5.orig/libstdc++-v3/libsupc++/eh_arm.cc	2010-06-04 23:20:18.000000000 -0700
++++ gcc-4.5/libstdc++-v3/libsupc++/eh_arm.cc	2010-06-08 11:27:34.247541722 -0700
+@@ -157,22 +157,26 @@ __gnu_end_cleanup(void)
  // Assembly wrapper to call __gnu_end_cleanup without clobbering r1-r3.
  // Also push r4 to preserve stack alignment.
  #ifdef __thumb__
 -asm (".global __cxa_end_cleanup\n"
-+asm ("  .section .text.__cxa_end_cleanup\n"
++asm ("  .pushsection .text.__cxa_end_cleanup\n"
 +"	.global __cxa_end_cleanup\n"
  "	.type __cxa_end_cleanup, \"function\"\n"
  "	.thumb_func\n"
  "__cxa_end_cleanup:\n"
-@@ -166,7 +167,8 @@
+ "	push\t{r1, r2, r3, r4}\n"
+ "	bl\t__gnu_end_cleanup\n"
  "	pop\t{r1, r2, r3, r4}\n"
- "	bl\t_Unwind_Resume @ Never returns\n");
+-"	bl\t_Unwind_Resume @ Never returns\n");
++"	bl\t_Unwind_Resume @ Never returns\n"
++"	.popsection\n");
  #else
 -asm (".global __cxa_end_cleanup\n"
-+asm ("  .section .text.__cxa_end_cleanup\n"
++asm ("  .pushsection .text.__cxa_end_cleanup\n"
 +"	.global __cxa_end_cleanup\n"
  "	.type __cxa_end_cleanup, \"function\"\n"
  "__cxa_end_cleanup:\n"
  "	stmfd\tsp!, {r1, r2, r3, r4}\n"
+ "	bl\t__gnu_end_cleanup\n"
+ "	ldmfd\tsp!, {r1, r2, r3, r4}\n"
+-"	bl\t_Unwind_Resume @ Never returns\n");
++"	bl\t_Unwind_Resume @ Never returns\n"
++"	.popsection\n");
+ #endif
+ 
+ #endif





More information about the Openembedded-commits mailing list