[PATCH][aarch64][libstdc++] Use __ARM_BIG_ENDIAN instead of __AARCH64EB__ in opt_random.h

Kyrill Tkachov kyrylo.tkachov@foss.arm.com
Wed Dec 20 10:28:00 GMT 2017

Hi all,

As has been spotted at 
we check the __AARCH64EB__ macro for aarch64 big-endian
detection in config/cpu/aarch64/opt/ext/opt_random.h.
That works just fine with GCC but the standardised ACLE[1] macro
for that purpose is __ARM_BIG_ENDIAN so there is a possibility
that non-GCC compilers that include this header are not aware
of this predefine.

So this patch changes the use of __AARCH64EB__ to
the more portable __ARM_BIG_ENDIAN.

Tested on aarch64-none-elf and aarch64_be-none-elf.

Preapproved by Jeff at 

Committed to trunk.


[1] https://static.docs.arm.com/ihi0053/c/IHI0053C_acle_2_0.pdf

2017-12-20  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>

     * config/cpu/aarch64/opt/ext/opt_random.h (__VEXT): Check
     __ARM_BIG_ENDIAN instead of __AARCH64EB__.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: aarch64-libstdcxx-be.patch
Type: text/x-patch
Size: 779 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/libstdc++/attachments/20171220/4676ca17/attachment.bin>

More information about the Libstdc++ mailing list