a gcc problem

Andrea 'Fyre Wyzard' Bocci fwyzard@inwind.it
Tue Dec 11 16:57:00 GMT 2001


At 10.59 10/12/2001 (GMT +0800), kkkong wrote:
>why a c program need gcc recompilation in different linux machines?
>can we compile once and just copy the output file to run in other
>machines? thanks for your help.

It depends.
You can run in this sort of problems if you:
* have diffrent architectures (eg. linux on alpha and linux on i386).  I 
don't think you can get around this one :-(
* have different libraries / versions in the different systems. Maybe you 
can solve this linking statically rather than dinamically, or updating all 
systems to a common library version.
* use optimizations specific to a particular processor (like -march=i686). 
Just don't use this. (You CAN use -m686, I believe).
* other issues ?

HTH
fwyzard



More information about the Gcc mailing list