maven-nar/cpptasks-parallel — pull request #15 by ctrueden (2013-11-21 09:00:24+00:00)
Title: Clang static linking

On OS X 10.9 Mavericks, LLVM with clang is now used. This branch adds case logic to the `GppLinker` implementation to handle clang's incompatibilities with gcc, notably the unsupported `-static-libgcc` and `-shared-libgcc` flags.

I am far from a C++ expert, so would appreciate code review here. In particular, I suspect that simply suppressing the `-lstdc++-static` flag is the wrong solution. (10.9 also uses libc++ instead of libstdc++ now; so should that be `-lc++-static` instead?)

Note that the first three commits are merely to support the new `isClang()` method of `GppLinker`, which needs to call out to `g++ --version` to check that. The `CaptureStreamHandler` previously had an annoying limitation where `CaptureStreamHandler.run` would return only stderr if it was nonempty—and `g++ --version` happens to return a mixture of stderr and stdout. So now the `execute` method provides a way to request stdout specifically, which is what we need here.