# Compiling Gentoo with Intel(R) Core(TM)2 CPU

## reggy

Hi, i'm going to install gentoo but before i want to know which CFLAGS i may use. My computer is a laptop: Asus F3JC with an Intel(R) Core(TM)2 CPU T5600 @ 1.83GHz. I read this page and I don't know what CFLAGS i have to use:

32 bit profile (x86):

```
CHOST="i686-pc-linux-gnu"

CFLAGS="-march=prescott -O2 -pipe -fomit-frame-pointer"

CXXFLAGS="${CFLAGS}"
```

64 bit profile (amd64):

```
CHOST="x86_64-pc-linux-gnu"

CFLAGS="-march=nocona -O2 -pipe"

CXXFLAGS="${CFLAGS}"
```

is it worth choosing a 64 bit profile or is it better to continue using a 32 bit profile? I allways use 32 bit prebuilt systems but my laptop supports 64 bit, What should I do?

Thanks a lot for your help and patient, and sorry for my English. Cheers

----------

## John R. Graham

Hi, reggy.  Welcome to Gentoo.  The Safe CFLAGS page is generally a good and reliable reference and you've extracted good information from it:  the settings you've related are fine.  If you're new to Linux, I'd stick to the 32-bit profile if I were you as there are less sharp edges on 32-bit.

One more word of advice.  Use the latest Gentoo Weekly Minimal Install CD for x86 or amd64, not the 2008.0 Install CD or LiveCD.  Work through the manual install as described in the Handbook.  Doing so will teach you a lot.    :Wink: 

- John

----------

## reggy

Hi john_r_graham, thanks very much for your help and wellcome  :Smile: 

Ok, so I will use a 32-bit profile. I've downloaded both install-x86-minimal-*.iso and install-amd64-minimal-*.iso images, Is there no difference between them? I'd use install-x86-minimal-*.iso because my CPU is Intel but i don't have clear at all hehe

Thanks!

----------

## Ph0eniX

 *reggy wrote:*   

> Hi john_r_graham, thanks very much for your help and wellcome 
> 
> Ok, so I will use a 32-bit profile. I've downloaded both install-x86-minimal-*.iso and install-amd64-minimal-*.iso images, Is there no difference between them? I'd use install-x86-minimal-*.iso because my CPU is Intel but i don't have clear at all hehe
> 
> Thanks!

 

It doesn't matter that the image has AMD64 in the name.  It just means that it supports the extended 64bit architecture that was developed by AMD but Intel CPUs support it as well.  Intel calls it EMT64 (also commonly referred to as x64) but it's the same thing.  As suggested, stick with x86 if you're a newbie as AMD64 doesn't support all the cool things that x86 does just yet.

----------

## DaggyStyle

these are mine: 

```
# These settings were set by the catalyst build script that automatically

# built this stage.                                                      

# Please consult /etc/make.conf.example for a more detailed example.     

CFLAGS="-march=core2 -O2 -pipe"                                          

CXXFLAGS="${CFLAGS}"                                                     

# WARNING: Changing your CHOST is not something that should be done lightly.

# Please consult http://www.gentoo.org/doc/en/change-chost.xml before changing.

CHOST="x86_64-pc-linux-gnu"                                                    

# These are the USE flags that were used in addition to what is provided by the

# profile used for building.                                                   

MAKEOPTS="-j3"      
```

I have C2D t8100 and running 64 bit

----------

## d2_racing

I use this on my QuadCore 

```

CFLAGS="-O2 -march=native -pipe"

CHOST="x86_64-pc-linux-gnu"

CXXFLAGS="${CFLAGS}"

MAKEOPTS="-j5"

```

----------

## ppurka

Yes. Just set -march=native @d2_racing and let gcc take the decisions.

----------

## reggy

Hi,

Thanks very much for your support and suggests. Ph0eniX, ok finally i used x86 iso image  :Smile:  and i've used CFLAGS posted by me initially (using 32-bit architecture)

OK, yesterday i was so tired and i didn't start the gentoo installation. Now I'm on selecting a Profile and USE flags steps. I'm reading about USE flags and Profiles, and i'll open new post (on Desktop environments subforum, not here hehe) for discusing what USE flags would be better for me.

Thanks again a lot for your help, some years ago i've used Gentoo for a couple of years (1.2, 1.4 versions and so on  :Smile: ) but i had to start using another systems at work (mainly Windows) and now i'm very oxidated with my "gentoo skills" hehe. Your help is very appreciated.

Sorry for my language mistakes and Have a nice day!

Cheers

----------

## reggy

Rehi. One thing more, DaggyStyle why do you use -march=core2 instead -march=nocona

Reading gcc.gnu.org online documentations it says:

 *Quote:*   

> nocona
> 
>     Improved version of Intel Pentium4 CPU with 64-bit extensions, MMX, SSE, SSE2 and SSE3 instruction set support.
> 
> core2
> ...

 

Would not be better "nocona"?

Cheers

----------

