re PR target/16350 (gcc only understands little endian ARM systems)
PR target/16350 * config.gcc: For arm*b-* define TARGET_BIG_ENDIAN_DEFAULT. * config/arm/linux-elf.h (TARGET_ENDIAN_DEFAULT): Define based on TARGET_BIG_ENDIAN_DEFAULT. Use for MULTILIB_DEFAULTS. (TARGET_DEFAULT): Set according to TARGET_ENDIAN_DEFAULT. (LINUX_TARGET_LINK_SPEC): Pass -mlittle-endian on to the assembler. * config/arm/linux-eabi.h (TARGET_LINKER_EMULATION): Set according to TARGET_BIG_ENDIAN_DEFAULT. (SUBTARGET_EXTRA_LINK_SPEC): Likewise. * gcc/config/arm/bpabi.h (TARGET_DEFAULT_MASK): Set according to TARGET_BIG_ENDIAN_DEFAULT. From-SVN: r129999
This commit is contained in:
parent
c4e2c79ee4
commit
d3a9662cad
@ -1,3 +1,17 @@
|
||||
2007-11-07 <aldot@gcc.gnu.org> Bernhard Fischer
|
||||
|
||||
PR target/16350
|
||||
* config.gcc: For arm*b-* define TARGET_BIG_ENDIAN_DEFAULT.
|
||||
* config/arm/linux-elf.h (TARGET_ENDIAN_DEFAULT): Define based on
|
||||
TARGET_BIG_ENDIAN_DEFAULT. Use for MULTILIB_DEFAULTS.
|
||||
(TARGET_DEFAULT): Set according to TARGET_ENDIAN_DEFAULT.
|
||||
(LINUX_TARGET_LINK_SPEC): Pass -mlittle-endian on to the assembler.
|
||||
* config/arm/linux-eabi.h (TARGET_LINKER_EMULATION): Set according
|
||||
to TARGET_BIG_ENDIAN_DEFAULT.
|
||||
(SUBTARGET_EXTRA_LINK_SPEC): Likewise.
|
||||
* gcc/config/arm/bpabi.h (TARGET_DEFAULT_MASK): Set according
|
||||
to TARGET_BIG_ENDIAN_DEFAULT.
|
||||
|
||||
2007-11-07 Diego Novillo <dnovillo@google.com>
|
||||
|
||||
* tree.h (struct tree_struct_field_tag): Move field
|
||||
|
@ -704,6 +704,11 @@ arm*-*-netbsd*)
|
||||
;;
|
||||
arm*-*-linux*) # ARM GNU/Linux with ELF
|
||||
tm_file="dbxelf.h elfos.h linux.h arm/elf.h arm/linux-gas.h arm/linux-elf.h"
|
||||
case $target in
|
||||
arm*b-*)
|
||||
tm_defines="${tm_defines} TARGET_BIG_ENDIAN_DEFAULT=1"
|
||||
;;
|
||||
esac
|
||||
tmake_file="${tmake_file} t-linux arm/t-arm"
|
||||
case ${target} in
|
||||
arm*-*-linux-*eabi)
|
||||
|
@ -32,9 +32,17 @@
|
||||
#undef FPUTYPE_DEFAULT
|
||||
#define FPUTYPE_DEFAULT FPUTYPE_VFP
|
||||
|
||||
/* TARGET_BIG_ENDIAN_DEFAULT is set in
|
||||
config.gcc for big endian configurations. */
|
||||
#if TARGET_BIG_ENDIAN_DEFAULT
|
||||
#define TARGET_ENDIAN_DEFAULT MASK_BIG_END
|
||||
#else
|
||||
#define TARGET_ENDIAN_DEFAULT 0
|
||||
#endif
|
||||
|
||||
/* EABI targets should enable interworking by default. */
|
||||
#undef TARGET_DEFAULT
|
||||
#define TARGET_DEFAULT MASK_INTERWORK
|
||||
#define TARGET_DEFAULT (MASK_INTERWORK | TARGET_ENDIAN_DEFAULT)
|
||||
|
||||
/* The ARM BPABI functions return a boolean; they use no special
|
||||
calling convention. */
|
||||
|
@ -46,8 +46,17 @@
|
||||
#undef SUBTARGET_CPU_DEFAULT
|
||||
#define SUBTARGET_CPU_DEFAULT TARGET_CPU_arm10tdmi
|
||||
|
||||
/* TARGET_BIG_ENDIAN_DEFAULT is set in
|
||||
config.gcc for big endian configurations. */
|
||||
#undef TARGET_LINKER_EMULATION
|
||||
#if TARGET_BIG_ENDIAN_DEFAULT
|
||||
#define TARGET_LINKER_EMULATION "armelfb_linux_eabi"
|
||||
#else
|
||||
#define TARGET_LINKER_EMULATION "armelf_linux_eabi"
|
||||
#endif
|
||||
|
||||
#undef SUBTARGET_EXTRA_LINK_SPEC
|
||||
#define SUBTARGET_EXTRA_LINK_SPEC " -m armelf_linux_eabi"
|
||||
#define SUBTARGET_EXTRA_LINK_SPEC " -m " TARGET_LINKER_EMULATION
|
||||
|
||||
/* Use ld-linux.so.3 so that it will be possible to run "classic"
|
||||
GNU/Linux binaries on an EABI system. */
|
||||
|
@ -30,12 +30,24 @@
|
||||
#undef TARGET_DEFAULT_FLOAT_ABI
|
||||
#define TARGET_DEFAULT_FLOAT_ABI ARM_FLOAT_ABI_HARD
|
||||
|
||||
/* TARGET_BIG_ENDIAN_DEFAULT is set in
|
||||
config.gcc for big endian configurations. */
|
||||
#if TARGET_BIG_ENDIAN_DEFAULT
|
||||
#define TARGET_ENDIAN_DEFAULT MASK_BIG_END
|
||||
#define TARGET_ENDIAN_OPTION "mbig-endian"
|
||||
#define TARGET_LINKER_EMULATION "armelfb_linux"
|
||||
#else
|
||||
#define TARGET_ENDIAN_DEFAULT 0
|
||||
#define TARGET_ENDIAN_OPTION "mlittle-endian"
|
||||
#define TARGET_LINKER_EMULATION "armelf_linux"
|
||||
#endif
|
||||
|
||||
#undef TARGET_DEFAULT
|
||||
#define TARGET_DEFAULT (0)
|
||||
#define TARGET_DEFAULT (TARGET_ENDIAN_DEFAULT)
|
||||
|
||||
#define SUBTARGET_CPU_DEFAULT TARGET_CPU_arm6
|
||||
|
||||
#define SUBTARGET_EXTRA_LINK_SPEC " -m armelf_linux -p"
|
||||
#define SUBTARGET_EXTRA_LINK_SPEC " -m " TARGET_LINKER_EMULATION " -p"
|
||||
|
||||
#undef MULTILIB_DEFAULTS
|
||||
#define MULTILIB_DEFAULTS \
|
||||
@ -60,7 +72,7 @@
|
||||
%{rdynamic:-export-dynamic} \
|
||||
%{!dynamic-linker:-dynamic-linker " LINUX_DYNAMIC_LINKER "} \
|
||||
-X \
|
||||
%{mbig-endian:-EB}" \
|
||||
%{mbig-endian:-EB} %{mlittle-endian:-EL}" \
|
||||
SUBTARGET_EXTRA_LINK_SPEC
|
||||
|
||||
#undef LINK_SPEC
|
||||
|
Loading…
Reference in New Issue
Block a user