tags:

views:

54

answers:

3

I'm currently trying to get g++ working, and looking at http://gcc.gnu.org/install/build.html, I can't seem to find where it says how "to perform a 3-stage bootstrap of the compiler". Where would I find this information?

(I'm on a mac, in case that matters.)

A: 

From that link:

For a native build, the default configuration is to perform a 3-stage bootstrap of the compiler when `make' is invoked.

It seems to me that if your configuration isn't tweaked, it should do it out of the box. Just type make.

More specifically, you have to download the source code, and follow the instructions in that whole tutorial in order to build.

A side note - I am finding it hard to believe that there is no easy way to get GCC on an OSX box without having the installation media. That sounds really annoying :)

Edit:

If you are simply trying to write C++ on OSX, you could install one of many other IDEs. If you are lucky, they may come with their own compiler. Here is a list of alternatives to XCode:

http://alternativeto.net/desktop/xcode/?profile=mac&platform=mac

Merlyn Morgan-Graham
Well, for the next stage listed, the site says to install it with "cd objdir; make install", but terminal says it recognizes neither objdir nor make. Do you know what that means?
Ricky Demer
+1  A: 

After running configure, you do make bootstrap

R Samuel Klatchko
ip##-#-##-##:~ rickyd$ make bootstrap-bash: make: command not found
Ricky Demer
@Ricky Demer you need to install "make" program
Mr Shunz
I see "Make-lang.in", "Makefile.am", and "Makefile.in", none of which have a default application specified to open. Are you talking about one of these?
Ricky Demer
A: 

You cannot bootstrap GCC without an already-functioning compiler on your platform:

From the prerequisites page:

ISO C90 compiler
Necessary to bootstrap GCC, although versions of GCC prior to 3.4 also allow bootstrapping with a traditional (K&R) C compiler.

And to preempt your next question, you also need a functioning compiler (usually GCC) in order to build Clang+LLVM.

It might be possible to do what you're trying so hard to do, by cross-compiling GCC from some other platform (see this section of the documentation). But I imagine this is not for the feint of heart, and you'd be far, far better off simply updating your copy of Mac OS X to the latest version with Xcode support.

Dean Harding
Well, do you know if there are any free open-source licensed c++ compilers for mac where I wouldn't already need another compiler? It wouldn't necessarily have to be GCC. _ _ _ _ P.S. How do you have the text shown be different from the website the link directs to?
Ricky Demer