2

I'm running Lion. I have these two versions of gcc that both claim to be the same thing, but diff claims that the binaries differ. I am trying to understand the situation with gcc on OS X. What is the difference between them?

$ /usr/bin/gcc-4.2 --version
i686-apple-darwin11-llvm-gcc-4.2 (GCC) 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2336.9.00)
Copyright (C) 2007 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

$ /usr/bin/i686-apple-darwin11-llvm-gcc-4.2 --version
i686-apple-darwin11-llvm-gcc-4.2 (GCC) 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2336.9.00)
Copyright (C) 2007 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

$ diff /usr/bin/gcc-4.2 /usr/bin/i686-apple-darwin11-llvm-gcc-4.2
Binary files /usr/bin/gcc-4.2 and /usr/bin/i686-apple-darwin11-llvm-gcc-4.2 differ
Floern
  • 33,559
  • 24
  • 104
  • 119
speedarius
  • 1,006
  • 1
  • 8
  • 15
  • Is one a hard link to the other, not sure how you can check if a file is a hard link or not. Though I would think that diff would not not treat the hard link as the original file, in effect doing a compare with itself. – Nathan Day Aug 22 '12 at 07:54

0 Answers0