

Cat *.c &gt;tmp.c && gcc -O3 -fwhole-program $YOURFLAGS -o ohmygawditsfast tmp.c - mrpixel

This will get you warp-speed if there're no clashes. -Os instead of -O3 makes another wet dream come true (guess which).
======
wtallis
Or, just use LLVM's link time optimization:

<http://llvm.org/docs/LinkTimeOptimization.html>

~~~
mrpixel
GCC is going to have that, too.

<http://gcc.gnu.org/wiki/LinkTimeOptimization>

~~~
neilc
In fact, it already does have it: LTO is supported by GCC 4.5.0, which was
released in April. (Although a bunch of LTO improvements will be included in
the forthcoming GCC 4.6 release.)

------
amock
It's not a C compilers, but Mlton is an interesting SML whole program
compiler. There's also JHC for Haskell which is nifty but can't quite compile
all Haskell programs. I also found the Stalin Scheme compiler very interesting
since it seems like a whole program compiler for a dynamically typed language
like Scheme should be able to do a lot of interesting things.

------
leppie
Why not just pass *.c to gcc ? Same thing isn't it?

~~~
mrpixel
I'm afraid it's not. GCC still compiles them separately. It generates a bunch
of object files in /tmp and links them as usual.

~~~
leppie
Thanks, didn't know that. I thought it would have been the same.

