What is more important CPU or RAM for compiling large software, e.g. bootstrapping gcc?
I would say neither. Rather get a fast SSD hard drive. Of course you need a proper CPU and amount of RAM as well, but yeah...
Probably RAM will give you a bigger bang for the buck. Compiling, especially large applications, is very I/O intensive, and having more RAM means you can save more time paging to and from disk. Most CPUs today, especially if you go with a cheap quad-core, will provide plenty of CPU power for your compiling, but having the RAM will help with the data going back and forth.
On 2nd thought, it sort of depends on your math simulations and build processes. Are they parallelizable? If not, adding more cores won't really do anything to speed it up, although the new Intel chips (Core i7) are quite fast on a per-core basis.
I'd say get loads and loads of RAM and use ramdisks for temporary storage. This will dramatically increase speed of compilation. A fast multi-core CPU would be fine too, but I think that you'd benefit more from lots of ram. Take a look at this article for some ideas. Here's some more information and some more here. I think that using RAM will be faster than using SSD, but I could be wrong.