Cross-Compiling Help

Kerr Shannon-SKERR1 shannon.kerr@motorola.com
Thu Dec 19 08:51:00 GMT 2002


Hello,

Does anyone know if we can expect a cross-compiled object to be equivalent
to a natively compiled object when the cross-compiler was configured with
GCC-3.2 using the headers and libraries from the native machines GCC-3.2?
The host for the cross-compiler is a SunOS 5.6 machine.  The target (native)
is an i686 Red Hat 7.3 Linux box.

The configuration, source, headers and libraries match, but the final
stripped binaries are about 500 bytes different.  We used the -static on the
natively compiled object so the objects should have compared the same, but
they are slightly different.

Should we expect to get objects that are binarily equivalent?  Is it
possible?  We've heard it's been done with some off the shelf compilers, but
we've never tried with GCC.

We need to prove that cross-compiling is just as good as compiling on the
native machine so we don't have to purchase a bunch of new machines to build
on and support.  We have a nice SunOS build pool of machines and want to
cross-compile there for our target machine.

Any documents or studies done in this area that anyone knows of would be
great.  Any help in getting our compilers to produce equivalent binaries
would be great also.

Thanks,

Mr. Shannon Kerr



More information about the Gcc-help mailing list