patches/gcc/4.4.6/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
parent 2149 98b7806295cc
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@2149
     1
By Lennert Buytenhek <buytenh@wantstofly.org>
yann@2149
     2
Adds support for arm*b-linux* big-endian ARM targets
yann@2149
     3
yann@2149
     4
See http://gcc.gnu.org/PR16350
yann@2149
     5
yann@2149
     6
diff -durN gcc-4.4.5.orig/gcc/config/arm/linux-elf.h gcc-4.4.5/gcc/config/arm/linux-elf.h
yann@2149
     7
--- gcc-4.4.5.orig/gcc/config/arm/linux-elf.h	2009-02-20 16:20:38.000000000 +0100
yann@2149
     8
+++ gcc-4.4.5/gcc/config/arm/linux-elf.h	2010-10-09 23:13:21.000000000 +0200
yann@2149
     9
@@ -51,7 +51,7 @@
yann@2149
    10
 
yann@2149
    11
 #undef  MULTILIB_DEFAULTS
yann@2149
    12
 #define MULTILIB_DEFAULTS \
yann@2149
    13
-	{ "marm", "mlittle-endian", "mhard-float", "mno-thumb-interwork" }
yann@2149
    14
+	{ "marm", TARGET_ENDIAN_OPTION, "mhard-float", "mno-thumb-interwork" }
yann@2149
    15
 
yann@2149
    16
 /* Now we define the strings used to build the spec file.  */
yann@2149
    17
 #undef  LIB_SPEC
yann@2149
    18
diff -durN gcc-4.4.5.orig/gcc/config.gcc gcc-4.4.5/gcc/config.gcc
yann@2149
    19
--- gcc-4.4.5.orig/gcc/config.gcc	2010-10-09 23:09:53.000000000 +0200
yann@2149
    20
+++ gcc-4.4.5/gcc/config.gcc	2010-10-09 23:13:21.000000000 +0200
yann@2149
    21
@@ -739,6 +739,11 @@
yann@2149
    22
 	tm_file="dbxelf.h elfos.h arm/unknown-elf.h arm/elf.h arm/linux-gas.h arm/uclinux-elf.h"
yann@2149
    23
 	tmake_file="arm/t-arm arm/t-arm-elf"
yann@2149
    24
 	case ${target} in
yann@2149
    25
+	arm*b-*)
yann@2149
    26
+		tm_defines="${tm_defines} TARGET_BIG_ENDIAN_DEFAULT=1"
yann@2149
    27
+		;;
yann@2149
    28
+	esac
yann@2149
    29
+	case ${target} in
yann@2149
    30
 	arm*-*-uclinux*eabi)
yann@2149
    31
 	    tm_file="$tm_file arm/bpabi.h arm/uclinux-eabi.h"
yann@2149
    32
 	    tmake_file="$tmake_file arm/t-bpabi"