The entire Linux kernel source tree will trivially fit in tmpfs in RAM.
On one of these systems I'm fairly sure you could just whack the entire thing in /tmp and -j64 it, the compile artifacts aren't that big either.
On one of these systems I'm fairly sure you could just whack the entire thing in /tmp and -j64 it, the compile artifacts aren't that big either.