LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel
User Name
Password
Linux - Kernel This forum is for all discussion relating to the Linux kernel.

Notices

Reply
 
Search this Thread
Old 05-06-2009, 12:24 PM   #1
marsques
Member
 
Registered: Jan 2004
Location: Manchester
Distribution: slackware...
Posts: 344

Rep: Reputation: 31
Question GCC version?


I'm trying to compile a 2.4.37 kernel, however it comes up with an error saying the GCC version should be less than 4.2 .

The question is if I were to compile and install GCC 3.3.x in the /opt directory, how would I get the kernel to use the GCC installed there instead of GCC 4.2 which is in /usr/bin?

Thanks in advance.
 
Old 05-06-2009, 12:37 PM   #2
pljvaldez
Guru
 
Registered: Dec 2005
Location: Somewhere on the String
Distribution: Debian Squeeze (x86)
Posts: 6,092

Rep: Reputation: 269Reputation: 269Reputation: 269
On Debian, I've just replaced the symlink from /usr/bin/gcc from /usr/bin/gcc-4.2 to /opt/gcc-3.X. Not sure if that'll do it on Slackware, or if you also have to change some library paths...
 
Old 05-06-2009, 01:00 PM   #3
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2014.08, Slack14.1 DebWheezy, +50+ other Linux OS, for test only.
Posts: 13,941

Rep: Reputation: 2602Reputation: 2602Reputation: 2602Reputation: 2602Reputation: 2602Reputation: 2602Reputation: 2602Reputation: 2602Reputation: 2602Reputation: 2602Reputation: 2602
I think, you should try this : gcc34-3.4.6-i486-2compat.tgz
( gcc34-g++34-3.4.6-i486-2compat.tgz )
http://www.slackware.com/~alien/slac...cc34/pkg/12.0/
.... I'm using this in Slackware 12.2 .

No problem having 2-4 different gcc's, like in Debian,
examples .....

./configure CC=/usr/gcc34/bin/gcc34 CXX=/usr/gcc34/bin/g++34

( make CC=gcc34 , ... if you make a link to e.g. /usr/bin/ )
.....
For kernel compilation it may be necessary to replace the
/usr/bin/gcc link temporarely, like said by pljvaldez.
.....

Last edited by knudfl; 05-06-2009 at 01:25 PM.
 
Old 05-06-2009, 02:23 PM   #4
marsques
Member
 
Registered: Jan 2004
Location: Manchester
Distribution: slackware...
Posts: 344

Original Poster
Rep: Reputation: 31
Thanks for your replies.

Compiled 3.3.6 and installed it in /opt/ .

After a bit of reading around it appears I also require "i486-slackware-linux"
for the version of gcc i'm trying to install in /usr/lib/gcc and luckly this was
distributed with a slackware version, so downleaded the *.tgz package, extracted
the folder and placed it in /usr/lib/gcc/i486-slackware-linux .

And...

~/gcc-3.3.6/configure --prefix=/usr --enable-shared
--enable-languages=ada,c,c++,objc --enable-threads=posix --enable-__cxa_atexit
--disable-checking --with-gnu-ld --verbose --with-arch=i486
--target=i486-slackware-linux --host=i486-slackware-linux

(Did gcc -v to get the above and modified it for 3.3.6) also doing this speeded
up compilation drastically compared to when I tried to compile 4.1.2 using just
~/gcc-4.1.2/configure --prefix=/opt only.

It also appears to compile the kernel I had to amend the CROSS_COMPILE in the Makefile as per below.

CROSS_COMPILE = /opt/gcc/bin/

Also symlink the following to point to : -

ar -> /usr/bin/ar
as -> /usr/bin/as
ld -> /usr/bin/ld
objcopy -> /usr/bin/objcopy

Job done!

tools/build -b bbootsect bsetup compressed/bvmlinux.out CURRENT > bzImage
Root device is (22, 3)
Boot sector 512 bytes.
Setup is 2513 bytes.
System is 1038 kB
warning: kernel is too big for standalone boot from floppy

Any ideas why 1038kB is too big for a floppy when a floppy can hold nearly 1474kB?
 
Old 05-07-2009, 04:33 AM   #5
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2014.08, Slack14.1 DebWheezy, +50+ other Linux OS, for test only.
Posts: 13,941

Rep: Reputation: 2602Reputation: 2602Reputation: 2602Reputation: 2602Reputation: 2602Reputation: 2602Reputation: 2602Reputation: 2602Reputation: 2602Reputation: 2602Reputation: 2602
Quote:
warning: kernel is too big for standalone boot from floppy
Not an error, just a warning.
? Old lilo convention, bzImage max 512 KB ..... ?
I remember that, its long time ago.

Just google .. kernel too big for a floppy ..
to get lots of hits, e.g.
http://lists.us.dell.com/pipermail/l...er/004579.html
http://lkml.indiana.edu/hypermail/li...02.0/0867.html
.....
 
Old 05-10-2009, 03:18 PM   #6
marsques
Member
 
Registered: Jan 2004
Location: Manchester
Distribution: slackware...
Posts: 344

Original Poster
Rep: Reputation: 31
After a bit of digging around it appears to be down to inodes.

A floppy has around 184 inodes but when you make it bootable it uses up a high proportion of inodes compared storage space.

In my case the floppy which holds 1500 odd kB after making it bootable with a kernel of 800 oddish kB has only around 20 inodes remaining.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Regarding distribution + kernel version + gcc version + glib version. JCipriani Linux - General 8 04-19-2008 02:54 PM
Installed GCC version doesn't match the version the kernel was compiled with AlucardZero Linux - Software 2 02-07-2008 10:24 AM
redhat fedora gcc version (compiled for 2.4.20) doesn't match kernel version 2.4.22 start1000 Linux - Software 0 03-16-2004 08:17 PM
export CC=/usr/bin/gcc-3.2 - switch gcc version? ferreter Linux - Software 1 08-20-2003 12:07 AM
Sample Driver Module incompatibility with Kernel version (or gcc version) jvs Linux - General 1 06-07-2002 01:40 AM


All times are GMT -5. The time now is 12:21 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration