diff mbox

[ARM] PR49448 incorrectly detecting big-endian arm-linux triplets

Message ID 4F4CF258.9050300@arm.com
State New
Headers show

Commit Message

Richard Earnshaw Feb. 28, 2012, 3:27 p.m. UTC
The pattern to match a big-endian machine for linux is ambiguous as
reported by the PR and can cause some little-endian triplets to be
confused as big-endian.

This patch makes the string unambiguous.

R.

	* config.gcc (arm*-*-linux*): Use an unambiguous pattern for
	detecting big-endian triplets.

Comments

Richard Earnshaw April 12, 2012, 2:12 p.m. UTC | #1
On 28/02/12 15:27, Richard Earnshaw wrote:
> The pattern to match a big-endian machine for linux is ambiguous as
> reported by the PR and can cause some little-endian triplets to be
> confused as big-endian.
> 
> This patch makes the string unambiguous.
> 
> R.
> 
> 	* config.gcc (arm*-*-linux*): Use an unambiguous pattern for
> 	detecting big-endian triplets.
> 
> 
> be-lin.patch
> 
> 
> Index: config.gcc
> ===================================================================
> --- config.gcc	(revision 184624)
> +++ config.gcc	(working copy)
> @@ -825,7 +825,7 @@ arm*-*-netbsdelf*)
>  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-*)
> +	arm*b-*-linux*)
>  		tm_defines="${tm_defines} TARGET_BIG_ENDIAN_DEFAULT=1"
>  		;;
>  	esac

For the record, I've back-ported this patch to gcc-4.5 and gcc-4.6.

R.
diff mbox

Patch

Index: config.gcc
===================================================================
--- config.gcc	(revision 184624)
+++ config.gcc	(working copy)
@@ -825,7 +825,7 @@  arm*-*-netbsdelf*)
 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-*)
+	arm*b-*-linux*)
 		tm_defines="${tm_defines} TARGET_BIG_ENDIAN_DEFAULT=1"
 		;;
 	esac