On 06/12/2014 02:57 PM, Karen Etheridge wrote:
On Thu, Jun 12, 2014 at 09:28:29AM -0500, Reini Urban wrote:
I'm calling prelbrew with -Acc=cc on MacOS to ensure cc (aka gcc) is
used rather than clang.  I don't set any spaces, either Perlbrew is
doing it or part of the Perl build.  I'm not sure how to progress from
here.

That is actually fragile and most likely wrong.
cc == gcc == clang in /usr/bin.

On one of my machines, at least (2009 MBP running OS 10.6.8), this is not so:

: [ether@tequila ]$; ls -l /usr/bin/{cc,gcc,clang,gcc-4.2}
lrwxr-xr-x  1 root  wheel         7 27 Dec  2011 /usr/bin/cc -> gcc-4.2
-rwxrwxr-x  1 root  admin  44430720 15 Dec  2010 /usr/bin/clang
lrwxr-xr-x  1 root  wheel         7 27 Dec  2011 /usr/bin/gcc -> gcc-4.2
-rwxr-xr-x  1 root  wheel    166128 23 Oct  2010 /usr/bin/gcc-4.2

Only if your paths esp. point to a real local gcc you'll be fine.
My macports gcc is called gcc-mp-4.9

Try gcc --version to see if it's Apple crippled clang or your own gcc.

: [ether@tequila ]$; clang --version
Apple clang version 1.7 (tags/Apple/clang-77) (based on LLVM 2.9svn)
Target: x86_64-apple-darwin10
Thread model: posix

: [ether@tequila ]$; gcc --version
i686-apple-darwin10-gcc-4.2.1 (GCC) 4.2.1 (Apple Inc. build 5666) (dot 3)


However, on a newer MBP (running 10.8):

: [ether@bourbon ]$; ls -l /usr/bin/{cc,gcc,clang}
lrwxr-xr-x  1 root  wheel         5 22 Jul  2013 /usr/bin/cc -> clang
-rwxr-xr-x  1 root  wheel  26311808 22 Jul  2013 /usr/bin/clang
lrwxr-xr-x  1 root  wheel        12 22 Jul  2013 /usr/bin/gcc -> llvm-gcc-4.2

: [ether@bourbon git/misc]$; gcc --version
i686-apple-darwin11-llvm-gcc-4.2 (GCC) 4.2.1 (Based on Apple Inc. build 5658) 
(LLVM build 2336.11.00)

Thanks.
They changed it around 10.7 or 10.8, with an XCode update.

And they didn't include the newer clang -fsanitize runtime, even if their --help lies about it, so you have to use your own clang.
Even on 10.9 with a new 3.4 clang.


Reply via email to