[PATCH] Fix bootstrap on ARM v3

Martin Michlmayr tbm@cyrius.com
Sun May 20 10:54:00 GMT 2007


Bootstrap of trunk is currently broken on ARM v3.  This got broken
when support for v7 got added, with the following change:
http://gcc.gnu.org/ml/gcc-patches/2006-02/msg01850.html
After this change, __ARM__ARCH__ is no longer defined on v3 (and lower)
machines.

Here are two alternative, tested patches.  Which one should I install?
The first one will show "Unable to determine architecture" on v1/v2
whereas the second will will simply default to v3 (the old behaviour).

2007-04-20  Martin Michlmayr  <tbm@cyrius.com>

	PR target/32007
	* config/arm/lib1funcs.asm: Define __ARM_ARCH__ on v3 machines.

-- 
Martin Michlmayr
http://www.cyrius.com/
-------------- next part --------------
--- gcc/config/arm/lib1funcs.asm~	2007-05-19 12:15:44.000000000 +0000
+++ gcc/config/arm/lib1funcs.asm	2007-05-19 12:16:08.000000000 +0000
@@ -69,6 +69,10 @@
 
 /* Function end macros.  Variants for interworking.  */
 
+#if defined(__ARM_ARCH_3__)
+# define __ARM_ARCH__ 3
+#endif
+
 #if defined(__ARM_ARCH_3M__) || defined(__ARM_ARCH_4__) \
 	|| defined(__ARM_ARCH_4T__)
 /* We use __ARM_ARCH__ set to 4 here, but in reality it's any processor with
-------------- next part --------------
--- gcc/config/arm/lib1funcs.asm	(revision 124853)
+++ gcc/config/arm/lib1funcs.asm	(working copy)
@@ -69,16 +69,21 @@
 
 /* Function end macros.  Variants for interworking.  */
 
+@ This selects the minimum architecture level required.
+#define __ARM_ARCH__ 3
+
 #if defined(__ARM_ARCH_3M__) || defined(__ARM_ARCH_4__) \
 	|| defined(__ARM_ARCH_4T__)
 /* We use __ARM_ARCH__ set to 4 here, but in reality it's any processor with
    long multiply instructions.  That includes v3M.  */
+# undef __ARM_ARCH__
 # define __ARM_ARCH__ 4
 #endif
 	
 #if defined(__ARM_ARCH_5__) || defined(__ARM_ARCH_5T__) \
 	|| defined(__ARM_ARCH_5E__) || defined(__ARM_ARCH_5TE__) \
 	|| defined(__ARM_ARCH_5TEJ__)
+# undef __ARM_ARCH__
 # define __ARM_ARCH__ 5
 #endif
 
@@ -90,6 +95,7 @@
 
 #if defined(__ARM_ARCH_7__) || defined(__ARM_ARCH_7A__) \
 	|| defined(__ARM_ARCH_7R__) || defined(__ARM_ARCH_7M__)
+# undef __ARM_ARCH__
 # define __ARM_ARCH__ 7
 #endif
 


More information about the Gcc-patches mailing list