patches/gcc/4.4.4/360-arm-bigendian.patch
author "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
Fri Oct 08 23:37:12 2010 +0200 (2010-10-08)
branch1.8
changeset 2150 f97a8ad2b172
permissions -rw-r--r--
cc/gcc: fix C++ headers location

In case we build the C++ compiler, we have to tell gcc where to put the C++
headers, or else it will try to # put it in prefix/tuple/include, which we
make a symlink to sysroot/usr/include during the build, and that we delete
(the symlink!) after the build, but gcc will not look in sysroot/usr/inlcude
for C++ headers by default.

Implements a fix suggested by: Bryan Hundven <bryanhundven@gmail.com>

Reported-by: Anthony Foiani <anthony.foiani@gmail.com>
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
(transplanted from a0924619112015bdaa81a0a2313d21ef38607bc2)
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"