Robert P. J. DAY says:
According to Mike Frysinger, this patch was removed from Gentoo in the
2.3.x series and didn't seem to cause any adverse effects. So toss it
from the patch directories for glibc 2.5 and up.
1 By Lennert Buytenhek <buytenh@wantstofly.org>
2 Adds support for arm*b-linux* big-endian ARM targets
4 Fixes following build error for big-endian ARM targets:
6 armeb-unknown-linux-gnu/gcc-4.0.0-20050410-glibc-2.3.4/bin/../lib/gcc/armeb-unknown-linux-gnu/4.0.0/../../../../armeb-unknown-linux-gnu/bin/ld: unrecognised emulation mode: armelf_linux
7 Supported emulations: armelfb_linux armelfb
8 collect2: ld returned 1 exit status
9 make[2]: *** [crosstool-0.32/build/armeb-unknown-linux-gnu/gcc-4.0.0-20050410-glibc-2.3.4/build-glibc/csu/crt1.o] Error 1
10 make[2]: Leaving directory `crosstool-0.32/build/armeb-unknown-linux-gnu/gcc-4.0.0-20050410-glibc-2.3.4/glibc-2.3.4/csu'
11 make[1]: *** [csu/subdir_lib] Error 2
12 make[1]: Leaving directory `crosstool-0.32/build/armeb-unknown-linux-gnu/gcc-4.0.0-20050410-glibc-2.3.4/glibc-2.3.4'
13 make: *** [lib] Error 2
16 See http://gcc.gnu.org/PR16350
18 --- gcc-4.0-20050305/gcc/config/arm/linux-elf.h.orig 2005-03-23 18:44:54.822707377 +0100
19 +++ gcc-4.0-20050305/gcc/config/arm/linux-elf.h 2005-03-23 18:46:18.228560206 +0100
21 /* Do not assume anything about header files. */
22 #define NO_IMPLICIT_EXTERN_C
25 + * 'config.gcc' defines TARGET_BIG_ENDIAN_DEFAULT as 1 for
26 + * arm*b-*-linux* (big endian) configurations.
28 +#if TARGET_BIG_ENDIAN_DEFAULT
29 +#define TARGET_ENDIAN_DEFAULT ARM_FLAG_BIG_END
30 +#define TARGET_ENDIAN_OPTION "mbig-endian"
31 +#define TARGET_LINKER_EMULATION "armelfb_linux"
33 +#define TARGET_ENDIAN_DEFAULT 0
34 +#define TARGET_ENDIAN_OPTION "mlittle-endian"
35 +#define TARGET_LINKER_EMULATION "armelf_linux"
38 #undef TARGET_DEFAULT_FLOAT_ABI
39 #define TARGET_DEFAULT_FLOAT_ABI ARM_FLOAT_ABI_HARD
42 -#define TARGET_DEFAULT (0)
43 +#define TARGET_DEFAULT (TARGET_ENDIAN_DEFAULT)
45 #define SUBTARGET_CPU_DEFAULT TARGET_CPU_arm6
47 -#define SUBTARGET_EXTRA_LINK_SPEC " -m armelf_linux -p"
48 +#define SUBTARGET_EXTRA_LINK_SPEC " -m " TARGET_LINKER_EMULATION " -p"
50 #undef MULTILIB_DEFAULTS
51 #define MULTILIB_DEFAULTS \
52 - { "marm", "mlittle-endian", "mhard-float", "mno-thumb-interwork" }
53 + { "marm", TARGET_ENDIAN_OPTION, "mhard-float", "mno-thumb-interwork" }
55 /* The GNU C++ standard library requires that these macros be defined. */
56 #undef CPLUSPLUS_CPP_SPEC
58 %{rdynamic:-export-dynamic} \
59 %{!dynamic-linker:-dynamic-linker /lib/ld-linux.so.2} \
61 - %{mbig-endian:-EB}" \
62 + %{mbig-endian:-EB} %{mlittle-endian:-EL}" \
63 SUBTARGET_EXTRA_LINK_SPEC
65 #define TARGET_OS_CPP_BUILTINS() \
66 --- gcc-4.0-20050305/gcc/config.gcc.orig 2005-03-23 18:46:23.318105335 +0100
67 +++ gcc-4.0-20050305/gcc/config.gcc 2005-03-23 18:47:41.592546386 +0100
70 arm*-*-linux*) # ARM GNU/Linux with ELF
71 tm_file="dbxelf.h elfos.h linux.h arm/elf.h arm/linux-gas.h arm/linux-elf.h arm/aout.h arm/arm.h"
74 + tm_defines="${tm_defines} TARGET_BIG_ENDIAN_DEFAULT=1"
77 tmake_file="${tmake_file} arm/t-arm arm/t-linux"
78 extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"