RPX Classic/Lite and byte ordering

Brendan J Simon brendan.simon at bigpond.com
Mon Apr 2 21:16:11 EDT 2001


Nope.  A powerpc cross compiler *should* produce *exactly* the same code 
as a naitive compiler.  This assumes you are using exactly the same 
version of gcc, gas and glibc.  Having said that, I just remembered that 
the PowerPC architecture can be big endian or little endian.  There must 
be a configuration option when building the compilers that sets the 
default.  You should be able to specify which you want, either in the 
spec file or on the command line.

I've had a look at my spec file.  Try the -mbig-endian (or -mbig) for 
big endian.  Try -mlittle-endian (or -mlittle) for little endian.  I 
prefer -mbig-endian or -mlittle-endian because they are a lot clearer 
than -mbig or -mlittle.

My spec file has the following:

*multilib_defaults:
mbig mcall-linux

*cpp_endian_default:
%(cpp_endian_big)

*cc1_endian_default:
%(cc1_endian_big_spec)


Regards,
Brendan Simon.



Tim Bowman wrote:

> Would cross-compiling the kernel on an x86 produce different ordering
> than compiling natively on a PowerPC (which is how I am building it)? 
> Maybe I need to build it on an x86?





To unsubscribe, send "unsubscribe mtd" to majordomo at infradead.org



More information about the linux-mtd mailing list