patches/gcc/4.2.2/240-arm-bigendian.patch
author "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
Wed May 27 21:16:01 2009 +0000 (2009-05-27)
branchgcc-4.4
changeset 1393 b432bd628b10
parent 431 8bde4c6ea47a
permissions -rw-r--r--
/devel/gcc-4.4:
- add gcc-4.4.0 patches, vampirised from the Gentoo patchset
- gcc-4.4.0 auto-selects and uses appropriate companion linraries

-------- diffstat follows --------
/devel/gcc-4.4/scripts/build/cc/gcc.sh | 20 18 2 0 +
/devel/gcc-4.4/patches/gcc/4.4.0/280-freebsd.patch | 188 188 0 0 ++++++++++
/devel/gcc-4.4/patches/gcc/4.4.0/140-default-format-security.patch | 98 98 0 0 +++++
/devel/gcc-4.4/patches/gcc/4.4.0/290-freebsd.patch | 128 128 0 0 +++++++
/devel/gcc-4.4/patches/gcc/4.4.0/310-uclibc-conf.patch | 70 70 0 0 ++++
/devel/gcc-4.4/patches/gcc/4.4.0/240-libstdc++-pic.patch | 106 106 0 0 ++++++
/devel/gcc-4.4/patches/gcc/4.4.0/260-sh-libgcc-stacks.patch | 50 50 0 0 +++
/devel/gcc-4.4/patches/gcc/4.4.0/100-alpha-mieee-default.patch | 48 48 0 0 +++
/devel/gcc-4.4/patches/gcc/4.4.0/180-libgomp-no-werror.patch | 24 24 0 0 +
/devel/gcc-4.4/patches/gcc/4.4.0/170-sparc64-bsd.patch | 58 58 0 0 +++
/devel/gcc-4.4/patches/gcc/4.4.0/200-libiberty.h-asprintf.patch | 30 30 0 0 ++
/devel/gcc-4.4/patches/gcc/4.4.0/220-libiberty-pic.patch | 22 22 0 0 +
/devel/gcc-4.4/patches/gcc/4.4.0/110-trampolinewarn.patch | 54 54 0 0 +++
/devel/gcc-4.4/patches/gcc/4.4.0/160-netbsd-symbolic.patch | 22 22 0 0 +
/devel/gcc-4.4/patches/gcc/4.4.0/190-flatten-switch-stmt-00.patch | 48 48 0 0 +++
/devel/gcc-4.4/patches/gcc/4.4.0/150-default-fortify-source.patch | 52 52 0 0 +++
/devel/gcc-4.4/patches/gcc/4.4.0/340-libmudflap-susv3-legacy.patch | 96 96 0 0 +++++
/devel/gcc-4.4/patches/gcc/4.4.0/120-java-nomulti.patch | 92 92 0 0 +++++
/devel/gcc-4.4/patches/gcc/4.4.0/270-sh-pr24836.patch | 48 48 0 0 +++
/devel/gcc-4.4/patches/gcc/4.4.0/330-c99-snprintf.patch | 24 24 0 0 +
/devel/gcc-4.4/patches/gcc/4.4.0/230-superh-default-multilib.patch | 24 24 0 0 +
/devel/gcc-4.4/patches/gcc/4.4.0/250-ia64-noteGNUstack.patch | 158 158 0 0 +++++++++
/devel/gcc-4.4/patches/gcc/4.4.0/300-pr40105.patch | 360 360 0 0 ++++++++++++++++++++
/devel/gcc-4.4/patches/gcc/4.4.0/210-arm-unbreak-armv4t.patch | 24 24 0 0 +
/devel/gcc-4.4/patches/gcc/4.4.0/130-cross-compile.patch | 78 78 0 0 ++++
/devel/gcc-4.4/patches/gcc/4.4.0/320-missing-execinfo_h.patch | 24 24 0 0 +
/devel/gcc-4.4/config/cc/gcc.in | 1 1 0 0 +
27 files changed, 1945 insertions(+), 2 deletions(-)
yann@313
     1
diff -durN gcc-4.2.1.orig/gcc/config/arm/linux-elf.h gcc-4.2.1/gcc/config/arm/linux-elf.h
yann@313
     2
--- gcc-4.2.1.orig/gcc/config/arm/linux-elf.h	2006-02-17 00:29:10.000000000 +0100
yann@313
     3
+++ gcc-4.2.1/gcc/config/arm/linux-elf.h	2007-08-03 20:36:43.000000000 +0200
yann@313
     4
@@ -28,19 +28,33 @@
yann@313
     5
 #undef  TARGET_VERSION
