FROM : Bill Northcott
DATE : Thu Jan 30 18:47:20 2003
> From: fernand reynaud <<email_removed>>
> Subject: gcc and little/big endian
> To: <email_removed>
> Hello,
> According to what I'v read, the PowerPC is supposed to
> be able to handle both little and big endian data
> formats.
> gcc defines -mlittle and -mbig to specify the desired
> mode.
> However apple's version of gcc does not seem to
> recognize these options.
> Has anyone managed to compile in little endian on the
> mac (I'd like to be able to natively treat
> little-endian network packets without going through
> the hasle of converting every second field...)?
AFAIK PowerPC Darwin is a big endian OS. Any code compiled for it will be
big endian. You would need to target some a small endian PowerPC OS. I
am not sure there is one.
You could of course use the GNU gcc compiler on MacOS X, if it does what
you want.
I am fascinated about why you are trying to do this.
Bill Northcott
DATE : Thu Jan 30 18:47:20 2003
> From: fernand reynaud <<email_removed>>
> Subject: gcc and little/big endian
> To: <email_removed>
> Hello,
> According to what I'v read, the PowerPC is supposed to
> be able to handle both little and big endian data
> formats.
> gcc defines -mlittle and -mbig to specify the desired
> mode.
> However apple's version of gcc does not seem to
> recognize these options.
> Has anyone managed to compile in little endian on the
> mac (I'd like to be able to natively treat
> little-endian network packets without going through
> the hasle of converting every second field...)?
AFAIK PowerPC Darwin is a big endian OS. Any code compiled for it will be
big endian. You would need to target some a small endian PowerPC OS. I
am not sure there is one.
You could of course use the GNU gcc compiler on MacOS X, if it does what
you want.
I am fascinated about why you are trying to do this.
Bill Northcott
| Related mails | Author | Date |
|---|---|---|
| fernand reynaud | Jan 30, 06:20 | |
| Greg Parker | Jan 30, 12:39 | |
| Timothy J. Wood | Jan 30, 13:47 | |
| Bill Northcott | Jan 30, 18:47 |






Cocoa mail archive

