In this tutorial, I will show you how to compile from source and install the current stable version of GCC with Graphite loop optimizations on your OS X computer. The instructions from this tutorial were tested with Xcode 6.3.1 and Yosemite (OS X 10.10).
Gcc is not a problem,, gdb IS.
Gdb has been broken for some time, and Eclipse STIlL does not support lllvm debugger, so development on OS X with eclipse is dead at the moment, that’s why I had to switch to Xcode
In what way is it broken?
I say this as someone who almost never uses a debugger so I don’t know anything about why GDB would be broken for its own compiler.
Well, at least for me it is not broken.
There are some things that could improve it, for example, better multi-threading support (gdb has a basic support for it and, I suppose, the main problems about debugging in this scenario is intrinsic to its hard nature), a better graphical interface would help, support to script languages, faster code execution of apps being debugged, better support for plugins and analysis tools (this is something people were asking, I had never needed these, at least yet), but it does get the job done.
lldb was created to solve these problems. I have no knowledge if it succeed, though, as I use Linux for development and it is not integrated with the tools I’m using (to the extent of my knowledge).
The last time I read about it remote debugging was missing (another feature I never used).
(Checked on http://lldb.llvm.org/status.html, it seems remote debugging is still missing, at least on released versions)
Or you can use Visual Studio that have all of the above mentioned.
It’s not broken, it’s just bad. lldb from the LLVM project solves all the problems, and is what Xcode use these days.
For me, the most important lldb improvement over gdb is excellent std-lib value rendering and a great command processor that seems to be compatible with my workflow.
Edited 2015-05-02 20:58 UTC
Eclipse/gdb nearly always end up stuck in some sort of infinite loop on 10.9 and above, these used to work ok on 10.6
10.9 added a number of security measures that gdb does not seem compatible with.
I fundamentally need a debugger, when your developing numeric algorithms no way around it.
The Xcode UI is pretty stinking lame, but at least it works, just don’t know why eclipse can’t seem to get lldb support working, they’ve been working on it for what 2 years?
brew install homebrew/versions/gcc5
xD