On Mon, Jan 16, 2006 at 08:28:01PM +0100, Marcin Dalecki wrote:
> 
> On 2006-01-16, at 19:18, DJ Delorie wrote:
> >
> >A cross compiler and a native compiler targeting the same CPU chip,
> >that's a different story.
> 
> No it isn't. The results should still be the same.

For a native compiler, the bootstrap process guarantees (and even
partially tests) that, regardless of the original compiler, the object
code of generated compiler itself is byte-for-byte identical regardless of
which compiler we started with.  Since the compiler itself is identical,
then of course the results are identical.

For a cross compiler, of course the generated compiler will *not* be
byte-for-byte identical: it will depend on the host as well as the
host compiler.  The results in terms of which instructions the compiler
generates should still be the same, but the fact that there is the
extra dependency on the host and host compiler leaves more room for bugs
to arise.

Reply via email to