# Centrino CPU CFLAGS and install isssues.

## proto

I have a Compaq X1010 (SWEET) when using the P4 optimized GRP install grub cannot be executed due to a kernel panic error (Not with me at the moment).

This was using the P4 optimized 1.4 GRP binary CD as recommended from the Gentoo Store for the Centrino (Pentium-M) CPU.

I am downloading the P3 otimized GRP now as I am planning to do this install on the RUN and need to be able to get the base system up without being online.

I know all about the differences between the P3, P4 and Pentium-M CPU, like the pipelines, execution order, sse/sse2, but does anyone know the EXACT GCC Optimisation to specify when compiling for the Centrino?

Thanks

Mike

----------

## Sequentious

I have been using -march=pentium4 for a while now with gcc 3.2.3 without issue. If you had an older gcc version you shouldnt use pentium4 at all. However, i would think the binary distribution would be good still.

Have you looked for any linux-related information for your specific laptop model on, for example, http://www.tuxmobil.org?

----------

## proto

To be honest I did take a look at that post first but there were so many different oppinions that I didn't really know what to use. Just like the question I had posted in 2 forums (yes I know I cross posted but there were 2 different questions in it as well). One reply said P4 and and you say P3.

I have looked extensively into this and the main gist of ot has been that the M series has many P4 instructions added but that heart of it is a P3 based chip. To be on the safe/stable side I have chosen to go with the P3 optimizations this time around... I'll know later how it works out.

I have looked at the MINIMAL info on tuxmobile for this unit but what I am asking is strictly a Centrino question. The notebook works good I just wanted the whole scoop on the centrino optimizations.

-Mike

----------

## Sequentious

Actually, after I replied to this i did some searching.

The p-m is still not based off the p4 or the p3, but it has more similarities with p3 archetecture than with p4. I wonder if "-march=pentium3 -msse2" would be worth it.

----------

## Sequentious

On a quasi-related note, Werner Heuser at tuxmobil was kind enough to host the howto I had written for my centrino-based laptop. I will be sure to update it with the new optimization info some time. 

http://www.tuxmobil.org/gateway_450x.html

----------

## DaFire

I had the same error with my hp/compaq nx7000 ( business version of x1000 ) i think calling grub with the --no-floppy options fixed the problem for me. (well it does not have a floppy)

----------

## smiler.se

I got me a lesson on LKML a few days ago that the centrino core IS a pentium3 and therefor should pentium3 be used. Note that it has p4 instructionset but the CORE is still p3 and if you start to mess with sse2 and stuff like that when you compiled for p4 you can get in deep trouble

----------

## smiler.se

 *smiler.se wrote:*   

> I got me a lesson on LKML a few days ago that the centrino core IS a pentium3 and therefor should pentium3 be used. Note that it has p4 instructionset but the CORE is still p3 and if you start to mess with sse2 and stuff like that when you compiled for p4 you can get in deep trouble

 

See this thread for more info

----------

## racoontje

http://gcc.gnu.org/onlinedocs/gcc/i386-and-x86_002d64-Options.html

Your link is broken.

I assume that -mtune means that setting march and mcpu is useless?

----------

## wabbit

Any new information on Centrino?

I'm currently setting up Gentoo on a Dell laptop with Pentium-M and am also seeking the best optimizations.  It seems the current consensus is that since its "core" closely resembles the Pentium3 (or more closely than Pentium4), Pentium3 should be used in the CFlags.  Also, according to that Gateway article above, the CPU type MUST be set to Pentium3 in the bootstrap.  Why is this the case, and furthermore, if Pentium3 optimizations are used in the bootstrap, why does the author suggest using Pentium4 optimizations for Stage 3?  Is this to take advantage of some of the Pentium4 instructions (SSE2 and others?) that Centrino has?  Can anyone else ascertain these customizations as optimal? Also, should these benchmarks be deemed significant?

https://forums.gentoo.org/viewtopic.php?t=77334

There's a lot of Centrino users out there, so I'm sure we can get to the bottom of this.  Eventually (gcc 3.4?), it seems that there will be a built-in PentiumM option that will make things a lot easier, but how long until

that version becomes stable enough to use?  Finally, I've heard rumors that using the omit frame pointer optimization can be dangerous.  Is this true?

Any information on any of these questions would be grealty appreciated.

----------

## jourbans

I've got a Dell Latitude D600 with a Pentium M and have always used "-march=pentium4" with no problems since I got it in May of 2003.  And that's doing several Stage 1 bootstrap installs.

I'd whole heartedly recommend using the pentium4 flag.

----------

## liber!

I got a gcc3.4 install with pentium-m cflags...

The gentoo developers use the pentium3 flag if they see your using the pentium-m flag for emerging bootstrap. 

Pentium M's're great, I can use mine @ 600MHz and still have great dvd playback quality...

Greets,

Nathan

----------

## mrpdaemon

I have a Pentium-M 2Ghz Dothan CPU, and I have the whole system built with:

"-O3 -march=pentium4 -pipe -fomit-frame-pointer -mfpmath=sse -mmmx -msse2"

The only compilation problem I ever faced was very recently, gst-plugins-ffmpeg, which doesn't like -O3 and compiles when toned down to -O2.

Oh, and I use gcc 3.4.3. I think the new P-M line of CPU's are compatiable with the P4.

----------

## rojanu

if I use

 *Quote:*   

> CFLAGS="-O2 -march=pentium-m -pip"

 

emerging sys-devel/patch-2.5.9 fails 

with an error message something like

 *Quote:*   

> 
> 
> configure: error: C compiler cannot create executables
> 
> See 'config.log' for more details.
> ...

 

but if I use pentium4 I don't get that and it just compiles

What CFLAGS should I use? :Rolling Eyes: 

----------

## rojanu

I fixed it, pentium-m option is not supported by <gcc-3.4

emerged gcc-3.4.3 with pentium4 then changed flag back to pentium-m and then re-emerged system && world.

 How to GCC 3.4

Still re-emerging system && world. I will post if there is any errors.

As for

 *Quote:*   

> What CFLAGS should I use? 

 

CFLAGS determination script

Thanks anyway

----------

