[libc] Add endianness support

Add endianness detection support. This will be useful to implement `memcmp`.

Differential Revision: https://reviews.llvm.org/D100571

GitOrigin-RevId: 7e075ad0b261236dd0a01f0b5e01f3221b0700d7
5 files changed