diff --git a/ChangeLog b/ChangeLog
index b622e8f..e2597be 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2011-03-23  Joseph Myers  <joseph@codesourcery.com>
+
+	* config.sub: Map strongarm-*, thumb-* and xscale*-* to
+	corresponding arm targets.
+	* testsuite/config-sub.data: Add test cases.
+
 2011-02-24  Jason Jacques <jtjacques@gmail.com>
 
 	* config.sub (version): Bump copyright years.
diff --git a/config.sub b/config.sub
index 0ef29b0..69a6b0b 100755
--- a/config.sub
+++ b/config.sub
@@ -4,7 +4,7 @@
 #   2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,
 #   2011 Free Software Foundation, Inc.
 
-timestamp='2011-02-24'
+timestamp='2011-03-23'
 
 # This file is (in principle) common to ALL GNU software.
 # The presence of a machine in this file suggests that SOME GNU software
@@ -296,12 +296,12 @@ case $basic_machine in
 	| sh64 | sh64le \
 	| sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \
 	| sparcv8 | sparcv9 | sparcv9b | sparcv9v \
-	| spu | strongarm \
-	| tahoe | thumb | tic4x | tic54x | tic55x | tic6x | tic80 | tron \
+	| spu \
+	| tahoe | tic4x | tic54x | tic55x | tic6x | tic80 | tron \
 	| ubicom32 \
 	| v850 | v850e \
 	| we32k \
-	| x86 | xc16x | xscale | xscalee[bl] | xstormy16 | xtensa \
+	| x86 | xc16x | xstormy16 | xtensa \
 	| z8k | z80)
 		basic_machine=$basic_machine-unknown
 		;;
@@ -325,6 +325,18 @@ case $basic_machine in
 		basic_machine=mt-unknown
 		;;
 
+	strongarm | thumb | xscale)
+		basic_machine=arm-unknown
+		;;
+
+	xscaleeb)
+		basic_machine=armeb-unknown
+		;;
+
+	xscaleel)
+		basic_machine=armel-unknown
+		;;
+
 	# We use `pc' rather than `unknown'
 	# because (1) that's what they normally are, and
 	# (2) the word "unknown" tends to confuse beginning users.
@@ -391,15 +403,15 @@ case $basic_machine in
 	| shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
 	| sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \
 	| sparclite-* \
-	| sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | strongarm-* | sv1-* | sx?-* \
-	| tahoe-* | thumb-* \
+	| sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx?-* \
+	| tahoe-* \
 	| tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
 	| tile-* | tilegx-* \
 	| tron-* \
 	| ubicom32-* \
 	| v850-* | v850e-* | vax-* \
 	| we32k-* \
-	| x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \
+	| x86-* | x86_64-* | xc16x-* | xps100-* \
 	| xstormy16-* | xtensa*-* \
 	| ymp-* \
 	| z8k-* | z80-*)
@@ -1046,6 +1058,9 @@ case $basic_machine in
 		basic_machine=i860-stratus
 		os=-sysv4
 		;;
+	strongarm-* | thumb-*)
+		basic_machine=arm-`echo $basic_machine | sed 's/^[^-]*-//'`
+		;;
 	sun2)
 		basic_machine=m68000-sun
 		;;
@@ -1178,6 +1193,9 @@ case $basic_machine in
 	xps | xps100)
 		basic_machine=xps100-honeywell
 		;;
+	xscale-* | xscalee[bl]-*)
+		basic_machine=`echo $basic_machine | sed 's/^xscale/arm/'`
+		;;
 	ymp)
 		basic_machine=ymp-cray
 		os=-unicos
diff --git a/testsuite/config-sub.data b/testsuite/config-sub.data
index a0268ff..b3063af 100644
--- a/testsuite/config-sub.data
+++ b/testsuite/config-sub.data
@@ -23,9 +23,9 @@ crisv32-linux			crisv32-axis-linux-gnu
 frv-linux			frv-unknown-linux-gnu
 djgpp				i586-pc-msdosdjgpp
 s390-ibm-zvmoe			s390-ibm-zvmoe
-xscale				xscale-unknown-none
-xscaleeb			xscaleeb-unknown-none
-xscaleel			xscaleel-unknown-none
+xscale				arm-unknown-none
+xscaleeb			armeb-unknown-none
+xscaleel			armel-unknown-none
 xbox				i686-pc-mingw32
 maxq				maxq-unknown-none
 maxq-elf			maxq-unknown-elf
@@ -204,3 +204,10 @@ nds32-elf			nds32-unknown-elf
 nds32le-elf			nds32le-unknown-elf
 cr16-elf			cr16-unknown-elf
 cr16-random-elf			cr16-unknown-elf
+thumb				arm-unknown-none
+strongarm			arm-unknown-none
+xscale-none-elf			arm-none-elf
+xscaleeb-none-elf		armeb-none-elf
+xscaleel-none-elf		armel-none-elf
+thumb-none-elf			arm-none-elf
+strongarm-none-elf		arm-none-elf