Skip to content

Extend detection of little-endianness#138

Merged
gafferongames merged 1 commit intomas-bandwidth:mainfrom
mkoncek:main
Aug 13, 2025
Merged

Extend detection of little-endianness#138
gafferongames merged 1 commit intomas-bandwidth:mainfrom
mkoncek:main

Conversation

@mkoncek
Copy link
Contributor

@mkoncek mkoncek commented Aug 12, 2025

I attempted a build on the ppc64le architecture and the the tests failed because the macro machinery evaluated that it was a big endian architecture.
For your information, these the some interesting macros defined on that architecture:

<mock-chroot> sh-5.3# gcc -dM -E -mcpu=powerpc64le - < /dev/null | grep --ignore-case 'ppc'
#define _ARCH_PPCGR 1
#define __PPC64__ 1
#define _ARCH_PPCSQ 1
#define __PPC__ 1
#define _ARCH_PPC 1
#define _ARCH_PPC64 1

<mock-chroot> sh-5.3# gcc -dM -E -mcpu=powerpc64le - < /dev/null | grep --ignore-case 'endian'
#define __ORDER_LITTLE_ENDIAN__ 1234
#define _LITTLE_ENDIAN 1
#define __FLOAT_WORD_ORDER__ __ORDER_LITTLE_ENDIAN__
#define __ORDER_PDP_ENDIAN__ 3412
#define __LITTLE_ENDIAN__ 1
#define __ORDER_BIG_ENDIAN__ 4321
#define __BYTE_ORDER__ __ORDER_LITTLE_ENDIAN__
#define __VEC_ELEMENT_REG_ORDER__ __ORDER_LITTLE_ENDIAN__
@gafferongames gafferongames merged commit a737a12 into mas-bandwidth:main Aug 13, 2025
8 checks passed
@gafferongames
Copy link
Contributor

Thank you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants