MIPS cross-compilers on Solaris and Linux hosts generate slightly different code

Barry Wealand barry.wealand@lmco.com
Fri Jan 13 01:09:00 GMT 2006

Hello -

We're using GCC 4.0.0, with binutils 2.15, both configured and built for 
a mips-elf target, and hosted on both Solaris and Linux host machines.  
All tools are configured and built identically on both hosts.  I then 
use the tools to build and install newlib-1.13.0, also configured an 
built identically on both hosts.  And yet the generated (MIPS) libraries 
have subtle differences.  For example, I notice different register usage 
and instruction sequencing in the code generated for the _calloc_r 
newlib function.  I suspect that both generated sequences are correct, 
but I have this intuitive expectation that they should be identical (for 
some reason).  Am I wrong?

I noticed just now that the native gcc's, used to build the 
cross-toolchains, are version 3.2.2 on the Solaris machine and version 
3.2 on the Linux machine.  Does this make a difference?


Barry Wealand

More information about the Gcc-help mailing list