LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Compiling gcc without any gcc installed (https://www.linuxquestions.org/questions/linux-software-2/compiling-gcc-without-any-gcc-installed-408993/)

my_kappa 01-28-2006 01:11 PM

Compiling gcc without any gcc installed
 
Anyone got an idea how to compile a gcc from scratch without having any gcc/other C-Compiler installed? I've heard that I have to use some unoptimized-precompiled binary to compile the real compiler, but I have no idea where to get such a thing.

I am looking forward to your replies!

ntubski 01-28-2006 01:39 PM

By your profile you have Debian, so you should be able to do:
apt-get install gcc
I believe you'll also need make to compile a standard source tarball:
apt-get install make

Although it's generally easier to just apt-get install rather than compiling...

my_kappa 01-29-2006 03:52 AM

Yeah, sure, I would do so if I had Debian installed on the machine I wish to have gcc on. But on that machine is a very plain Linux, since it is only a 386 w/ 4mb of RAM.

caspervn 01-29-2006 09:13 AM

Quote:

Originally Posted by my_kappa
Yeah, sure, I would do so if I had Debian installed on the machine I wish to have gcc on. But on that machine is a very plain Linux, since it is only a 386 w/ 4mb of RAM.

very simple, you just use a live CD like Knoppix :p
But I'm not still try about this so it may be wrong :confused:

my_kappa 01-29-2006 11:17 PM

Hm, lauching Knoppix would be difficult since there is no CD-ROM drive.

btmiller 01-30-2006 12:15 AM

Also, Knoppix wouldn't run on such an old machine (particularly since it caches a lot in RAM -- I doubt you could even start the kernel with 4 MB).

In fact, I'm not sure if gcc is evcen going to run with anything approaching tolerable speed on a machine that old. But if you want to try there are a number of sites with gcc binaries available. What distro of Linux is on your system (or is it LFS)? If it's from scratch, you will probably just have to find a generic binary (or use a distro's binary), otherwise use the gcc packaged with your distro.


All times are GMT -5. The time now is 06:39 PM.