patches/gcc/4.4.7/360-arm-bigendian.patch
author Johannes Stezenbach <js@sig21.net>
Tue Oct 30 00:22:25 2012 +0000 (2012-10-30)
changeset 3097 5c67476c7342
parent 2406 95e0c248d257
permissions -rw-r--r--
scripts/functions: fix endless loop in debug-shell with IO redirection

CT_DEBUG_INTERACTIVE is disabled when stdin, stdout or
stderr are redirected, but the check is only done at
the start of the build and doesn't catch when individual
build commands use redirection. When stdin is redirected
it will cause the debug shell to exit immediately, causing
and endless loop. Thus, save the stdin/our/err file handles
and restore them before invoking the debug shell.

Signed-off-by: Johannes Stezenbach <js@sig21.net>
Message-Id: <20121030102225.GA8303@sig21.net>
Patchwork-Id: 195409
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"