# What flags do you suggest for two CPUs?

## cord

Hello, I have two hosts at LAN. First is:

```
Intel(R) Core(TM) i5-2410M                                                                                                            

CPU_FLAGS_X86="avx mmx mmxext popcnt sse sse2 sse3 sse4_1 sse4_2 ssse3"
```

and the second is:

```
Intel(R) Celeron(R) CPU N3050

CPU_FLAGS_X86="aes mmx mmxext popcnt sse sse2 sse3 sse4_1 sse4_2 ssse3"
```

I want portage to use binary packages from the first host for the second. So I need some "shared" values for CFLAGS and CPU_FLAGS_X86, right?

Which do you suggest?

----------

## Perfect Gentleman

```
CPU_FLAGS_X86="mmx mmxext popcnt sse sse2 sse3 sse4_1 sse4_2 ssse3"
```

----------

## cord

Ok, what about CFLAGS ? I mean '-march'

----------

## Jaglover

```
gcc -march=native -E -v - </dev/null 2>&1 | grep cc1
```

Leave out everything that is not supported by second CPU.

----------

## fedeliallalinea

 *cord wrote:*   

> Ok, what about CFLAGS ?

 

Not sure but I think (never tested)

```
-O2 -pipe
```

 *man gcc wrote:*   

> Where none of -mtune=, -mcpu= or -march= are specified, the code is tuned to perform well across a range of target processors.

 

----------

