4

This maybe a little silly question but I am very confused

executing pkgutil in shell I get

$ pkgutil --pkg-info=com.apple.pkg.CLTools_Executables
package-id: com.apple.pkg.CLTools_Executables
version: 6.1.1.0.1.1416017670

the above tells me version 6.1

and gcc version in shell tells

$ gcc --version
Configured with: --prefix=/Library/Developer/CommandLineTools/usr --with-gxx-include-dir=/usr/include/c++/4.2.1
Apple LLVM version 6.0 (clang-600.0.56) (based on LLVM 3.5svn)
Target: x86_64-apple-darwin13.1.0
Thread model: posix

This says LLVM version 6.0 , Can anyone explains what the above versions are telling are which version of what !!

migrated from programmers.stackexchange.com Feb 24 '15 at 9:59

This question came from our site for professionals, academics, and students working within the systems development life cycle.

  • 2
    Using gcc not llvm-gcc with Mac OS X Lion: "As of Xcode 4.2 in Lion, Apple no longer ships its previous version of gcc-4.2, which was in Xcode 4.1 and earlier versions. It now only ships llvm-gcc (gcc front-end with llvm code backend) and clang (clang front-end with llvm backend)." – user24239 Feb 23 '15 at 16:05
  • I am on OSx Mavericks . – Ciasto piekarz Feb 23 '15 at 16:06
  • the thing is, gcc isn't gcc on a mac and hasn't been for a very long time. Unless you take special steps to do otherwise, invoking gcc on a mac is actually clang/llvm running in a mode that is compatible with gcc's options. – user24239 Feb 23 '15 at 16:08
  • duh, so Apple did it to support API that are specifically meant for OSx development ? – Ciasto piekarz Feb 23 '15 at 16:11
  • 1
    clang is intended for toolchain use (making it ideal for use in xcode). (See Is there a way to use gcc as a library?) Apple has decided to only expend effort to support one open source compiler, and an open source compiler that is trivially compatible with integration on their systems (rather than the GPL v3 of gcc). See also Why is FreeBSD deprecating GCC in favor of Clang/LLVM? though note that is a few years out of date (llvm has come a quite a ways since then). – user24239 Feb 23 '15 at 16:14

You must log in to answer this question.

Browse other questions tagged .