On Fri, Jun 03, 2005 at 10:02:30AM +0200, Khan wrote
> Hello,
>
> I'm thinking of installing gentoo on server with Intel?? Extended Memory
> 64 Technology. Do I have to make something special in make.conf or to
> use usual flags:
>
> CHOST="i686-pc-linux-gnu"
> CFLAGS="-march=pentium4 -O3 -pipe -fomit-frame-pointer"
> CXXFLAGS="-march=pentium4 -O3 -pipe -fomit-frame-pointer"
> MAKEOPTS="-j5"
There are good flags, and there are bad flags. "-O3" should be banned
outright. It sometimes speeds things up, sometimes slows things downs,
and sometimes causes mysterious crashes that nobody else can duplicate.
You will *NOT* receive support in the Gentoo bugzilla forum if you tell
people you compiled with "-O3". Use "-O2" unless there is a good reason
to do otherwise.
Similarly MAKEOPTS should *NOT* be more than (number_of_cpu + 1).
Note that dual-core counts as 2 cpus and single-core_with_hyperthreading
also counts as 2 cpus. MAKEOPTS="-j5" is OK *IF* you have
4 physical cpus, or
2 dual-core cpus, or
1 quad-core cpu, or
2 physical cpus with hyperthreading enabled, or
1 dual-core cpu with hyperthreading enabled
Otherwise, you will run into mysterious compile-time errors that nobody
else can duplicate, and you will *NOT* receive support in the Gentoo
bugzilla forum. Play if safe with MAKEOPTS="-j2". j1 doesn't cost that
much in compile time, and it only affects compile time. I found out
"the hard way" that MAKEOPTS="-j2" is too aggressive on a 400 mhz PII,
so I've changed all 3 of my machines to MAKEOPTS="-j1"
Another tip is to put CXXFLAGS="${CFLAGS}" *AFTER* the CFLAGS line.
This will copy the values in CFLAGS, and you won't have to worry about
synchronizing CXXFLAGS. It'll be done automatically.
So far, I've told you what *NOT* to do <g>. There are sane flags that
you can use to boost the performance of applications. CPU-intensive
apps like mplayer will benefit greatly from this.
Execute "cat /proc/cpuinfo > cpu.txt" on your machine and check the
"flags" line. Here's the "flags" line from my P4 machine. *NOTE; YOUR
MACHINE WILL BE DIFFERENT UNLESS YOU HAVE THE EXACT SAME MODEL AND
STEPPING CPU FROM THE SAME MANUFACTURER*...
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov
pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm
*SOME* of the flags listed in /proc/cpuinfo can be used with make.conf
CFLAGS. You have to check the gcc documentation to confirm which flags
can be used. If you are running gcc-3.3.5, check the page...
http://gcc.gnu.org/onlinedocs/gcc-3.3.5/gcc/i386-and-x86_002d64-Options.html#i38+6-and-x86_002d64-Options
Here's what I use on my P4
CFLAGS="-O2 -march=pentium4 -fomit-frame-pointer -pipe -mfpmath=sse -mmmx
-msse2"
*SOME* of the flags listed on /proc/cpuinfo can also be used in the
make.conf USE variable. This applies to mmx and sse and a few others.
See http://www.gentoo.org/dyn/use-index.xml for a list of valid USE
flags.
Try "cat /proc/cpuinfo > cpu.txt" on your machine and post the
contents of cpu.txt here, and we can advise you which flags to use.
--
Walter Dnes <[EMAIL PROTECTED]>
An infinite number of monkeys pounding away on keyboards will
eventually produce a report showing that Windows is more secure,
and has a lower TCO, than linux.
--
[email protected] mailing list