Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 15672 - kernel patch for gcc 3.2 optimizations
Summary: kernel patch for gcc 3.2 optimizations
Status: RESOLVED INVALID
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: PPC Linux
: Low enhancement (vote)
Assignee: Bryon Roche (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-02-13 23:35 UTC by Chris PeBenito (RETIRED)
Modified: 2006-02-04 06:03 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
gcc31-compile-optimizations-ppc kernel patch (gcc31-compile-optimizations-ppc,9.21 KB, patch)
2003-02-13 23:36 UTC, Chris PeBenito (RETIRED)
Details | Diff
gcc31-compile-optimizations-ppc kernel patch (gcc31-compile-optimizations-ppc,9.21 KB, patch)
2003-02-16 12:55 UTC, Chris PeBenito (RETIRED)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Chris PeBenito (RETIRED) gentoo-dev 2003-02-13 23:35:59 UTC
Here is a kernel patch, which adds gcc3 optimizations to the kernel build.  It
is similar to the gcc31-compile-optimizations patch used in gentoo-sources.  It
adds these options to the Processor type selection:

6xx(GCC>3.1)
7xx(GCC>3.1)
74xx(GCC>3.1)
7450(GCC>3.1)

When one of these are selected, -O3 is added to CFLAGS and the appropriate -mcpu
setting.  This is a start, with testing more optimization flags could be added
if you're daring :).  Obviously this needs some testing more testing, but as of
this writing, its working fine on my G3 so far.
Comment 1 Chris PeBenito (RETIRED) gentoo-dev 2003-02-13 23:36:46 UTC
Created attachment 8268 [details, diff]
gcc31-compile-optimizations-ppc kernel patch
Comment 2 Chris PeBenito (RETIRED) gentoo-dev 2003-02-13 23:39:52 UTC
I forgot to mention that it applies cleanly to 2.4.20: vanilla and ppc-sources-r3
Comment 3 Chris PeBenito (RETIRED) gentoo-dev 2003-02-16 12:55:39 UTC
Created attachment 8335 [details, diff]
gcc31-compile-optimizations-ppc kernel patch

There was an error in the previous patch, causing the option MPC8260 CPM
Support to not show up, this should fix it.
Comment 4 Bryon Roche (RETIRED) gentoo-dev 2003-04-28 11:55:56 UTC
I'll bang around with this and see if it works on my G4, but I kind of doubt that it will.
Comment 5 Pieter Van den Abeele (RETIRED) gentoo-dev 2003-07-15 01:06:43 UTC
Patch seems ok to me, my only comment is that -O3 on a G4 is known to be flaky.
Apart from that it is a non-exclusive patch (meaning, you can still compile the kernel the old way if you prefer).

If we switch to -O3 only for G3, this patch is ok for inclusion if kain wants to.





 
Comment 6 Jay Pfeifer (RETIRED) gentoo-dev 2003-09-16 11:21:22 UTC
I would strongly discourage -O3 for any kernel compiles. I know firsthand it 
can cause issues in some inline assembler and some other code. AC has voiced 
his concern on this a couple of times as well as a few others in LKML. 
 
I already removed the -O3 opts from Gentoo Sources ~ 6 months ago. Closed a 
good number of bugs. 
 
Jay 
Comment 7 Chris PeBenito (RETIRED) gentoo-dev 2003-09-17 07:39:58 UTC
This should probably be closed out, and the patch not used.  I made it 8 months ago.  I dont think it will apply to recent benh kernels.  It probably doesnt do much for ppc anyway, esp. since it should be -O2 (as Jay pointed out) instead of the -O3 I did back then.
Comment 8 Tim Yamin (RETIRED) gentoo-dev 2003-09-17 11:58:00 UTC
Closed as requested.