| View previous topic :: View next topic |
| Author |
Message |
jenkler Tux's lil' helper


Joined: 28 Apr 2003 Posts: 134 Location: Sweden - Stockholm
|
Posted: Thu May 29, 2003 7:15 pm Post subject: Hello, need help with gcc flags to my kernel.... |
|
|
what do i need to write in my make.conf to get optimation flags
-03 .....
i have seen it somwhere... please help me. _________________ For everyone:
All clothing and fashion collected online in one place!
For Swedish people only
Få bra modetips här: Modeforum , vad har du att förlora?
/Jenkler |
|
| Back to top |
|
 |
bmichaelsen Veteran


Joined: 17 Nov 2002 Posts: 1276 Location: Hamburg, Germany
|
|
| Back to top |
|
 |
jenkler Tux's lil' helper


Joined: 28 Apr 2003 Posts: 134 Location: Sweden - Stockholm
|
Posted: Thu May 29, 2003 7:53 pm Post subject: No! i don´t meen thease flags.. |
|
|
CHOST="i686-pc-linux-gnu"
CFLAGS="-mcpu=i686 -O3 -pipe"
CXXFLAGS="-mcpu=i686 -O3 -pipe"
there sould be a flag like,,,,
kernflags="super optimice" <--- something like this....
i want my kernel to be optiimised.....<--- i know "bad spelling" _________________ For everyone:
All clothing and fashion collected online in one place!
For Swedish people only
Få bra modetips här: Modeforum , vad har du att förlora?
/Jenkler |
|
| Back to top |
|
 |
bmichaelsen Veteran


Joined: 17 Nov 2002 Posts: 1276 Location: Hamburg, Germany
|
Posted: Thu May 29, 2003 8:25 pm Post subject: |
|
|
optimization for the kernel is is done with make menuconfig when you choose the best architecture in Processortype and features/Processor family ... _________________ etc-proposals, your friendly config file updater! |
|
| Back to top |
|
 |
robmoss Retired Dev

Joined: 27 May 2003 Posts: 2634 Location: Jesus College, Oxford
|
Posted: Thu May 29, 2003 10:20 pm Post subject: |
|
|
I edited the Makefiles by hand.
If you edit about the 20th line and about the 91st line (depending on which version of the kernel you are using; I'm using the gentoo-sources 2.4.20 kernel) of the Makefile once you've unpacked the sources, you can change the default CFLAGS settings.
I know there's a prettier way to do this, and I think it involves make.conf, but I don't know it off hand. This method does work; it's the method I used when I was using an LFS (Linux From Scratch) system before I decided to have a go at Gentoo, and it's the method I still use now because I trust it...
Anyway, enjoy! |
|
| Back to top |
|
 |
Lovechild Advocate


Joined: 17 May 2002 Posts: 2858 Location: Århus, Denmark
|
Posted: Thu May 29, 2003 10:31 pm Post subject: |
|
|
| do not mess with the kernels compile flags, it's written partly in asm and carefully inlined C - it's tweaked as close to the peak as humanly possible and the compiler will only fuck it up and make it slower. |
|
| Back to top |
|
 |
robmoss Retired Dev

Joined: 27 May 2003 Posts: 2634 Location: Jesus College, Oxford
|
Posted: Thu May 29, 2003 10:57 pm Post subject: |
|
|
Certainly true, but it's optimized for GCC 2.95.3, in a big way. So if you're using GCC 2.95.3, then leave well alone.
If you're not, then there's no real harm in letting the thing know about Athlon XP CPUs, for example (I think the gentoo patches do this too, but I'm not sure) so that you can use -march=athlon-xp instead of the plain old -march=athlon. That setting is hidden away somewhere in arch/i386/Makefile. Also, I make sure that -fomit-frame-pointer, -fforce-mem and -fforce-addr are always on in the base Makefile, as I have no need to debug the kernel, and -fforce-mem and -fforce-addr both create better code.
Obviously, going for -O3 is a bit silly as it bloats the code, so don't bother - the gratuitous loop unrolling does not help matters at all. -ffast-math will give you an unstable kernel (possibly even a kernel that won't boot) - not at all recommended.
If you want a bit more info on this, have a look at the [url=http://www.kernel.org/pub/linux/docs/lkml/#s8]linux-kernel mailing list FAQ[/url], and specifically section 8, entitled "Compiler/binutils questions". Section 8.4 tells you about optimizations.
If you really do want a fast kernel, compile it with GCC 2.95.3! |
|
| Back to top |
|
 |
jenkler Tux's lil' helper


Joined: 28 Apr 2003 Posts: 134 Location: Sweden - Stockholm
|
Posted: Tue Jun 03, 2003 11:48 am Post subject: |
|
|
hmm, ok... but i cant still find anything.....
someone must know about the make.conf....
 _________________ For everyone:
All clothing and fashion collected online in one place!
For Swedish people only
Få bra modetips här: Modeforum , vad har du att förlora?
/Jenkler |
|
| Back to top |
|
 |
|