patches/gcc/4.4.5/360-arm-bigendian.patch
author "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
Tue Dec 13 23:32:39 2011 +0100 (2011-12-13)
branch1.13
changeset 2847 c0bf2319af08
permissions -rw-r--r--
scripts: fix dumping execution backtrace

Dumping the backtrace has been broken since changeset #652e56d6d35a:
scripts: execute each steps in a subshell

We can spawn sub-sub-shells in some cases.

The way the fault handler works is to dump the backtrace, but to avoid
printing it once for every sub-shell (which could get quite confusing),
it simply exits when it detects that it is being run in a sub-shell,
leaving to the top-level shell the work to dump the backtrace.

Because each step is executed in its own sub-shell, the variable arrays
that contain the step name, the source file and line number, are lost
when exiting the per-step sub-shell.

Hence, the backtrace is currently limited to printing only the top-level
main procedure of the shell.

Fix this thus:
- when dumping the bckatraces for the steps & the functions, remember
it was dumped, and only dump it if it was not already dumped
- at the top-level shell, print the hints

Also, rename the top-level step label.

Reported-by: Benoît Thébaudeau <benoit.thebaudeau@advansee.com>
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
(transplanted from 4193d6e6a17430a177fa88c287879c2c35e319f3)
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"