[oe] [PATCH] sane-toolchain-*glibc.inc: Use -O2 on PowerPC

Tom Rini tom_rini at mentor.com
Wed Nov 17 14:15:34 UTC 2010


In FULL_OPTIMIZATION use -O2 on powerpc due to some problems
with libgcc.a and -Os when using gcc 4.5.x.

Signed-off-by: Tom Rini <tom_rini at mentor.com>
---
 conf/distro/include/sane-toolchain-eglibc.inc |    3 +++
 conf/distro/include/sane-toolchain-glibc.inc  |    3 +++
 2 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/conf/distro/include/sane-toolchain-eglibc.inc b/conf/distro/include/sane-toolchain-eglibc.inc
index c077ed1..77f2e3b 100644
--- a/conf/distro/include/sane-toolchain-eglibc.inc
+++ b/conf/distro/include/sane-toolchain-eglibc.inc
@@ -9,6 +9,9 @@ FULL_OPTIMIZATION_pn-eglibc_arm = "-fexpensive-optimizations -fomit-frame-pointe
 FULL_OPTIMIZATION_pn-perl = "-fexpensive-optimizations -fomit-frame-pointer -frename-registers -O1"
 FULL_OPTIMIZATION_sparc = "-fexpensive-optimizations -fomit-frame-pointer -frename-registers -O2"
 
+# gcc 4.5 has a problem with 'leakage' into libgcc.a with -Os
+FULL_OPTIMIZATION_powerpc = "-fexpensive-optimizations -fomit-frame-pointer -frename-registers -O2"
+
 # JaMa: I promise to report bug upstream, but as it can take a while to fix it, I'll switch to -O2 here
 # Tested with gcc-4.4.2 and gcc-4.4.3 on armv4t and armv5te and it fails with -Os, with gcc-4.3.3 it works OK with -Os
 # Here is testcase, but you have to rebuild whole libqtxml to test it
diff --git a/conf/distro/include/sane-toolchain-glibc.inc b/conf/distro/include/sane-toolchain-glibc.inc
index e806de6..5802ef1 100644
--- a/conf/distro/include/sane-toolchain-glibc.inc
+++ b/conf/distro/include/sane-toolchain-glibc.inc
@@ -13,6 +13,9 @@ FULL_OPTIMIZATION_pn-perl = "-fexpensive-optimizations -fomit-frame-pointer -fre
 FULL_OPTIMIZATION_pn-glibc = "-fexpensive-optimizations -fomit-frame-pointer -O2"
 FULL_OPTIMIZATION_sparc = "-fexpensive-optimizations -fomit-frame-pointer -frename-registers -O2"
 
+# gcc 4.5 has a problem with 'leakage' into libgcc.a with -Os
+FULL_OPTIMIZATION_powerpc = "-fexpensive-optimizations -fomit-frame-pointer -frename-registers -O2"
+
 BUILD_OPTIMIZATION_pn-perl = "-O1"
 BUILD_OPTIMIZATION_pn-glibc = "-O2"
 BUILD_OPTIMIZATION_sparc = "-O2"
-- 
1.7.0.4





More information about the Openembedded-devel mailing list