Click to See Complete Forum and Search --> : egcs & ggc & 2.40 in rht7.0 ?


asymblor
01-31-2001, 12:39 AM
Greetings fellow penguinistas 8-),

In the kernel 2.4.0 changes file it recommends the egcs 1.1.2 (gcc 2.91.66) compilier and discourages the use of gcc 2.95 and later. I have redhat 7.0 (just switched from mandrake 7.0 in which I compilied and installed kernels b4), now when I do a
gcc --version it tells me I have v2.96 gcc in /sbin and when I do a egcs --version in /usr/bin I have egcs-2.91.66. Does this mean I have 2 different compiliers? one recommended for compiling kernel 2.4.0(egcs-1.1.2) and one not recommended gcc-2.96 . If this is the case how do I cause the proper compilier (egcs 1.1.2..gcc-2.91.66) to be invoked for compiling the kernel? If it has to be done by configuring the Makefile, can someone explain how to do this? perhaps e-mail me their makefile as an example(redhat 7.0 standard intel) or just post it. Because if this is the case then in njcajun's My steps to building and installing the 2.4 kernel in rht 7.0..his step to upgrade to gcc-2.96.69 is not only unnescessary for compiling 2.4.0 but might not be a good idea( no offense if you read this Brian--just trying to clear up some confusion on my part ).

Thank You,

Andrew a.k.a asymblor

getclean@hotmail.com

PLBlaze
01-31-2001, 01:22 AM
Try this, CC=egcs then export CC from the prompt then proceed to compiling your kernel...keep in mind though that this variable will be used for any source you compile untill you logout unless you unset it.If you prefer to modify the kernel Makefile then look for a CC (line 29) and modify it there.Hope this helps.

asymblor
01-31-2001, 11:10 AM
Since I posted my compilier questions, I have found the necessary information. Yes both compiliers are included (both gcc-2.96 and egcs-1.1.2(gcc-2.91.66). To use compilier recommended in the kernel-2.4.0 changes file(egcs-1.1.2(gcc-2.91.66)) edit the kernel-2.4.0 Makefile as follows:

locate this line in the Makefile:

CC =$(cross_compile)gcc -D_Kernel_ -I$(Hpath)

and change the gcc to kgcc.

CC =$(cross_compile)kgcc -D_Kernel_ -I$(Hpath)


But before anything go here:
http://www.redhat.com/support/docs/gotchas/7.0/gotchas-7-6.html

So anybody who has read the My steps to building and installing the 2.4 kernel in Redhat 7.0 in the NHF's should take note that his step to upgrade his compilier to gcc-2.96.69 is not necessary and not recommended to compile Kernel 2.4.0 as the correct compilier is already installed in Rht 7.0.

Thanx,

Andrew a.k.s asymblor