This is the mail archive of the mailing list for the GCC project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

PATCH: Correctly configure all big-endian ARM archs, not just arm*-*-linux-*.

Currently, for arm-* archs, TARGET_BIG_ENDIAN_DEFAULT is only set in
the case branch for arm*-*-linux-*, not for other arm architectures.
We're compiling for the TI TMS570, which is a big-endian processor,
with target set to armeb-unknown-eabi.  The following patch moves the
big-endian check out of the big architecture case, so that
TARGET_BIG_ENDIAN_DEFAULT is consistently set for any armeb-*-*

We've been using this with good results for over a year at Google on
TMS570 processors.

This fixes bug 52187 - armeb-unknown-eabi not recognized as big-endian.

Seth LaForge

        * config.gcc: Add TARGET_BIG_ENDIAN_DEFAULT=1 for all arm*b archs.

diff -u -r gcc-4.8-20130210/gcc/config.gcc
--- gcc-4.8-20130210/gcc/config.gcc	2013-02-08 08:02:47.000000000 -0800
+++	2013-02-14 16:37:14.282107219 -0800
@@ -809,6 +809,13 @@

+# Handle big-endian ARM architectures.
+case ${target} in
+	tm_defines="${tm_defines} TARGET_BIG_ENDIAN_DEFAULT=1"
+	;;
 case ${target} in
 	tm_file="${tm_file} dbxelf.h elfos.h newlib-stdint.h"
@@ -867,11 +874,6 @@
 arm*-*-linux-*)			# ARM GNU/Linux with ELF
 	tm_file="dbxelf.h elfos.h gnu-user.h linux.h linux-android.h
glibc-stdint.h arm/elf.h arm/linux-gas.h arm/linux-elf.h"
-	case $target in
-	arm*b-*-linux*)
-	    tm_defines="${tm_defines} TARGET_BIG_ENDIAN_DEFAULT=1"
-	    ;;
-	esac
 	tmake_file="${tmake_file} arm/t-arm arm/t-arm-elf arm/t-bpabi
 	tm_file="$tm_file arm/bpabi.h arm/linux-eabi.h arm/aout.h arm/arm.h"
 	# Define multilib configuration for arm-linux-androideabi.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]