On Thu, Jan 03, 2013 at 04:33:03PM +0100, Thomas Petazzoni wrote:
> AArch64 is the new 64 bits architecture from ARM, for which a few
> definitions are needed in the X.org server to make it build properly.
> 
> Like for the ARM 32 bits architecture, we for now assume that AArch64
> will be used in Little Endian mode for Linux.

Is there a reason for doing so? It should be possible to get this
information from predefined preprocessor macros:

        $ arm-unknown-linux-gnueabi-gcc -mlittle-endian -dM -E - < /dev/null | 
grep -i arm
        #define __ARMEL__ 1
        #define __ARM_ARCH_5T__ 1
        #define __ARM_PCS 1
        #define __arm__ 1
        #define __ARM_EABI__ 1

        $ arm-unknown-linux-gnueabi-gcc -mbig-endian -dM -E - < /dev/null | 
grep -i arm
        #define __ARM_ARCH_5T__ 1
        #define __ARMEB__ 1
        #define __ARM_PCS 1
        #define __arm__ 1
        #define __ARM_EABI__ 1

So it should be possible to make the byte order conditional on __ARMEL__
and __ARMEB__ respectively. Alternatively there is __BYTE_ORDER__ which
is defined to __ORDER_LITTLE_ENDIAN__ and __ORDER_BIG_ENDIAN__ for
-mlittle-endian and -mbig-endian respectively.

Thierry

Attachment: pgpnMTQZWUE9a.pgp
Description: PGP signature

_______________________________________________
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel

Reply via email to