# Which USE flags for Core(TM)2 Duo CPU E8400

## samsungNC10user

Hi all

cat /proc/cpuinfo shows this:

 *Quote:*   

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

 

which of those flags would i want to put into make.conf?

all i found: mmx sse sse2 ssse3 dtsLast edited by samsungNC10user on Sun May 09, 2010 11:11 pm; edited 1 time in total

----------

## erik258

Hi, 

For the most part, USE flags describe the options you'd like to build into your software, not the hardware they're to run on.  There are mmx and sse use flags I think, but they should be enabled by default.  

To get the most of your software, you should adjust your CFLAGS and CXXFLAGS variables to reflect your architecture.  The easiest way to do this is to add a 

```
-march=native
```

to the USE flags so that the code is built with optimizations unique to your processor.   This should include optimizations to use all the nice features your processor supports.  

If you would like to run the code on other systems as well, use -mtune rather than -march.

----------

## samsungNC10user

current

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

CXXFLAGS="-march=nocona -O2 -pipe"

change to?:

CFLAGS="-march=native"

or

CXXFLAGS="-march=native -O2 -pipe"

----------

## erik258

if you're building on the core2 itself, the two are entirely synonymous.

----------

## d2_racing

I recommend this :

```

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

CHOST="x86_64-pc-linux-gnu"

CXXFLAGS="${CFLAGS}"

```

----------

## d2_racing

Try this and see :

```

# gcc -Q --help=target -march=native  > /tmp/gccoptions.native

# gcc -Q --help=target -march=core2   > /tmp/gccoptions.plain

# diff /tmp/gccoptions.*

```

You will notice that native enable extra cflags by default.

----------

## erik258

Interesting!  I stand corrected.  

Do you know how to make gcc give out a list of supported -march  settings by chance?

----------

