[Bug c/17830] New: Gcc 3.4.x can't compile linux 2.4 kernels

ant_diaz at teleline dot es gcc-bugzilla@gcc.gnu.org
Mon Oct 4 22:37:00 GMT 2004


Neither Gcc 3.4.0 nor 3.4.2 can compile linux 2.4 kernels (tested with
linux 2.4.26 and 2.4.27). Gcc 3.3.3.and 3.3.4 work fine.

It gives several errors like this:
sched.c:213: error: conflicting types for 'reschedule_idle'
sched.c:210: error: previous declaration of 'reschedule_idle' was here

The offending lines are these:
sched.c:210: static FASTCALL(void reschedule_idle(struct task_struct * p));
sched.c:213: static void reschedule_idle(struct task_struct * p)

The 2.4.26 kernel can be compliled (with tons of warnings) applying this
patch to include/linux/kernel.h:
--- include/linux/kernel.h~	2004-10-01 14:22:28.000000000 +0200
+++ include/linux/kernel.h	2004-10-01 14:22:28.000000000 +0200
@@ -49,11 +49,11 @@
 # define ATTRIB_NORET  __attribute__((noreturn))
 # define NORET_AND     noreturn,
 
-#ifdef __i386__
-#define FASTCALL(x)	x __attribute__((regparm(3)))
-#else
+//#ifdef __i386__
+//#define FASTCALL(x)	x __attribute__((regparm(3)))
+//#else
 #define FASTCALL(x)	x
-#endif
+//#endif
 
 struct completion;
----------------------------- END PATCH -------------------------

uname -a
  Linux puesto1 2.4.26 #1 Thu Apr 15 20:27:42 CEST 2004 i586 unknown

gcc -v (3.4.0 and 3.4.2 specs are exactly the same)
  Reading specs from /usr/local/lib/gcc-lib/i586-pc-linux-gnu/3.3.4/specs
  Configured with: ../gcc-3.3.4/configure --enable-languages=c,c++ --disable-nls
  Thread model: posix
  gcc version 3.3.4

-- 
           Summary: Gcc 3.4.x can't compile linux 2.4 kernels
           Product: gcc
           Version: 3.4.2
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: c
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: ant_diaz at teleline dot es
                CC: gcc-bugs at gcc dot gnu dot org
 GCC build triplet: i586-pc-linux-gnu
  GCC host triplet: i586-pc-linux-gnu
GCC target triplet: i586-pc-linux-gnu


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17830



More information about the Gcc-bugs mailing list