刘卓 <lzhskywalker@xxxxxxxxx> writes: > I'm a software engineer working with MIPS CPU -- octeon. I used to > build my projects on my x86 system using a cross-compiled gcc which > was built specifically for octeon platform. Recently, I have figured > out that gcc 4.4.3 starts to support octeon platform by using a normal > x86 gcc with an option "-march=octeon". But it seems not working as I > tried several time. I don't understand this. Octeon is a MIPS processor. You can use a normal x86 gcc to generate MIPS code. > gcc a.c -march=octeon > > a.c: 1: error: bad value (octeon) for –march= switch > > a.c: 1: error: bad value (octeon) for –mtune= switch > > > > It seems the option '-march' and '-mtune' won't work with all MIPS > series platform. But when I tried replace 'octeon' with 'athlon64' or > something else, gcc did it just fine. Right: an x86 gcc will let you generate athlon64 code. It won't let you generate octeon code. For octeon code you need a MIPS cross-compiler. Ian