[Vm-dev] The Mac VM (pharo)

Tobias Pape Das.Linux at gmx.de
Thu Sep 26 07:56:33 UTC 2013


Hi Eliot

Am 26.09.2013 um 09:26 schrieb Eliot Miranda <eliot.miranda at gmail.com>:

> Hi Göran,
> 
> 
> On Thu, Sep 26, 2013 at 12:21 AM, Göran Krampe <goran at krampe.se> wrote:
> 
>> 
>> Hey!
>> 
>> (nice to meet at ESUG btw)
>> 
[…]
>> 
>> gcc --version
>> Configured with: --prefix=/Applications/Xcode.**app/Contents/Developer/usr
>> --with-gxx-include-dir=/usr/**include/c++/4.2.1
>> Apple LLVM version 5.0 (clang-500.2.76) (based on LLVM 3.3svn)
>> Target: x86_64-apple-darwin12.5.0
>> Thread model: posix
>> 
[…]
>> clang --version
>> Apple LLVM version 5.0 (clang-500.2.75) (based on LLVM 3.3svn)
>> Target: x86_64-apple-darwin12.5.0
>> Thread model: posix
>> 
>> (I removed some copyright notices from the above)
>> 
>> setGlobalOptions: maker
>>> 
>>>   super setGlobalOptions: maker.
>>>   maker set: 'CMAKE_C_COMPILER' to: 'clang'.
>>>   maker set: 'CMAKE_CXX_COMPILER' to: 'clang'.
>>> 
>> 
>> AFAICT "clang" is the same as "gcc", no? See my printouts above. The only
>> difference seem to be the added prefix/include-dir config.
>> 
> 
> No; very different.  I'm not an expert but I think essentially clang is
> Apple's C compiler that uses the LLVM backend, and gcc is good old gcc.

Not on a default Mac Xcode installation.
See my OSX 10.8 + Xcode 4.x installation:

$ ls -al $(which gcc)
lrwxr-xr-x  1 root  wheel  12 24 Apr 16:42 /usr/bin/gcc -> llvm-gcc-4.2

But with Xcode 5, no gcc (be it a pure gcc-4.2 or a llvm backed gcc)
ships. gcc is linked to clang.

It is a problem of default naming. From Xcode 5 on, if you don't change
a thing, "gcc" will get you "clang".


> Right now Cog doesn't run if compiled with clang.  Only gcc will do.  No
> time to debug this right now, and annoyingly clang compiles all static
> functions with a non-standard calling convention which means one can;t call
> these functions in gdb, hence lots of debugging functions aren't available
> without either a) turning off the optimization or b) changing the VM source
> so they're not static.

you might want to try lldb, that ships with Xcode and is based on the
llvm/clang tool chain. I am not implying it is better than gcc but
maybe it can help in your situation?

> I prefer a). If anyone knows of a flag to do this
> *please* let me know asap.


Best
	-Tobias


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 203 bytes
Desc: Message signed with OpenPGP using GPGMail
Url : http://lists.squeakfoundation.org/pipermail/vm-dev/attachments/20130926/656e29ab/signature.pgp


More information about the Vm-dev mailing list