patches/gcc/4.1.1/190-arm-bigendian.patch
author "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
Fri Oct 17 12:47:53 2008 +0000 (2008-10-17)
changeset 943 1cca90ce0481
parent 1 eeea35fbf182
permissions -rw-r--r--
Update the kconfig stuff to match the one in the linux-2.6.27 version.

/trunk/kconfig/zconf.hash.c | 225 110 115 0 +++----
/trunk/kconfig/lkc_proto.h | 4 3 1 0 +
/trunk/kconfig/mconf.c | 217 110 107 0 +++---
/trunk/kconfig/menu.c | 86 60 26 0 ++-
/trunk/kconfig/symbol.c | 212 156 56 0 ++++--
/trunk/kconfig/kconfig.mk | 24 9 15 0 -
/trunk/kconfig/lex.zconf.c | 97 80 17 0 ++-
/trunk/kconfig/util.c | 38 30 8 0 +
/trunk/kconfig/lkc.h | 22 18 4 0 +
/trunk/kconfig/expr.c | 32 19 13 0 +
/trunk/kconfig/confdata.c | 254 172 82 0 +++++---
/trunk/kconfig/lxdialog/dialog.h | 12 9 3 0 +
/trunk/kconfig/lxdialog/inputbox.c | 6 3 3 0
/trunk/kconfig/lxdialog/checklist.c | 4 2 2 0
/trunk/kconfig/lxdialog/menubox.c | 6 3 3 0
/trunk/kconfig/lxdialog/textbox.c | 2 1 1 0
/trunk/kconfig/lxdialog/util.c | 47 30 17 0 +
/trunk/kconfig/lxdialog/yesno.c | 4 2 2 0
/trunk/kconfig/expr.h | 20 10 10 0
/trunk/kconfig/zconf.tab.c | 1441 793 648 0 ++++++++++++++++++++++++-------------------
/trunk/kconfig/conf.c | 276 124 152 0 ++++----
/trunk/kconfig/check-gettext.sh | 14 14 0 0 +
/trunk/ct-ng.in | 2 1 1 0
23 files changed, 1759 insertions(+), 1286 deletions(-)
     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.1.0/gcc/config/arm/linux-elf.h
     7 +++ gcc-4.1.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_TARGET_INTERPRETER "} \
    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.1.0/gcc/config.gcc
    55 +++ gcc-4.1.0/gcc/config.gcc
    56 @@ -672,6 +672,11 @@
    57  	;;
    58  arm*-*-linux*)			# ARM GNU/Linux with ELF
    59  	tm_file="dbxelf.h elfos.h linux.h arm/elf.h arm/linux-gas.h arm/linux-elf.h" 
    60 +	case $target in
    61 +	arm*b-*)
    62 +		tm_defines="${tm_defines} TARGET_BIG_ENDIAN_DEFAULT=1"
    63 +		;;
    64 +	esac
    65  	tmake_file="${tmake_file} t-linux arm/t-arm"
    66  	case ${target} in
    67  	arm*-*-linux-gnueabi)