I don't think that this is correct. This is testing the endianness of the host architecture of the compiler, not the endianness of the target that we're compiling for.