# centrino laptop - what arch / cflags to chose?

## paras

in kernelconfig:

pentium m or pentium4?

cflags:

--march=pentium4?

thanks in advance

----------

## jkt

pentium is for original pentiums, use pentium4. btw, there is only one dash: "-march=pentium4"

----------

## brodo

 *paras wrote:*   

> in kernelconfig:
> 
> pentium m or pentium4?

 

pentium m. The processor which is part of the centrino technology is named "Pentium M"

 *paras wrote:*   

> 
> 
> cflags:
> 
> --march=pentium4?
> ...

 

-march=pentium3. The Pentium M is built on top of the pentium 3 architecture; pentium 4 is different.

----------

## Voltago

These are my CFLAGS for my centrino laptop

```
CFLAGS="-Os -march=pentium3 -pipe -frename-registers -fomit-frame-pointer -s -falign-functions=64"
```

and so far I haven't noticed any problems.

----------

## deprecated

Voltage you forgot -msse2 in your CFlags. The Pentium M may be closer to a P3 than a P4, but it does have sse2 support, and you definitely want that included. 

If you use the -march=pentium4 option, sse2 support is included by default.

--Dep

----------

## jkt

sorry, Im totaly blind  :Sad: , I haven't seen the "M" letter  :Sad: (

----------

## thundersteele

I am running happily with the following flags:

"-march=pentium4 -O3 -fomit-frame-pointer -pipe"

nothing else. P4 flag didn't make any problems so far. Of course you should choose Pentium M in your Kernel, the Centrino CPU is simply an Pentium M.

----------

## jcmorris

 *Quote:*   

> I am running happily with the following flags:
> 
> "-march=pentium4 -O3 -fomit-frame-pointer -pipe"
> 
> nothing else. P4 flag didn't make any problems so far. Of course you should choose Pentium M in your Kernel, the Centrino CPU is simply an Pentium M.

 

Of course you will run happily with that, except the timing will be non-optimal.  What people don't realize is that the P4 "netburst" stuff is a totally different beast from anything Intel produced before.  A lot of things that were optimal for a Pentium II/III ran poorly on the P4 because of extra internal shifts and extra things that needed to go on within the P4 core during execution.  When the Centrino was developed, Intel's Israeli team took the blueprints of the PentiumPro (PII and PIII), and modified it.  The Centrino responds better to PIII timing than with the Pentium 4.  DON'T USE PENTIUM 4 TIMING ON A PENTIUM-PRO CORE.

jcm

----------

## Voltago

 *deprecated wrote:*   

> Voltage you forgot -msse2 in your CFlags. The Pentium M may be closer to a P3 than a P4, but it does have sse2 support, and you definitely want that included. 
> 
> 

 

Whoops, sounds like I've some serious recompiling to do... thanks, I didn't know this...

----------

## mooerito

i had march=pentium4 before and i had some serious problems (specially with power manaagement and other hardware related stuff), after i stepped back to pentium3 it was ok. my current flags are

```
CFLAGS="-O2 -march=pentium3 -pipe -fomit-frame-pointer -fforce-addr -frename-registers -fprefetch-loop-arrays -falign-functions=64"
```

so far everything is running snooth. but i will add the msse2 stuff now, didnt have that before.

afaik with gcc3.4 there will be a march=pentiumM. can somebody with more compilerknowldge than me confirm that?

----------

## jcmorris

According the to the documentation, it should have -march=pentium-m.  You know, GCC-3.4 stable is out now, I need to build this  :Smile: 

jcm

----------

## forceflow2

Already tried it, doesn't seem to work

----------

## paras

hm, so -march=pentium-m doesn't work yet?

OK, I'll go for "-march=pentium3 -O2 -msse2 -fomit-frame-pointer -pipe" then, i need a stable system  :Wink: 

Thank you all.

----------

## thundersteele

According to gcc-3.4 manual, there is no such cpu-ype supported. 

http://gcc.gnu.org/onlinedocs/gcc-3.4.0/gcc/i386-and-x86-64-Options.html#i386%20and%20x86-64%20Options

Only pentium3 and pentium4 are valid options for -march=cpu-type (of course there are others, but nothing for Pentium M).

----------

## jcmorris

Sorry guys, I was reading the test version of the gcc docs   :Embarassed: 

jcm

----------

## mooerito

i added the -msse2 flag to my config and yesterday i was getting floatin point exceptions when using python. when i took away the flags and recompiled the numarray lib everything was runnig smooth again. so there might be still some trouble using those flags, i think ill leave them off for the time being.Last edited by mooerito on Thu May 13, 2004 9:57 am; edited 1 time in total

----------

## Voltago

Mooerito, did you use -march=pentium3?

And doesn't -march=pentium3 imply -mmmx? In that case, the -msse2 flag alone would be to blame.

----------

## mooerito

ok youre right there (i used pentium3). i forgot about mmmx being already included in march=pentium3 

i just corrected my post up there.

----------

