patches/gcc/3.4.6/220-arm-bigendian.patch
author "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
Sun May 03 09:50:16 2009 +0000 (2009-05-03)
branchnewlib
changeset 1366 5e5d1e6f55d3
parent 339 bd5e0a849352
permissions -rw-r--r--
Update the newlib devel branch with stuff from /trunk@1498.

-------- diffstat follows --------
/devel/newlib/configure | 336 176 160 0 +++++++------
/devel/newlib/Makefile.in | 12 3 9 0 -
/devel/newlib/scripts/build/kernel/linux.sh | 2 1 1 0
/devel/newlib/scripts/build/internals.sh | 1 0 1 0 -
/devel/newlib/scripts/build/libc/eglibc.sh | 1 0 1 0 -
/devel/newlib/scripts/build/mpfr.sh | 2 1 1 0
/devel/newlib/scripts/functions | 111 5 106 0 ----
/devel/newlib/scripts/config.guess | 7 5 2 0 +
/devel/newlib/scripts/config.sub | 3 2 1 0 +
/devel/newlib/scripts/saveSample.sh.in | 4 2 2 0
/devel/newlib/docs/overview.txt | 8 6 2 0 +
/devel/newlib/samples/armeb-unknown-linux-uclibc/crosstool.config | 14 5 9 0 -
/devel/newlib/samples/sh4-unknown-linux-gnu/crosstool.config | 14 5 9 0 -
/devel/newlib/samples/x86_64-unknown-linux-gnu/crosstool.config | 14 5 9 0 -
/devel/newlib/samples/arm-unknown-elf/crosstool.config | 12 3 9 0 -
/devel/newlib/samples/armeb-unknown-eabi/crosstool.config | 2 0 2 0 -
/devel/newlib/samples/arm-unknown-linux-gnueabi/crosstool.config | 14 5 9 0 -
/devel/newlib/samples/ia64-unknown-linux-gnu/crosstool.config | 14 5 9 0 -
/devel/newlib/samples/x86_64-unknown-linux-uclibc/crosstool.config | 14 5 9 0 -
/devel/newlib/samples/armeb-unknown-linux-gnueabi/crosstool.config | 14 5 9 0 -
/devel/newlib/samples/powerpc-e500v2-linux-gnuspe/crosstool.config | 14 5 9 0 -
/devel/newlib/samples/i686-nptl-linux-gnu/crosstool.config | 14 5 9 0 -
/devel/newlib/samples/arm-unknown-linux-gnu/crosstool.config | 14 5 9 0 -
/devel/newlib/samples/powerpc-unknown-linux-gnu/crosstool.config | 14 5 9 0 -
/devel/newlib/samples/mips-unknown-linux-uclibc/crosstool.config | 14 5 9 0 -
/devel/newlib/samples/arm-unknown-linux-uclibcgnueabi/crosstool.config | 14 5 9 0 -
/devel/newlib/samples/arm-iphone-linux-gnueabi/crosstool.config | 8 4 4 0
/devel/newlib/samples/armeb-unknown-linux-gnu/crosstool.config | 14 5 9 0 -
/devel/newlib/samples/powerpc-unknown_nofpu-linux-gnu/crosstool.config | 14 5 9 0 -
/devel/newlib/samples/i586-geode-linux-uclibc/crosstool.config | 14 5 9 0 -
/devel/newlib/samples/arm-unknown-linux-uclibc/crosstool.config | 14 5 9 0 -
/devel/newlib/samples/powerpc-unknown-linux-uclibc/crosstool.config | 14 5 9 0 -
/devel/newlib/samples/mips-unknown-elf/crosstool.config | 2 0 2 0 -
/devel/newlib/samples/powerpc-405-linux-gnu/crosstool.config | 14 5 9 0 -
/devel/newlib/samples/armeb-unknown-linux-uclibcgnueabi/crosstool.config | 14 5 9 0 -
/devel/newlib/samples/arm-unknown-eabi/crosstool.config | 12 3 9 0 -
/devel/newlib/samples/mipsel-unknown-linux-gnu/crosstool.config | 14 5 9 0 -
/devel/newlib/samples/powerpc64-unknown-linux-gnu/crosstool.config | 14 5 9 0 -
/devel/newlib/samples/alphaev56-unknown-linux-gnu/crosstool.config | 14 5 9 0 -
/devel/newlib/samples/powerpc-860-linux-gnu/crosstool.config | 14 5 9 0 -
/devel/newlib/config/kernel/linux.in | 108 2 106 0 ----
/devel/newlib/config/global/ct-behave.in | 22 13 9 0 +
/devel/newlib/config/global/download.in | 210 15 195 0 +-------
/devel/newlib/config/libc/glibc.in | 7 7 0 0 +
/devel/newlib/config/libc/glibc-eglibc.in-common | 15 14 1 0 +
45 files changed, 382 insertions(+), 839 deletions(-)
     1 diff -durN gcc-3.4.6.orig/gcc/config/arm/linux-elf.h gcc-3.4.6/gcc/config/arm/linux-elf.h
     2 --- gcc-3.4.6.orig/gcc/config/arm/linux-elf.h	2007-08-15 22:51:01.000000000 +0200
     3 +++ gcc-3.4.6/gcc/config/arm/linux-elf.h	2007-08-15 23:05:42.000000000 +0200
     4 @@ -30,17 +30,34 @@
     5  /* Do not assume anything about header files.  */
     6  #define NO_IMPLICIT_EXTERN_C
     7  
     8 +/*
     9 + * 'config.gcc' defines TARGET_BIG_ENDIAN_DEFAULT as 1 for arm*b-*
    10 + * (big endian) configurations.
    11 + */
    12 +#if TARGET_BIG_ENDIAN_DEFAULT
    13 +#define TARGET_ENDIAN_DEFAULT ARM_FLAG_BIG_END
    14 +#define TARGET_ENDIAN_OPTION "mbig-endian"
    15 +#define TARGET_LINKER_EMULATION "armelfb_linux"
    16 +#else
    17 +#define TARGET_ENDIAN_DEFAULT 0
    18 +#define TARGET_ENDIAN_OPTION "mlittle-endian"
    19 +#define TARGET_LINKER_EMULATION "armelf_linux"
    20 +#endif
    21 +
    22  /* Default is to use APCS-32 mode.  */
    23  #undef  TARGET_DEFAULT
    24 -#define TARGET_DEFAULT (ARM_FLAG_APCS_32 | ARM_FLAG_MMU_TRAPS)
    25 +#define TARGET_DEFAULT \
    26 +		( ARM_FLAG_APCS_32 | \
    27 +		  ARM_FLAG_MMU_TRAPS | \
    28 +		  TARGET_ENDIAN_DEFAULT )
    29  
    30  #define SUBTARGET_CPU_DEFAULT TARGET_CPU_arm6
    31  
    32 -#define SUBTARGET_EXTRA_LINK_SPEC " -m armelf_linux -p"
    33 +#define SUBTARGET_EXTRA_LINK_SPEC " -m " TARGET_LINKER_EMULATION " -p"
    34  
    35  #undef  MULTILIB_DEFAULTS
    36  #define MULTILIB_DEFAULTS \
    37 -	{ "marm", "mlittle-endian", "mhard-float", "mapcs-32", "mno-thumb-interwork" }
    38 +	{ "marm", TARGET_ENDIAN_OPTION, "mhard-float", "mapcs-32", "mno-thumb-interwork" }
    39  
    40  #define CPP_APCS_PC_DEFAULT_SPEC "-D__APCS_32__"
    41  
    42 @@ -94,7 +111,7 @@
    43     %{rdynamic:-export-dynamic} \
    44     %{!dynamic-linker:-dynamic-linker " ELF_DYNAMIC_LINKER "} \
    45     -X \
    46 -   %{mbig-endian:-EB}" \
    47 +   %{mbig-endian:-EB} %{mlittle-endian:-EL}" \
    48     SUBTARGET_EXTRA_LINK_SPEC
    49  
    50  #define TARGET_OS_CPP_BUILTINS() LINUX_TARGET_OS_CPP_BUILTINS()
    51 diff -durN gcc-3.4.6.orig/gcc/config.gcc gcc-3.4.6/gcc/config.gcc
    52 --- gcc-3.4.6.orig/gcc/config.gcc	2007-08-15 22:51:01.000000000 +0200
    53 +++ gcc-3.4.6/gcc/config.gcc	2007-08-15 23:05:42.000000000 +0200
    54 @@ -678,6 +678,11 @@
    55  	;;
    56  arm*-*-linux*)			# ARM GNU/Linux with ELF
    57  	tm_file="dbxelf.h elfos.h linux.h arm/elf.h  arm/linux-gas.h arm/linux-elf.h arm/aout.h arm/arm.h"
    58 +	case $target in
    59 +	arm*b-*)
    60 +		tm_defines="TARGET_BIG_ENDIAN_DEFAULT=1 $tm_defines"
    61 +		;;
    62 +	esac
    63  	tmake_file="t-slibgcc-elf-ver t-linux arm/t-linux"
    64  	extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
    65  	gnu_ld=yes