source: scripts/patches/gcc-3.4.0-arm-bigendian.patch@ 0547e59

clfs-1.2 clfs-2.1 clfs-3.0.0-systemd clfs-3.0.0-sysvinit systemd sysvinit
Last change on this file since 0547e59 was 7f65c0e, checked in by Jim Gifford <clfs@…>, 19 years ago

r625@server (orig r623): jim | 2005-10-31 12:43:24 -0800
Final Move

  • Property mode set to 100644
File size: 2.4 KB
  • gcc/config/arm/linux-elf.h

    By Lennert Buytenhek <buytenh@wantstofly.org>
    Adds support for arm*b-linux* big-endian ARM targets
    
    See http://gcc.gnu.org/PR16350
    
    diff -urN gcc-3.4.0.orig/gcc/config/arm/linux-elf.h gcc-3.4.0/gcc/config/arm/linux-elf.h
    old new  
    3030/* Do not assume anything about header files.  */
    3131#define NO_IMPLICIT_EXTERN_C
    3232
     33/*
     34 * 'config.gcc' defines TARGET_BIG_ENDIAN_DEFAULT as 1 for arm*b-*
     35 * (big endian) configurations.
     36 */
     37#if TARGET_BIG_ENDIAN_DEFAULT
     38#define TARGET_ENDIAN_DEFAULT ARM_FLAG_BIG_END
     39#define TARGET_ENDIAN_OPTION "mbig-endian"
     40#define TARGET_LINKER_EMULATION "armelfb_linux"
     41#else
     42#define TARGET_ENDIAN_DEFAULT 0
     43#define TARGET_ENDIAN_OPTION "mlittle-endian"
     44#define TARGET_LINKER_EMULATION "armelf_linux"
     45#endif
     46
    3347/* Default is to use APCS-32 mode.  */
    3448#undef  TARGET_DEFAULT
    35 #define TARGET_DEFAULT (ARM_FLAG_APCS_32 | ARM_FLAG_MMU_TRAPS)
     49#define TARGET_DEFAULT \
     50                ( ARM_FLAG_APCS_32 | \
     51                  ARM_FLAG_MMU_TRAPS | \
     52                  TARGET_ENDIAN_DEFAULT )
    3653
    3754#define SUBTARGET_CPU_DEFAULT TARGET_CPU_arm6
    3855
    39 #define SUBTARGET_EXTRA_LINK_SPEC " -m armelf_linux -p"
     56#define SUBTARGET_EXTRA_LINK_SPEC " -m " TARGET_LINKER_EMULATION " -p"
    4057
    4158#undef  MULTILIB_DEFAULTS
    4259#define MULTILIB_DEFAULTS \
    43         { "marm", "mlittle-endian", "mhard-float", "mapcs-32", "mno-thumb-interwork" }
     60        { "marm", TARGET_ENDIAN_OPTION, "mhard-float", "mapcs-32", "mno-thumb-interwork" }
    4461
    4562#define CPP_APCS_PC_DEFAULT_SPEC "-D__APCS_32__"
    4663
     
    89106   %{rdynamic:-export-dynamic} \
    90107   %{!dynamic-linker:-dynamic-linker /lib/ld-linux.so.2} \
    91108   -X \
    92    %{mbig-endian:-EB}" \
     109   %{mbig-endian:-EB} %{mlittle-endian:-EL}" \
    93110   SUBTARGET_EXTRA_LINK_SPEC
    94111
    95112#define TARGET_OS_CPP_BUILTINS() LINUX_TARGET_OS_CPP_BUILTINS()
  • gcc/config.gcc

    diff -urN gcc-3.4.0.orig/gcc/config.gcc gcc-3.4.0/gcc/config.gcc
    old new  
    666666        ;;
    667667arm*-*-linux*)                  # ARM GNU/Linux with ELF
    668668        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"
     669        case $target in
     670        arm*b-*)
     671                tm_defines="TARGET_BIG_ENDIAN_DEFAULT=1 $tm_defines"
     672                ;;
     673        esac
    669674        tmake_file="t-slibgcc-elf-ver t-linux arm/t-linux"
    670675        extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
    671676        gnu_ld=yes
Note: See TracBrowser for help on using the repository browser.