patches/gcc/4.1.1/190-arm-bigendian.patch
author "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
Tue Jan 27 21:37:03 2009 +0000 (2009-01-27)
changeset 1162 31348b787bed
parent 1 eeea35fbf182
permissions -rw-r--r--
Add the latest gcc-4.3.3 with the forward-ported patchset from gcc-4.3.2.

/trunk/patches/gcc/4.3.3/210-noteGNUstack-00.patch | 47 26 21 0 ++++---
/trunk/patches/gcc/4.3.3/270-missing-execinfo_h.patch | 11 8 3 0 +-
/trunk/patches/gcc/4.3.3/260-uclibc-conf-noupstream.patch | 13 9 4 0 +-
/trunk/patches/gcc/4.3.3/220-noteGNUstack-01.patch | 97 51 46 0 +++++++-------
/trunk/patches/gcc/4.3.3/240-pr25343.patch | 11 8 3 0 +-
/trunk/patches/gcc/4.3.3/100-alpha-mieee-default.patch | 17 11 6 0 +-
/trunk/patches/gcc/4.3.3/230-pr34571.patch | 23 8 15 0 +--
/trunk/patches/gcc/4.3.3/350-sh-without-headers.patch | 17 10 7 0 +-
/trunk/patches/gcc/4.3.3/330-unwind-for-uClibc.patch | 19 12 7 0 ++-
/trunk/patches/gcc/4.3.3/190-libstdc++-pic.patch | 17 11 6 0 +-
/trunk/patches/gcc/4.3.3/150-sparc64-bsd.patch | 11 8 3 0 +-
/trunk/patches/gcc/4.3.3/290-index_macro.patch | 17 11 6 0 +-
/trunk/patches/gcc/4.3.3/140-netbsd-symbolic.patch | 11 8 3 0 +-
/trunk/patches/gcc/4.3.3/110-trampolinewarn.patch | 17 11 6 0 +-
/trunk/patches/gcc/4.3.3/160-flatten-switch-stmt-00.patch | 11 8 3 0 +-
/trunk/patches/gcc/4.3.3/280-c99-complex-ugly-hack.patch | 11 8 3 0 +-
/trunk/patches/gcc/4.3.3/300-libmudflap-susv3-legacy.patch | 11 8 3 0 +-
/trunk/patches/gcc/4.3.3/170-libiberty-pic.patch | 11 8 3 0 +-
/trunk/patches/gcc/4.3.3/250-sh-pr24836.patch | 17 11 6 0 +-
/trunk/patches/gcc/4.3.3/120-java-nomulti.patch | 17 11 6 0 +-
/trunk/patches/gcc/4.3.3/320-alpha-signal_h.patch | 14 10 4 0 +-
/trunk/patches/gcc/4.3.3/180-superh-default-multilib.patch | 13 9 4 0 +-
/trunk/patches/gcc/4.3.3/340-make-mno-spe-work-as-expected.patch | 41 23 18 0 +++---
/trunk/patches/gcc/4.3.3/200-pr24170.patch | 23 14 9 0 ++-
/trunk/patches/gcc/4.3.3/310-arm-softfloat.patch | 17 11 6 0 +-
/trunk/patches/gcc/4.3.3/130-cross-compile.patch | 23 14 9 0 ++-
/trunk/config/cc/gcc.in | 7 7 0 0 +
27 files changed, 334 insertions(+), 210 deletions(-)
yann@1
     1
By Lennert Buytenhek <buytenh@wantstofly.org>
yann@1
     2
Adds support for arm*b-linux* big-endian ARM targets
yann@1
     3
yann@1
     4
See http://gcc.gnu.org/PR16350
yann@1
     5
yann@1
     6
--- gcc-4.1.0/gcc/config/arm/linux-elf.h
yann@1
     7
+++ gcc-4.1.0/gcc/config/arm/linux-elf.h
yann@1
     8
@@ -28,19 +28,33 @@
yann@1
     9
 #undef  TARGET_VERSION
yann@1
    10
 #define TARGET_VERSION  fputs (" (ARM GNU/Linux with ELF)", stderr);
