Downgrading gcc to compile 2.4 from 2.6

Submitted by kewlemer
on April 4, 2005 - 5:13am

Folks,

I am trying to downgrade gcc to 3.2.2 from 3.4 since I have to comiple a 2.4 kernel for some application I am testing.

Unfortunately, this is proving to be extremely painful. Here is the probllem:

I tried installing gcc from .rpm and .src.rpm, without any success. I then tried building gcc from the sources. Some of the links I used were:-

http://www.tellurian.com.au/whitepapers/multiplegcc.php
This is pretty much what I did.

http://gcc.gnu.org/faq.html#multiple
http://www.faqs.org/docs/Linux-HOWTO/GCC-HOWTO.html

When I finally had a 3.2.2 gcc running, I tried doing the bzImage and these errors came up :-


.
.
.gmake[2]: Entering directory `/usr/src/linux-2.4.21/kernel'
gcc -D__KERNEL__ -I/usr/src/linux-2.4.21/include -Wall -Wstrict-prototypes -Wno-trigraphs -O2 -fno
-strict-aliasing -fno-common -fomit-frame-pointer -pipe -mpreferred-stack-boundary=2 -march=i686
-nostdinc -iwithprefix include -DKBUILD_BASENAME=sched -fno-omit-frame-pointer -c -o sched.o sch
ed.c
In file included from /usr/src/linux-2.4.21/include/linux/wait.h:13,
from /usr/src/linux-2.4.21/include/linux/fs.h:12,
from /usr/src/linux-2.4.21/include/linux/capability.h:17,
from /usr/src/linux-2.4.21/include/linux/binfmts.h:5,
from /usr/src/linux-2.4.21/include/linux/sched.h:9,
from /usr/src/linux-2.4.21/include/linux/mm.h:4,
from sched.c:23:
/usr/src/linux-2.4.21/include/linux/kernel.h:10:20: stdarg.h: No such file
In file included from /usr/src/linux-2.4.21/include/linux/wait.h:13,
from /usr/src/linux-2.4.21/include/linux/fs.h:12,
from /usr/src/linux-2.4.21/include/linux/capability.h:17,
from /usr/src/linux-2.4.21/include/linux/binfmts.h:5,
from /usr/src/linux-2.4.21/include/linux/sched.h:9,
from /usr/src/linux-2.4.21/include/linux/mm.h:4,
from sched.c:23:
/usr/src/linux-2.4.21/include/linux/kernel.h:74: parse error before "va_lis
/usr/src/linux-2.4.21/include/linux/kernel.h:74: warning: function declarat
/usr/src/linux-2.4.21/include/linux/kernel.h:77: parse error before "va_lis
/usr/src/linux-2.4.21/include/linux/kernel.h:77: warning: function declarat
/usr/src/linux-2.4.21/include/linux/kernel.h:81: parse error before "va_lis
/usr/src/linux-2.4.21/include/linux/kernel.h:81: warning: function declarat
gmake[2]: *** [sched.o] Error 1
gmake[2]: Leaving directory `/usr/src/linux-2.4.21/kernel'
gmake[1]: *** [first_rule] Error 2
gmake[1]: Leaving directory `/usr/src/linux-2.4.21/kernel'
gmake: *** [_dir_kernel] Error 2
[root@postel linux-2.4.21]#

Googling on this I found:
[url]http://linux.derkeiler.com/Mailing-Lists/Kernel/2004-03/5707.html[/url]
[url]http://linux.derkeiler.com/Newsgroups/comp.os.linux.development.system/2003-10/0304.html[/url]

This indicates that the problem may still be with gcc.

Since I used the --prefix for gcc compilation, I figured the problem may be the one specified in :-
[url]http://gcc.gnu.org/faq.html[/url]
and in particular, "How to install multiple versions of GCC". This also says the solution would be:-
[url]http://gcc.gnu.org/faq.html#gas[/url]

I have no clue what this is saying and I hope you guys can shed some light on it.

Thanks,
Kewlemer

What does "gcc -v" give you?

Anonymous (not verified)
on
April 7, 2005 - 3:28am

What does "gcc -v" give you?

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.