yann@313
     6
 #define TARGET_VERSION  fputs (" (ARM GNU/Linux with ELF)", stderr);
yann@313
     7
 
yann@313
     8
+/*
yann@313
     9
+ * 'config.gcc' defines TARGET_BIG_ENDIAN_DEFAULT as 1 for arm*b-*
yann@313
    10
+ * (big endian) configurations.
yann@313
    11
+ */
yann@313
    12
+#if TARGET_BIG_ENDIAN_DEFAULT
yann@313
    13
+#define TARGET_ENDIAN_DEFAULT MASK_BIG_END
yann@313
    14
+#define TARGET_ENDIAN_OPTION "mbig-endian"
yann@313
    15
+#define TARGET_LINKER_EMULATION "armelfb_linux"
yann@313
    16
+#else
yann@313
    17
+#define TARGET_ENDIAN_DEFAULT 0
yann@313
    18
+#define TARGET_ENDIAN_OPTION "mlittle-endian"
yann@313
    19
+#define TARGET_LINKER_EMULATION "armelf_linux"
yann@313
    20
+#endif
yann@313
    21
+
yann@313
    22
 #undef  TARGET_DEFAULT_FLOAT_ABI
yann@313
    23
 #define TARGET_DEFAULT_FLOAT_ABI ARM_FLOAT_ABI_HARD
yann@313
    24
 
yann@313
    25
 #undef  TARGET_DEFAULT
yann@313
    26
-#define TARGET_DEFAULT (0)
yann@313
    27
+#define TARGET_DEFAULT (TARGET_ENDIAN_DEFAULT)
yann@313
    28
 
yann@313
    29
 #define SUBTARGET_CPU_DEFAULT TARGET_CPU_arm6
yann@313
    30
 
yann@313
    31
-#define SUBTARGET_EXTRA_LINK_SPEC " -m armelf_linux -p"
yann@313
    32
+#define SUBTARGET_EXTRA_LINK_SPEC " -m " TARGET_LINKER_EMULATION " -p"
yann@313
    33
 
yann@313
    34
 #undef  MULTILIB_DEFAULTS
yann@313
    35
 #define MULTILIB_DEFAULTS \
yann@313
    36
-	{ "marm", "mlittle-endian", "mhard-float", "mno-thumb-interwork" }
yann@313
    37
+	{ "marm", TARGET_ENDIAN_OPTION, "mhard-float", "mno-thumb-interwork" }
yann@313
    38
 
yann@313
    39
 /* Now we define the strings used to build the spec file.  */
yann@313
    40
 #undef  LIB_SPEC
yann@313
    41
@@ -61,7 +75,7 @@
yann@313
    42
    %{rdynamic:-export-dynamic} \
yann@313
    43
    %{!dynamic-linker:-dynamic-linker " LINUX_DYNAMIC_LINKER "} \
yann@313
    44
    -X \
yann@313
    45
-   %{mbig-endian:-EB}" \
yann@313
    46
+   %{mbig-endian:-EB} %{mlittle-endian:-EL}" \
yann@313
    47
    SUBTARGET_EXTRA_LINK_SPEC
yann@313
    48
 
yann@313
    49
 #undef  LINK_SPEC
yann@313
    50
diff -durN gcc-4.2.1.orig/gcc/config.gcc gcc-4.2.1/gcc/config.gcc
yann@313
    51
--- gcc-4.2.1.orig/gcc/config.gcc	2007-08-03 20:29:52.000000000 +0200
yann@313
    52
+++ gcc-4.2.1/gcc/config.gcc	2007-08-03 20:36:43.000000000 +0200
yann@313
    53
@@ -705,6 +705,11 @@
yann@313
    54
 	tm_file="dbxelf.h elfos.h linux.h arm/elf.h arm/linux-gas.h arm/linux-elf.h"
yann@313
    55
 	tmake_file="${tmake_file} t-linux arm/t-arm"
yann@313
    56
 	case ${target} in
yann@313
    57
+	arm*b-*)
yann@313
    58
+		tm_defines="${tm_defines} TARGET_BIG_ENDIAN_DEFAULT=1"
yann@313
    59
+		;;
yann@313
    60
+	esac
yann@313
    61
+	case ${target} in
yann@313
    62
 	arm*-*-linux-*eabi)
yann@313
    63
 	    tm_file="$tm_file arm/bpabi.h arm/linux-eabi.h"
yann@313
    64
 	    tmake_file="$tmake_file arm/t-arm-elf arm/t-bpabi arm/t-linux-eabi"