1

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 ).

1

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 – user2485710 Aug 15 '13 at 19:33
  • I probably haven't understood your question then. Could you describe how you use the prefix exactly? – Frederik Deweerdt Aug 15 '13 at 23:54
2

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 ? – user2485710 Aug 18 '13 at 11:05
  • the -march didn't solved? edit your question and post the log with the missing headers – Alex Aug 18 '13 at 11:10
  • That's a nice explanation stackoverflow.com/a/11739573/2498790 – Alex Aug 18 '13 at 11:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.