Sorry, missed the earlier ping.

I think the correct way to do this is:

 * add a `:cxx` mode to the cc wrapper: https://github.com/mxcl/homebrew/blob/f4465589520f854b5e8ef31efb2b776d46d153ba/Library/ENV/4.3/cc#L44-L76

 * add a flag to HOMEBREW_CCCFG that tells the wrapper when to use `libc++`; only set the flag when using clang

 * in ldflags, add the correct flag based on the mode (`:cxx`) and `cccfg?` flag.