# Cflags for Athlon 64 vs Athlon XP

## ferg

Hi all,

I'm trying to rule out an crash problem I'm seeing whenever I try to play Matroska/H264 video on my Mythtv box.  It's not 100% reproducible and so I'm trying to rule out hardware first as that seems the most likely cause.  However, there's something that I've just noticed that I want to clarify about the Cflags for this machine. 

It's an Athlon 64 3200+running on an Asus K8N with the Nvidia3 chipset (socket754). When I originally installed Gentoo on this machine I was using a Sempron (albeit with the 64bit extensions), and I used "Athlon XP for the Arch type:

```
CFLAGS="-O2 -march=athlon-xp -pipe -fomit-frame-pointer"

#CFLAGS="-O2 -march=athlon-xp -pipe  -fomit-frame-pointer"

CHOST="i686-pc-linux-gnu"

CXXFLAGS="${CFLAGS}"

```

However, according to the Safe CFlags site I should be using simply "Athlon"

http://gentoo-wiki.com/Safe_Cflags#Athlon_64_.28AMD.29

Now my assumption so far has been that if you are using a CPU more recent than a predecessor (in the same arch) then using an earlier Cflag would be OK.  Am I correct in this assumption? What should I be using for 32bit Gentoo on this machine?

```
processor       : 0

vendor_id       : AuthenticAMD

cpu family      : 15

model           : 4

model name      : AMD Athlon(tm) 64 Processor 3200+

stepping        : 8

cpu MHz         : 2009.784

cache size      : 1024 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 vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 syscall nx mmxext lm 3dnowext 3dnow ts fid vid ttp

bogomips        : 4022.00

clflush size    : 64

```

Cheers

Ferg

----------

## Sadako

I'd recommend the following, which I've used on 32-bit installations on my athlon64 in the past;

```
CFLAGS="-O2 -march=athlon64 -fomit-frame-pointer -pipe"
```

----------

## ferg

Hi,

thanks for replying.  I did not know about the Athlon64 flag.  I'll give it a go and report back.

Cheers

Ferg

----------

## ferg

Well I tried changing and recompiling Firefox and Mplayer (neither used on my Mythtv box, but both are pernickety!).  Both seem to work fine with Athlon64.  So nice one!

Cheers

Ferg

----------

