I have a 32 bit x86 machine where Debian is up and running with this properties

  • uname -r is 3.2.0-4-486 and
  • uname -m is i586

in this situation i have to pick the right HOST and TARGET prefix so I will be able to cross compile gcc on another machine for this Debian installation.

I should pick i486 or i586 ? I already tried i686 but apparently it doesn't work at all ( gcc compiles and runs, it's the gcc/g++ compiler that doesn't find the headers on the machine using the i686 prefix ).

2 Answers 2


I believe you don't need to cross compile. You can simply use -march to indicate the cpu-type. See http://gcc.gnu.org/onlinedocs/gcc-4.4.2/gcc/i386-and-x86_002d64-Options.html for the complete list. In your case, -march=i586 should work.

  • thanks, but my question is about deducing the right prefix for the build Aug 15, 2013 at 19:33
  • I probably haven't understood your question then. Could you describe how you use the prefix exactly? Aug 15, 2013 at 23:54

You should not deduce, you must know and choose the one you need, if you needed compatibility with an old 486 or the best performance with your 686.

The missing headers are just a different issue.

  • and how to solve the "missing headers" problem ? Aug 18, 2013 at 11:05
  • the -march didn't solved? edit your question and post the log with the missing headers
    – Alex
    Aug 18, 2013 at 11:10
  • That's a nice explanation stackoverflow.com/a/11739573/2498790
    – Alex
    Aug 18, 2013 at 11:57

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .