This is the mail archive of the newlib@sourceware.org mailing list for the newlib 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]

[m68k] Fix m51qe family compilation for gcc >= 4.5.0


Hi all,

Compiling newlib for m68k with the new support added to 51qe family
it's broken. I'll attach a patch to fix it.

Regards,
--
Rafael Campos Las Heras (Methril)
Index: cf-crt1.c
===================================================================
RCS file: /cvs/src/src/libgloss/m68k/cf-crt1.c,v
retrieving revision 1.4
diff -u -8 -p -r1.4 cf-crt1.c
--- cf-crt1.c	16 Jun 2008 18:42:40 -0000	1.4
+++ cf-crt1.c	16 Jul 2010 21:08:32 -0000
@@ -63,16 +63,25 @@ void __start1 (void *heap_limit)
 
 /* A default hardware init hook.  */
 
 void __attribute__ ((weak)) hardware_init_hook (void)
 {
   /* Set the VBR. */
   __asm__ __volatile__ ("movec.l %0,%/vbr" :: "r" (__interrupt_vector));
 
+/*Check for GCC >= 4.5 m51qe family definition chage */
+#if ( __GNUC__ > 4 || (__GNUC__ == 4 && \
+      (__GNUC_MINOR__ > 5  || \
+      (__GNUC_MINOR__ == 5 && __GNUC_PATCHLEVEL__ > 0)) )
+  #if defined(__mcf_family_51)
+    #define __mcf_family_51qe
+  #endif
+#endif
+
 #if !defined(__mcf_family_5213) && !defined(__mcf_family_51qe)
   /* Flush & enable the caches */
 #define CACR_CINV (1 << 24)
 #define CACR_CENB (1 << 31)
   __asm__ __volatile__ ("movec.l %0,%/cacr" :: "r" (CACR_CINV | CACR_CENB));
 #endif
 
   /* Should we drop into user mode here? */

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