yann@1
    11
 
yann@1
    12
+/*
yann@1
    13
+ * 'config.gcc' defines TARGET_BIG_ENDIAN_DEFAULT as 1 for arm*b-*
yann@1
    14
+ * (big endian) configurations.
yann@1
    15
+ */
yann@1
    16
+#if TARGET_BIG_ENDIAN_DEFAULT
yann@1
    17
+#define TARGET_ENDIAN_DEFAULT MASK_BIG_END
yann@1
    18
+#define TARGET_ENDIAN_OPTION "mbig-endian"
yann@1
    19
+#define TARGET_LINKER_EMULATION "armelfb_linux"
yann@1
    20
+#else
yann@1
    21
+#define TARGET_ENDIAN_DEFAULT 0
yann@1
    22
+#define TARGET_ENDIAN_OPTION "mlittle-endian"
yann@1
    23
+#define TARGET_LINKER_EMULATION "armelf_linux"
yann@1
    24
+#endif
yann@1
    25
+
yann@1
    26
 #undef  TARGET_DEFAULT_FLOAT_ABI
yann@1
    27
 #define TARGET_DEFAULT_FLOAT_ABI ARM_FLOAT_ABI_HARD
yann@1
    28
 
yann@1
    29
 #undef  TARGET_DEFAULT
yann@1
    30
-#define TARGET_DEFAULT (0)
yann@1
    31
+#define TARGET_DEFAULT (TARGET_ENDIAN_DEFAULT)
yann@1
    32
 
yann@1
    33
 #define SUBTARGET_CPU_DEFAULT TARGET_CPU_arm6
yann@1
    34
 
yann@1
    35
-#define SUBTARGET_EXTRA_LINK_SPEC " -m armelf_linux -p"
yann@1
    36
+#define SUBTARGET_EXTRA_LINK_SPEC " -m " TARGET_LINKER_EMULATION " -p"
yann@1
    37
 
yann@1
    38
 #undef  MULTILIB_DEFAULTS
yann@1
    39
 #define MULTILIB_DEFAULTS \
yann@1
    40
-	{ "marm", "mlittle-endian", "mhard-float", "mno-thumb-interwork" }
yann@1
    41
+	{ "marm", TARGET_ENDIAN_OPTION, "mhard-float", "mno-thumb-interwork" }
yann@1
    42
 
yann@1
    43
 /* Now we define the strings used to build the spec file.  */
yann@1
    44
 #undef  LIB_SPEC
yann@1
    45
@@ -61,7 +75,7 @@
yann@1
    46
    %{rdynamic:-export-dynamic} \
yann@1
    47
    %{!dynamic-linker:-dynamic-linker " LINUX_TARGET_INTERPRETER "} \
yann@1
    48
    -X \
yann@1
    49
-   %{mbig-endian:-EB}" \
yann@1
    50
+   %{mbig-endian:-EB} %{mlittle-endian:-EL}" \
yann@1
    51
    SUBTARGET_EXTRA_LINK_SPEC
yann@1
    52
 
yann@1
    53
 #undef  LINK_SPEC
yann@1
    54
--- gcc-4.1.0/gcc/config.gcc
yann@1
    55
+++ gcc-4.1.0/gcc/config.gcc
yann@1
    56
@@ -672,6 +672,11 @@
yann@1
    57
 	;;
yann@1
    58
 arm*-*-linux*)			# ARM GNU/Linux with ELF
yann@1
    59
 	tm_file="dbxelf.h elfos.h linux.h arm/elf.h arm/linux-gas.h arm/linux-elf.h" 
yann@1
    60
+	case $target in
yann@1
    61
+	arm*b-*)
yann@1
    62
+		tm_defines="${tm_defines} TARGET_BIG_ENDIAN_DEFAULT=1"
yann@1
    63
+		;;
yann@1
    64
+	esac
yann@1
    65
 	tmake_file="${tmake_file} t-linux arm/t-arm"
yann@1
    66
 	case ${target} in
yann@1
    67
 	arm*-*-linux-gnueabi)