OSDN Git Service

unwind: use a more portable endianness check in EHABI
authorSaleem Abdulrasool <compnerd@compnerd.org>
Fri, 29 May 2020 15:25:35 +0000 (08:25 -0700)
committerSaleem Abdulrasool <compnerd@compnerd.org>
Fri, 29 May 2020 15:28:37 +0000 (08:28 -0700)
commit68c50708d1f2b9aee3f10ec710df0b1387f701e5
tree0cf43863261b17f77480554ce33aeb0ad710cb2f
parent747c574b94595c6209185c87e79f51bff46fd4d8
unwind: use a more portable endianness check in EHABI

The ARM specific code was trying to determine endianness using the
`__LITTLE_ENDIAN__` macro which is not guaranteed to be defined.
When not defined, it makes libunwind to build the big-endian code even
when the compiler builds for a little-endian target.

This change allows building libunwind with the `musl-gcc` toolchain
which does not define `__LITTLE_ENDIAN__`.  Use `__BYTE_ORDER__`
instead.

Patch by Idan Freiberg!
libunwind/src/Unwind-EHABI.cpp