On 15/02/13 18:20, Seth LaForge wrote:
Currently, for arm-* archs, TARGET_BIG_ENDIAN_DEFAULT is only set in the case branch for arm*-*-linux-*, not for other arm architectures. We're compiling for the TI TMS570, which is a big-endian processor, with target set to armeb-unknown-eabi. The following patch moves the big-endian check out of the big architecture case, so that TARGET_BIG_ENDIAN_DEFAULT is consistently set for any armeb-*-* target.We've been using this with good results for over a year at Google on TMS570 processors. This fixes bug 52187 - armeb-unknown-eabi not recognized as big-endian. Seth LaForge gcc/ * config.gcc: Add TARGET_BIG_ENDIAN_DEFAULT=1 for all arm*b archs. diff -u -r gcc-4.8-20130210/gcc/config.gcc gcc-4.8-20130210.new/gcc/config.gcc --- gcc-4.8-20130210/gcc/config.gcc 2013-02-08 08:02:47.000000000 -0800 +++ gcc-4.8-20130210.new/gcc/config.gcc 2013-02-14 16:37:14.282107219 -0800 @@ -809,6 +809,13 @@ ;; esac +# Handle big-endian ARM architectures. +case ${target} in +arm*b-*-*) + tm_defines="${tm_defines} TARGET_BIG_ENDIAN_DEFAULT=1" + ;;
Not ok. This would mismatch on arm-blob-linux-gnueabi and cause it to be treated as big-endian. R.
