Include -lpthread on the link line automatically only for C++

It's not necessary for C-only programs, only when using libc++.

Use %clangxx rather than %clang in the C++ tests because just changing
the language (-x c++) doesn't change the linker behavior (i.e. the
CCCIsCXX() check).

R=jvoung@chromium.org
BUG= https://code.google.com/p/nativeclient/issues/detail?id=4088

Review URL: https://codereview.chromium.org/964923003
2 files changed