[Vm-dev] The Mac VM (pharo)

Eliot Miranda eliot.miranda at gmail.com
Thu Sep 26 08:06:53 UTC 2013


Hi Tobias,


On Thu, Sep 26, 2013 at 12:56 AM, Tobias Pape <Das.Linux at gmx.de> wrote:

>
> 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".
>

I think you miss my point, which is that the clang compiler is very
different (it uses LLVM for its code generator) than gcc.  That apple calls
clang gcc is neither here-nor-there.  If you get a real gcc it will compile
a functional VM.  If you get a clang-based compiler it won't.  Do you agree?


> > 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?
>

Thanks, that sounds promising!


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


-- 
best,
Eliot
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/vm-dev/attachments/20130926/8ee43183/attachment.htm


More information about the Vm-dev mailing list