compiling code for different machines

Andrew Haley aph@redhat.com
Thu Oct 12 10:52:00 GMT 2006


Brian Dessent writes:
 > Brian Dessent wrote:
 > 
 > > > I want to create binarys on this systems that I can use on
 > > > all boxes. So i tried to compile my gcc on my i686 machine
 > > > using
 > 
 > Upon re-reading your question, I might have misunderstood.
 > 
 > If you are asking about recompiling gcc, then that is not necessary at
 > all.  Gcc has but a single x86 backend, and it can generate code for the
 > entire spectrum of x86 -march options listed in the manual.  So there is
 > no need to rebuild gcc to generate 486 code.  Just compile your software
 > with your normal gcc with -march=486.

The other question is the arch used to compile libgcc.  I don't have a
32-bit system here, but it might be worth checking that libgcc is
really compiled with the right arch.

Andrew.



More information about the Gcc-help mailing list