is it possible to build a completely static clang?

Hi,

Top level question: is it possible to set up a configuration of clang so that it build completely statically-linked programs? (Drivers forking themselves isn't a problem, it's doing any kind of dynamic loading of code). From the optiosn I've tried sticking "-static" and "--enable-static" everywhere this doesn't work.

The reason I want to do this is using gcc's -finstrument-functions in order to trace which functions are being called when, but there are lots of "function addresses" it can't interpret, I think because of magic PLT stuff which would go away in a completely static build.

many thanks,
David

Top level question: is it possible to set up a configuration of clang so that it build completely statically-linked programs? (Drivers forking themselves isn't a problem, it's doing any kind of dynamic loading of code). From the optiosn I've tried sticking "-static" and "--enable-static" everywhere this doesn't work.

Sorry: this came out slightly unclear. I want to build the clang executable, and any executables it calls, in doing its work of compiling so that they don't dynamically load any code. I'm not concerned with the executables that clang itself builds. I want to do this in order to track which functions are called when running clang in given circumstances.

Sorry for the garbledness