Hi,
hi,
I would like to use the host endianess (LITTLE or BIG endian) information in my code. Can someone tell me what gcc flags are available for this purpose.
You can have macros available to the user like in the sparc backend where the macros __LITTLE_ENDIAN__ and __BIG_ENDIAN__ are defined for the corresponding options (whether its being used in little or big endian configuration) .However this is at the discretion of the port and not necessarily standard.
I believe that gcc built for for different platforms (linux/solaris/hp etc) will interally have flags that can give this info.
What is the architecture for which you need this ?
Can someone give me the specifics please.
Then maybe we can help :-)
cheers Ramana