patches/gcc/4.4.7/360-arm-bigendian.patch
author Cody Schafer <dev@codyps.com>
Fri May 09 19:13:49 2014 -0700 (2014-05-09)
changeset 3312 4876ff97e039
parent 2406 95e0c248d257
permissions -rw-r--r--
cc/gcc: allow CC_EXTRA_CONFIG_ARRAY on baremetal

The final bare-metal compiler is built using the core backend.
Currently the core uses the CC_CORE_EXTRA_CONFIG_ARRAY variable.

While this works as supposed to, this can leave the user puzzled
in the menuconfig, since all he can see is the core options, not
the final options.

Only show the core options if any of the core passes are needed,
and use the final options in the core-backend if we're issuing
the bare-metal compiler.

Signed-off-by: Cody P Schafer <dev@codyps.com>
[yann.morin.1998@free.fr: hide core options if no core pass needed;
use final option in core backend if issuing the bare-metal compiler]
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Message-Id: <22181e546ba746202489.1399688067@localhost>
Patchwork-Id: 347586
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"