patches/gcc/4.2.0/800-arm-bigendian.patch
author "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
Tue Jun 24 16:24:09 2008 +0000 (2008-06-24)
changeset 611 eac4dc8da8a9
permissions -rw-r--r--
New patches from Ioannis E. VENETIS to allow building more up-to-date Alpha x-compilers.
Some patches are still missing, though.
See: http://sourceware.org/ml/libc-help/2008-06/msg00061.html

/trunk/patches/glibc/2.5.1/270-glibc-alpha-cfi.patch | 25 25 0 0 ++++++++++
/trunk/patches/glibc/2.5.1/280-glibc-alpha-sigsuspend.patch | 24 24 0 0 ++++++++++
/trunk/patches/glibc/2.5/270-glibc-alpha-cfi.patch | 25 25 0 0 ++++++++++
/trunk/patches/glibc/2.5/280-glibc-alpha-sigsuspend.patch | 24 24 0 0 ++++++++++
/trunk/patches/glibc/linuxthreads-2.3.6/270-glibc-linuxthreads-alpha-cfi.patch | 25 25 0 0 ++++++++++
/trunk/patches/gcc/4.2.0/940-gcc-alpha-signal_h.patch | 17 17 0 0 +++++++
/trunk/patches/gcc/4.2.1/940-gcc-alpha-signal_h.patch | 17 17 0 0 +++++++
/trunk/patches/gcc/4.3.0/940-gcc-alpha-signal_h.patch | 17 17 0 0 +++++++
/trunk/patches/gcc/4.2.2/940-gcc-alpha-signal_h.patch | 17 17 0 0 +++++++
/trunk/patches/gcc/4.3.1/940-gcc-alpha-signal_h.patch | 17 17 0 0 +++++++
/trunk/patches/gcc/4.2.3/940-gcc-alpha-signal_h.patch | 17 17 0 0 +++++++
11 files changed, 225 insertions(+)
     1 By Lennert Buytenhek <buytenh@wantstofly.org>
     2 Adds support for arm*b-linux* big-endian ARM targets
     3 
     4 See http://gcc.gnu.org/PR16350
     5 
     6 --- gcc-4.2.0/gcc/config/arm/linux-elf.h
     7 +++ gcc-4.2.0/gcc/config/arm/linux-elf.h
     8 @@ -28,19 +28,33 @@
     9  #undef  TARGET_VERSION
    10  #define TARGET_VERSION  fputs (" (ARM GNU/Linux with ELF)", stderr);
    11  
    12 +/*
    13 + * 'config.gcc' defines TARGET_BIG_ENDIAN_DEFAULT as 1 for arm*b-*
    14 + * (big endian) configurations.
    15 + */
    16 +#if TARGET_BIG_ENDIAN_DEFAULT
    17 +#define TARGET_ENDIAN_DEFAULT MASK_BIG_END
    18 +#define TARGET_ENDIAN_OPTION "mbig-endian"
    19 +#define TARGET_LINKER_EMULATION "armelfb_linux"
    20 +#else
    21 +#define TARGET_ENDIAN_DEFAULT 0
    22 +#define TARGET_ENDIAN_OPTION "mlittle-endian"
    23 +#define TARGET_LINKER_EMULATION "armelf_linux"
    24 +#endif
    25 +
    26  #undef  TARGET_DEFAULT_FLOAT_ABI
    27  #define TARGET_DEFAULT_FLOAT_ABI ARM_FLOAT_ABI_HARD
    28  
    29  #undef  TARGET_DEFAULT
    30 -#define TARGET_DEFAULT (0)
    31 +#define TARGET_DEFAULT (TARGET_ENDIAN_DEFAULT)
    32  
    33  #define SUBTARGET_CPU_DEFAULT TARGET_CPU_arm6
    34  
    35 -#define SUBTARGET_EXTRA_LINK_SPEC " -m armelf_linux -p"
    36 +#define SUBTARGET_EXTRA_LINK_SPEC " -m " TARGET_LINKER_EMULATION " -p"
    37  
    38  #undef  MULTILIB_DEFAULTS
    39  #define MULTILIB_DEFAULTS \
    40 -	{ "marm", "mlittle-endian", "mhard-float", "mno-thumb-interwork" }
    41 +	{ "marm", TARGET_ENDIAN_OPTION, "mhard-float", "mno-thumb-interwork" }
    42  
    43  /* Now we define the strings used to build the spec file.  */
    44  #undef  LIB_SPEC
    45 @@ -61,7 +75,7 @@
    46     %{rdynamic:-export-dynamic} \
    47     %{!dynamic-linker:-dynamic-linker " LINUX_DYNAMIC_LINKER "} \
    48     -X \
    49 -   %{mbig-endian:-EB}" \
    50 +   %{mbig-endian:-EB} %{mlittle-endian:-EL}" \
    51     SUBTARGET_EXTRA_LINK_SPEC
    52  
    53  #undef  LINK_SPEC
    54 --- gcc-4.2.0/gcc/config.gcc.orig	2006-09-22 14:53:41.000000000 +0200
    55 +++ gcc-4.2.0/gcc/config.gcc	2006-09-25 10:45:21.000000000 +0200
    56 @@ -696,6 +696,11 @@
    57  	tm_file="dbxelf.h elfos.h linux.h arm/elf.h arm/linux-gas.h arm/linux-elf.h"
    58  	tmake_file="${tmake_file} t-linux arm/t-arm"
    59  	case ${target} in
    60 +	arm*b-*)
    61 +		tm_defines="${tm_defines} TARGET_BIG_ENDIAN_DEFAULT=1"
    62 +		;;
    63 +	esac
    64 +	case ${target} in
    65  	arm*-*-linux-*eabi)
    66  	    tm_file="$tm_file arm/bpabi.h arm/linux-eabi.h"
    67  	    tmake_file="$tmake_file arm/t-arm-elf arm/t-bpabi arm/t-linux-eabi"