## doctork

 *Ph0eniX wrote:*   

> [ As suggested, stick with x86 if you're a newbie as AMD64 doesn't support all the cool things that x86 does just yet.

 

Really??  I've never used anything but AMD64 on any of my 64-bit capable systems.  Now I have to wonder what all these "cool things" that I've been missing might be.

--

doc

----------

## DaggyStyle

 *reggy wrote:*   

> Rehi. One thing more, DaggyStyle why do you use -march=core2 instead -march=nocona
> 
> Reading gcc.gnu.org online documentations it says:
> 
>  *Quote:*   nocona
> ...

 

no because nocona is more core solo targeted, core2 is more c2d/q targeted.

read again the doc, nocona is for Pentium4 cpu while core2 is for Core2 cpu.

notice my cpuinfo:

 *Quote:*   

> processor       : 0                   
> 
> vendor_id       : GenuineIntel        
> 
> cpu family      : 6                   
> ...

 

----------

## DaggyStyle

 *Ph0eniX wrote:*   

>  *reggy wrote:*   Hi john_r_graham, thanks very much for your help and wellcome 
> 
> Ok, so I will use a 32-bit profile. I've downloaded both install-x86-minimal-*.iso and install-amd64-minimal-*.iso images, Is there no difference between them? I'd use install-x86-minimal-*.iso because my CPU is Intel but i don't have clear at all hehe
> 
> Thanks! 
> ...

 

sounds strange... where did you read that?

----------

## John R. Graham

Lots of places, for instance here.  :Smile: 

- John

----------

## DaggyStyle

 *john_r_graham wrote:*   

> Lots of places, for instance here. 
> 
> - John

 

wikipedia isn't a valid source for me, please any amd official document

----------

## John R. Graham

No thanks.  Perhaps a librarian would help you.

- John

----------

## DaggyStyle

 *john_r_graham wrote:*   

> No thanks.  Perhaps a librarian would help you.
> 
> - John

 

then it adds to my suspicion that is it just a rumor, let me guess, all intel cpus support all 64 bit instructions without any problem, right?

----------

## Hu

 *DaggyStyle wrote:*   

> then it adds to my suspicion that is it just a rumor, let me guess, all intel cpus support all 64 bit instructions without any problem, right?

 No, I have a Pentium around here that does not support 64-bit mode.  :Wink: 

Intel has two architectures which support 64-bit operation: Itanium (Gentoo name: ia64) and EM64T (Gentoo name: amd64; not EMT64 as posted above).  Core2 CPUs are EM64T, not Itanium.  The nocona arch is an older 64-bit design.  As far as I know, nocona is a subset of core2, just like pentium is a subset of pentium4.  You can use a binary built with -march=nocona on a chip that could handle -march=core2, but you may not be able to run a binary built with -march=core2 on a chip that only handles -march=nocona.

doctork: I think that is leftover wisdom from when Gentoo amd64 users needed to run ~amd64 to get updates in a timely manner.  Gentoo amd64 users can now run non-testing and still get updates at approximately the same rate as x86 non-testing, in my opinion.

----------

## Ph0eniX

 *DaggyStyle wrote:*   

>  *Ph0eniX wrote:*    *reggy wrote:*   Hi john_r_graham, thanks very much for your help and wellcome 
> 
> Ok, so I will use a 32-bit profile. I've downloaded both install-x86-minimal-*.iso and install-amd64-minimal-*.iso images, Is there no difference between them? I'd use install-x86-minimal-*.iso because my CPU is Intel but i don't have clear at all hehe
> 
> Thanks! 
> ...

 

Which part should I elaborate on?

----------

## DaggyStyle

 *Ph0eniX wrote:*   

>  *DaggyStyle wrote:*    *Ph0eniX wrote:*    *reggy wrote:*   Hi john_r_graham, thanks very much for your help and wellcome 
> 
> Ok, so I will use a 32-bit profile. I've downloaded both install-x86-minimal-*.iso and install-amd64-minimal-*.iso images, Is there no difference between them? I'd use install-x86-minimal-*.iso because my CPU is Intel but i don't have clear at all hehe
> 
> Thanks! 
> ...

 

the fact that amd cpus don't support x86 instructions... where did you read it?

----------

## d2_racing

In fact, I want to know more about that too  :Razz: 

----------

## Ph0eniX

 *DaggyStyle wrote:*   

>  *Ph0eniX wrote:*    *DaggyStyle wrote:*    *Ph0eniX wrote:*    *reggy wrote:*   Hi john_r_graham, thanks very much for your help and wellcome 
> 
> Ok, so I will use a 32-bit profile. I've downloaded both install-x86-minimal-*.iso and install-amd64-minimal-*.iso images, Is there no difference between them? I'd use install-x86-minimal-*.iso because my CPU is Intel but i don't have clear at all hehe
> 
> Thanks! 
> ...

 

I know this is pretty old but I never claimed that AMD CPUs don't support x86 instructions.  Something I said must have been misunderstood.

----------

