patches/gcc/4.4.4/360-arm-bigendian.patch
author "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
Wed May 18 23:00:46 2011 +0200 (2011-05-18)
changeset 2467 200836977ce6
permissions -rw-r--r--
config: rename variables that are arrays

Make it explicit that a variable is an array bu the name of the variable.
It will be used later when .config gets munged to allow both multiple
arguments and arguments with spaces at the same time to be passed from the
configuration down to the build scripts.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
yann@1948
     1
By Lennert Buytenhek <buytenh@wantstofly.org>
yann@1948
     2
Adds support for arm*b-linux* big-endian ARM targets
yann@1948
     3
yann@1948
     4
See http://gcc.gnu.org/PR16350
yann@1948
     5
yann@1948
     6
diff -durN gcc-4.4.4.orig/gcc/config/arm/linux-elf.h gcc-4.4.4/gcc/config/arm/linux-elf.h
yann@1948
     7
--- gcc-4.4.4.orig/gcc/config/arm/linux-elf.h	2009-02-20 16:20:38.000000000 +0100
yann@1948
     8
+++ gcc-4.4.4/gcc/config/arm/linux-elf.h	2010-05-16 19:38:07.000000000 +0200
yann@1948
     9
@@ -51,7 +51,7 @@
yann@1948
    10
 
yann@1948
    11
 #undef  MULTILIB_DEFAULTS
yann@1948
    12
 #define MULTILIB_DEFAULTS \
yann@1948
    13
-	{ "marm", "mlittle-endian", "mhard-float", "mno-thumb-interwork" }
yann@1948
    14
+	{ "marm", TARGET_ENDIAN_OPTION, "mhard-float", "mno-thumb-interwork" }
yann@1948
    15
 
yann@1948
    16
 /* Now we define the strings used to build the spec file.  */
yann@1948
    17
 #undef  LIB_SPEC
yann@1948
    18
diff -durN gcc-4.4.4.orig/gcc/config.gcc gcc-4.4.4/gcc/config.gcc
yann@1948
    19
--- gcc-4.4.4.orig/gcc/config.gcc	2010-05-16 19:36:15.000000000 +0200
yann@1948
    20
+++ gcc-4.4.4/gcc/config.gcc	2010-05-16 19:38:07.000000000 +0200
yann@1948
    21
@@ -733,6 +733,11 @@
yann@1948
    22
 	tm_file="dbxelf.h elfos.h arm/unknown-elf.h arm/elf.h arm/linux-gas.h arm/uclinux-elf.h"
yann@1948
    23
 	tmake_file="arm/t-arm arm/t-arm-elf"
yann@1948
    24
 	case ${target} in
yann@1948
    25
+	arm*b-*)
yann@1948
    26
+		tm_defines="${tm_defines} TARGET_BIG_ENDIAN_DEFAULT=1"
yann@1948
    27
+		;;
yann@1948
    28
+	esac
yann@1948
    29
+	case ${target} in
yann@1948
    30
 	arm*-*-uclinux*eabi)
yann@1948
    31
 	    tm_file="$tm_file arm/bpabi.h arm/uclinux-eabi.h"
yann@1948
    32
 	    tmake_file="$tmake_file arm/t-bpabi"