Cross compiling compiler
Posted Apr 9, 2004 6:29 UTC (Fri) by
pynm0001 (guest, #18379)
In reply to:
Cross compiling compiler by libra
Parent article:
Green Hills Software on free software in the military
I'm not sure exactly what you mean, so I'm going to give an example,
and you can tell me whether it's right or wrong.
You're saying that if you have (say) Solaris CC on Pentium compiling
for Sparc, and gcc on PowerPC compiling for Sparc, that the resulting
object code for Sparc should be identical on both machines?
The answer would be no, unfortunately, unless a fluke occurred. If
both compilers are good, they will produce equivalent code, but
the code will almost certainly not be byte-for-byte equal.
However, even if the compilers produce byte-for-byte identical code,
that doesn't mean that secret code in a compiler is impossible, because I
could go and write a compiler later that adds secret code. The problem
with your logic is that producing identical output for two compilers
doesn't imply that all compilers on all platforms are
either all corrupt or all clean.
(
Log in to post comments)