cc/gcc: add patch to fix armeb in gcc-4.4
authorJoachim Nilsson <jocke@vmlinux.org>
Wed Jan 06 15:04:38 2010 +0100 (2010-01-06)
changeset 16935cf9544bcea1
parent 1692 068c809cc646
child 1697 68c3ca03e3b9
cc/gcc: add patch to fix armeb in gcc-4.4

On x86, gcc-4.4.x breaks when building for target armeb.
It is still required to configure with: --disable-shared

Note: if building on an x86_64, there is no need to pass --disable-shared
patches/gcc/4.4.0/360-arm-bigendian.patch
patches/gcc/4.4.1/360-arm-bigendian.patch
patches/gcc/4.4.2/360-arm-bigendian.patch
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/patches/gcc/4.4.0/360-arm-bigendian.patch	Wed Jan 06 15:04:38 2010 +0100
     1.3 @@ -0,0 +1,32 @@
     1.4 +By Lennert Buytenhek <buytenh@wantstofly.org>
     1.5 +Adds support for arm*b-linux* big-endian ARM targets
     1.6 +
     1.7 +See http://gcc.gnu.org/PR16350
     1.8 +
     1.9 +--- gcc-4.4.2.orig/gcc/config/arm/linux-elf.h	2009-02-20 16:20:38.000000000 +0100
    1.10 ++++ gcc-4.4.2/gcc/config/arm/linux-elf.h	2009-12-31 14:19:20.000000000 +0100
    1.11 +@@ -51,7 +51,7 @@
    1.12 + 
    1.13 + #undef  MULTILIB_DEFAULTS
    1.14 + #define MULTILIB_DEFAULTS \
    1.15 +-	{ "marm", "mlittle-endian", "mhard-float", "mno-thumb-interwork" }
    1.16 ++	{ "marm", TARGET_ENDIAN_OPTION, "mhard-float", "mno-thumb-interwork" }
    1.17 + 
    1.18 + /* Now we define the strings used to build the spec file.  */
    1.19 + #undef  LIB_SPEC
    1.20 +diff -ru gcc-4.4.2.orig/gcc/config.gcc gcc-4.4.2/gcc/config.gcc
    1.21 +--- gcc-4.4.2.orig/gcc/config.gcc	2009-12-31 14:43:17.000000000 +0100
    1.22 ++++ gcc-4.4.2/gcc/config.gcc	2010-01-05 09:27:42.000000000 +0100
    1.23 +@@ -733,6 +733,11 @@
    1.24 + 	tm_file="dbxelf.h elfos.h arm/unknown-elf.h arm/elf.h arm/linux-gas.h arm/uclinux-elf.h"
    1.25 + 	tmake_file="arm/t-arm arm/t-arm-elf"
    1.26 + 	case ${target} in
    1.27 ++	arm*b-*)
    1.28 ++		tm_defines="${tm_defines} TARGET_BIG_ENDIAN_DEFAULT=1"
    1.29 ++		;;
    1.30 ++	esac
    1.31 ++	case ${target} in
    1.32 + 	arm*-*-uclinux*eabi)
    1.33 + 	    tm_file="$tm_file arm/bpabi.h arm/uclinux-eabi.h"
    1.34 + 	    tmake_file="$tmake_file arm/t-bpabi"
    1.35 +
     2.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     2.2 +++ b/patches/gcc/4.4.1/360-arm-bigendian.patch	Wed Jan 06 15:04:38 2010 +0100
     2.3 @@ -0,0 +1,32 @@
     2.4 +By Lennert Buytenhek <buytenh@wantstofly.org>
     2.5 +Adds support for arm*b-linux* big-endian ARM targets
     2.6 +
     2.7 +See http://gcc.gnu.org/PR16350
     2.8 +
     2.9 +--- gcc-4.4.2.orig/gcc/config/arm/linux-elf.h	2009-02-20 16:20:38.000000000 +0100
    2.10 ++++ gcc-4.4.2/gcc/config/arm/linux-elf.h	2009-12-31 14:19:20.000000000 +0100
    2.11 +@@ -51,7 +51,7 @@
    2.12 + 
    2.13 + #undef  MULTILIB_DEFAULTS
    2.14 + #define MULTILIB_DEFAULTS \
    2.15 +-	{ "marm", "mlittle-endian", "mhard-float", "mno-thumb-interwork" }
    2.16 ++	{ "marm", TARGET_ENDIAN_OPTION, "mhard-float", "mno-thumb-interwork" }
    2.17 + 
    2.18 + /* Now we define the strings used to build the spec file.  */
    2.19 + #undef  LIB_SPEC
    2.20 +diff -ru gcc-4.4.2.orig/gcc/config.gcc gcc-4.4.2/gcc/config.gcc
    2.21 +--- gcc-4.4.2.orig/gcc/config.gcc	2009-12-31 14:43:17.000000000 +0100
    2.22 ++++ gcc-4.4.2/gcc/config.gcc	2010-01-05 09:27:42.000000000 +0100
    2.23 +@@ -733,6 +733,11 @@
    2.24 + 	tm_file="dbxelf.h elfos.h arm/unknown-elf.h arm/elf.h arm/linux-gas.h arm/uclinux-elf.h"
    2.25 + 	tmake_file="arm/t-arm arm/t-arm-elf"
    2.26 + 	case ${target} in
    2.27 ++	arm*b-*)
    2.28 ++		tm_defines="${tm_defines} TARGET_BIG_ENDIAN_DEFAULT=1"
    2.29 ++		;;
    2.30 ++	esac
    2.31 ++	case ${target} in
    2.32 + 	arm*-*-uclinux*eabi)
    2.33 + 	    tm_file="$tm_file arm/bpabi.h arm/uclinux-eabi.h"
    2.34 + 	    tmake_file="$tmake_file arm/t-bpabi"
    2.35 +
     3.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     3.2 +++ b/patches/gcc/4.4.2/360-arm-bigendian.patch	Wed Jan 06 15:04:38 2010 +0100
     3.3 @@ -0,0 +1,32 @@
     3.4 +By Lennert Buytenhek <buytenh@wantstofly.org>
     3.5 +Adds support for arm*b-linux* big-endian ARM targets
     3.6 +
     3.7 +See http://gcc.gnu.org/PR16350
     3.8 +
     3.9 +--- gcc-4.4.2.orig/gcc/config/arm/linux-elf.h	2009-02-20 16:20:38.000000000 +0100
    3.10 ++++ gcc-4.4.2/gcc/config/arm/linux-elf.h	2009-12-31 14:19:20.000000000 +0100
    3.11 +@@ -51,7 +51,7 @@
    3.12 + 
    3.13 + #undef  MULTILIB_DEFAULTS
    3.14 + #define MULTILIB_DEFAULTS \
    3.15 +-	{ "marm", "mlittle-endian", "mhard-float", "mno-thumb-interwork" }
    3.16 ++	{ "marm", TARGET_ENDIAN_OPTION, "mhard-float", "mno-thumb-interwork" }
    3.17 + 
    3.18 + /* Now we define the strings used to build the spec file.  */
    3.19 + #undef  LIB_SPEC
    3.20 +diff -ru gcc-4.4.2.orig/gcc/config.gcc gcc-4.4.2/gcc/config.gcc
    3.21 +--- gcc-4.4.2.orig/gcc/config.gcc	2009-12-31 14:43:17.000000000 +0100
    3.22 ++++ gcc-4.4.2/gcc/config.gcc	2010-01-05 09:27:42.000000000 +0100
    3.23 +@@ -733,6 +733,11 @@
    3.24 + 	tm_file="dbxelf.h elfos.h arm/unknown-elf.h arm/elf.h arm/linux-gas.h arm/uclinux-elf.h"
    3.25 + 	tmake_file="arm/t-arm arm/t-arm-elf"
    3.26 + 	case ${target} in
    3.27 ++	arm*b-*)
    3.28 ++		tm_defines="${tm_defines} TARGET_BIG_ENDIAN_DEFAULT=1"
    3.29 ++		;;
    3.30 ++	esac
    3.31 ++	case ${target} in
    3.32 + 	arm*-*-uclinux*eabi)
    3.33 + 	    tm_file="$tm_file arm/bpabi.h arm/uclinux-eabi.h"
    3.34 + 	    tmake_file="$tmake_file arm/t-bpabi"
    3.35 +