In the configure script "gcc/config.gcc", around line 733: arm*-*-linux*) # ARM GNU/Linux with ELF tm_file="dbxelf.h elfos.h linux.h glibc-stdint.h arm/elf.h arm/linux-gas.h arm/linux-elf.h" case $target in arm*b-*) tm_defines="${tm_defines} TARGET_BIG_ENDIAN_DEFAULT=1" ;; esac tmake_file="${tmake_file} t-linux arm/t-arm" If $target have the form "arm-tab-linux-gnu", this script will enable big-endian defaults. But the resulting gcc will, by default, generate little-endian object files, and pass some big-endian argument to linker. This might be a common problem in scripts. Should the use of "*" be restricted, or warned in some important scripts?
It should use $target_cpu.
Confirmed.
Author: rearnsha Date: Tue Feb 28 15:26:02 2012 New Revision: 184626 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=184626 Log: PR target/49448 * config.gcc (arm*-*-linux*): Use an unambiguous pattern for detecting big-endian triplets. Modified: trunk/gcc/ChangeLog trunk/gcc/config.gcc
Author: rearnsha Date: Thu Apr 12 14:11:33 2012 New Revision: 186379 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=186379 Log: PR target/49448 * config.gcc (arm*-*-linux*): Use an unambiguous pattern for detecting big-endian triplets. Modified: branches/gcc-4_6-branch/gcc/ChangeLog branches/gcc-4_6-branch/gcc/config.gcc
Author: rearnsha Date: Thu Apr 12 14:11:49 2012 New Revision: 186380 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=186380 Log: PR target/49448 * config.gcc (arm*-*-linux*): Use an unambiguous pattern for detecting big-endian triplets. Modified: branches/gcc-4_5-branch/gcc/ChangeLog branches/gcc-4_5-branch/gcc/config.gcc
Fixed in 4.5.4, 4.6.4 4.7 and trunk