I thought I was stymied by not having any big-endian hosts where I could test code that appeared to have big-endian limitations... turns out there's a way to do it on Intel hosts, almost transparently! Running a MIPS emulator... the easy way... % sudo apt-get install gcc-multilib-mips-linux-gnu gcc-mips-linux-gnu qemu-user % cat > test.c < #include #include #include #if CHAR_BIT != 8 #error "Unsupported char size for detecting endianness" #endif int main (void) { short int word = 0x0001; char *byte = (char *) &word; if (byte[0]) printf("little endian"); else printf("big endian"); return 0; } EOD % mips-linux-gnu-gcc test.c -o test -static % ./test big endian % cc -o itest test.c % ./itest little endian PS I also installed a sparc cross-compiler: gtoal@linux:~/mips$ sparc64-linux-gnu-gcc test.c -o stest -static gtoal@linux:~/mips$ ./stest big endian gtoal@linux:~/mips$ sparc64-linux-gnu-gcc -m32 test.c -o stest -static gtoal@linux:~/mips$ ./stest big endian