LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 06-08-2005, 02:47 AM   #1
corbis_demon
Member
 
Registered: Jun 2004
Distribution: CLFS
Posts: 523

Rep: Reputation: 38
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.
 
Old 06-08-2005, 06:23 AM   #2
llmmix
Member
 
Registered: Jun 2005
Posts: 73

Rep: Reputation: 15
http://www.diy-linux.org/

By the way, in debian unstable, gcc 4.0.0-9 ready to install.
vi /etc/apt/sources.list
..
aptitude 'u' '+' 'g' 'g'
 
Old 06-08-2005, 08:34 AM   #3
lowpro2k3
Member
 
Registered: Oct 2003
Location: Canada
Distribution: Slackware
Posts: 340

Rep: Reputation: 30
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!
 
  


Reply



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
Building cross-compiler gcc for powerpc-linux ccool Linux - General 3 09-17-2004 06:33 AM
building from source Protex Slackware 2 02-24-2004 08:26 PM
Compiler conundrum: Which came first, a compiler, or it's source code? fr0zen Programming 21 01-29-2004 04:31 AM
Building an ARM7 cross compiler from gcc Charlie_B Linux - Software 2 08-20-2003 08:59 AM
new compiler, still no source icyfire Linux - Newbie 8 02-20-2002 07:37 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 10:52 PM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration