Two more suggestions (off-topic to the profiling point, but on topic to the idea of speeding up builds involving invocations of GCC):
ccache: http://ccache.samba.org/ "ccache is a compiler cache. It speeds up recompilation by caching previous compilations and detecting when the same compilation is being done again. Supported languages are C, C++, Objective-C and Objective-C++." distcc: http://code.google.com/p/distcc/ "distcc is a program to distribute builds of C, C++, Objective C or Objective C++ code across several machines on a network. distcc should always generate the same results as a local build, is simple to install and use, and is usually much faster than a local compile."