我回答对较新的版本(其中工具实际上是在Xcode.app PKG,但我敢肯定的是,如果路径和输出返回的xcode-select -p
,gcc -v
和llvm-gcc -v/clang -v
是和谐的,他们应该是相同的,即
$ xcode-select -p
/Applications/Xcode.app/Contents/Developer
$ gcc -v
Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/usr/include/c++/4.2.1
Apple LLVM version 6.1.0 (clang-602.0.49) (based on LLVM 3.6.0svn)
Target: x86_64-apple-darwin14.3.0
Thread model: posix
$ llvm-gcc -v
Apple LLVM version 6.1.0 (clang-602.0.49) (based on LLVM 3.6.0svn)
Target: x86_64-apple-darwin14.3.0
Thread model: posix
$ clang -v
Apple LLVM version 6.1.0 (clang-602.0.49) (based on LLVM 3.6.0svn)
Target: x86_64-apple-darwin14.3.0
Thread model: posix
请注意,llvm-gcc是clang的链接,
$ls -al /usr/bin/llvm-gcc
lrwxr-xr-x 1 root wheel 5 Oct 19 2014 /usr/bin/llvm-gcc -> clang
因此,尽管您可能会(也可能不会)看到llvm-gcc -v
和的输出clang -v
相同(有关更多详细信息,请参见/programming//a/5708732/602581)
xcode command line tools installed version
但是找到了许多无关的匹配项。顺便说一句,Dog G.的答案对您有用吗?