-   Programming (
-   -   Building compiler from source (

corbis_demon 06-08-2005 03:47 AM

Building compiler from source
Hi, I want to build GCC 4.0.0 from source. I don't have any other compiler installed on my system. How do I go about the job? I heard that it's possible to build it even without a compiler. PLease advise.

llmmix 06-08-2005 07:23 AM

By the way, in debian unstable, gcc 4.0.0-9 ready to install.
vi /etc/apt/sources.list
aptitude 'u' '+' 'g' 'g'

lowpro2k3 06-08-2005 09:34 AM

You can't 'build from source' without a prior compiler. Installing a compiler is a fairly big task to set up correctly, you might want to look into a package management system to do it for you. Specifically you need at least the required versions of binutils, and an up-to-date C library (glibc).

If you want to roll your own 4.x.x series from source, use your distro's package management service to get an older 3.4.x series compiler (or just use the CDs and install development tools), then use that compiler to compile the latest compiler. It might be a good idea to have a 3.xx series compiler residing alongside a 4.0.x series compiler, in case the newer doesnt always work as you hoped. If you just want the latest compiler because you need a compiler, its probably a heck of a lot easier to use package management and forget compiling from source. Compilers are written in C so you obviously need a C compiler to compile them.

Hope that helped!

All times are GMT -5. The time now is 01:48 PM.