This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


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

Re: Problem compiling Linux kernel (version 2.4.5) with gcc version3.0



On Wed, 20 Jun 2001, Ravindra Jaju wrote:

> make[2]: Entering directory `/usr/src/v2.4/linux/kernel'
> gcc -D__KERNEL__ -I/usr/src/v2.4/linux/include -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer -fno-strict-aliasing -pipe
> -mpreferred-stack-boundary=2 -march=i686    -c -o timer.o timer.c
> timer.c:35: conflicting types for `xtime'
> /usr/src/v2.4/linux/include/linux/sched.h:540: previous declaration of `xtime'
> make[2]: *** [timer.o] Error 1
> make[2]: Leaving directory `/usr/src/v2.4/linux/kernel'
> make[1]: *** [first_rule] Error 2
> make[1]: Leaving directory `/usr/src/v2.4/linux/kernel'
> make: *** [_dir_kernel] Error 2
> *******************************************************************
> 
> Please let me know if you can help. Do I need to provide any other information.
> I use the default Redhat 7.1 installation (with my own compiled kernel).

Edit include/linux/sched.h, go to line 540, and add 'volatile' after the
word 'extern'.  The function definition differs from the declaration, so
gcc complains.

C


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