# VIA Nehemiah C3, Best gcc compile flags?

## cpdsaorg

Anyone know what would be best for my cpu?

```
 # cat /proc/cpuinfo

processor       : 0

vendor_id       : CentaurHauls

cpu family      : 6

model           : 9

model name      : VIA Nehemiah

stepping        : 4

cpu MHz         : 999.973

cache size      : 64 KB

fdiv_bug        : no

hlt_bug         : no

f00f_bug        : no

coma_bug        : no

fpu             : yes

fpu_exception   : yes

cpuid level     : 1

wp              : yes

flags           : fpu de pse tsc msr cx8 mtrr pge cmov mmx fxsr sse rng rng_en

bogomips        : 1974.27

```

Current /etc/make.conf flags:

```
 # cat /etc/make.conf

# 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=i686 -msse -mmmx -mfpmath=sse -Os -pipe -fomit-frame-pointer"

CHOST="i686-pc-linux-gnu"

CXXFLAGS="${CFLAGS}"

PORTDIR_OVERLAY="/usr/local/portage"

ALSA_CARDS="via82xx"

MAKEOPTS="-j2"

#FEATURES="distcc"

USE="-* acl acpi alsa apache2 avi berkdb bitmap-fonts cddb cdparanoia cdr \

     cdrom crypt cups dvd dvdread encode fam flac foomaticdb freefont gd \

     gdbm gif gnome gpm gstreamer gtk gtk2 gtkhtml java jpeg mad mikmod \

     mmx mmx2 mozilla mpeg mysql ncurses nls nptl oggvorbis opengl pam \

     pcmcia pdflib php png pnp ppds python quicktime readline samba sdl \

     slp spell sse ssl svga tcpd tiff truetype unicode usb X xml xml2 xmms \

     xprint xv xvid yahoo zlib"

```

some suggest -O3 others have suggested -Os. I have been happy with -Os so far but should i switch? am i missing anything? thanks in advance...

----------

## fctk

i would remove mmx2 use flag since it doesn't appeare here:

[quote=cpdsaorg]flags           : fpu de pse tsc msr cx8 mtrr pge cmov mmx fxsr sse rng rng_en [/quote]

----------

## cpdsaorg

I inclueded it because mplayer says that my machine supports it...

----------

## MarkG

Does anyone know why  -march=c3-2 fails, this cpu-type exists in the GGG Documentation. 

```
configure:2385: gcc -march=c3-2 -O2 -fomit-frame-pointer -pipe   conftest.c  >&5

cc1: error: bad value (c3-2) for -march= switch

cc1: error: bad value (c3-2) for -mcpu= switch

distcc[7360] ERROR: compile conftest.c on localhost failed

```

It should be the correct cpu type for VIA Nehemiah processors, It's is mentioned on the courville.org GCC Wiki

Mark

----------

## MarkG

 *Quote:*   

> Does anyone know why -march=c3-2 fails

 

If I had read the correct version of the documentation I'd have known, it only appeared in gcc 3.4 and I'm currently building with 3.3.5, Doh!!

MarkG

----------

## someguy

```
CFLAGS="-Os -march=i686 -msse -mmmx -mfpmath=sse -fomit-frame-pointer -pipe"

```

those are mine and this thing is stable as a rock

----------

