<div dir="ltr">Hi Tobias,<br><div class="gmail_extra"><br><br><div class="gmail_quote">On Thu, Sep 26, 2013 at 12:56 AM, Tobias Pape <span dir="ltr">&lt;<a href="mailto:Das.Linux@gmx.de" target="_blank">Das.Linux@gmx.de</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"> <br>Hi Eliot<br>

<br>
Am 26.09.2013 um 09:26 schrieb Eliot Miranda &lt;<a href="mailto:eliot.miranda@gmail.com">eliot.miranda@gmail.com</a>&gt;:<br>
<br>
&gt; Hi Göran,<br>
&gt;<br>
&gt;<br>
&gt; On Thu, Sep 26, 2013 at 12:21 AM, Göran Krampe &lt;<a href="mailto:goran@krampe.se">goran@krampe.se</a>&gt; wrote:<br>
&gt;<br>
&gt;&gt;<br>
&gt;&gt; Hey!<br>
&gt;&gt;<br>
&gt;&gt; (nice to meet at ESUG btw)<br>
&gt;&gt;<br>
[…]<br>
&gt;&gt;<br>
&gt;&gt; gcc --version<br>
&gt;&gt; Configured with: --prefix=/Applications/Xcode.**app/Contents/Developer/usr<br>
&gt;&gt; --with-gxx-include-dir=/usr/**include/c++/4.2.1<br>
&gt;&gt; Apple LLVM version 5.0 (clang-500.2.76) (based on LLVM 3.3svn)<br>
&gt;&gt; Target: x86_64-apple-darwin12.5.0<br>
&gt;&gt; Thread model: posix<br>
&gt;&gt;<br>
[…]<br>
&gt;&gt; clang --version<br>
&gt;&gt; Apple LLVM version 5.0 (clang-500.2.75) (based on LLVM 3.3svn)<br>
&gt;&gt; Target: x86_64-apple-darwin12.5.0<br>
&gt;&gt; Thread model: posix<br>
&gt;&gt;<br>
&gt;&gt; (I removed some copyright notices from the above)<br>
&gt;&gt;<br>
&gt;&gt; setGlobalOptions: maker<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt;   super setGlobalOptions: maker.<br>
&gt;&gt;&gt;   maker set: &#39;CMAKE_C_COMPILER&#39; to: &#39;clang&#39;.<br>
&gt;&gt;&gt;   maker set: &#39;CMAKE_CXX_COMPILER&#39; to: &#39;clang&#39;.<br>
&gt;&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt; AFAICT &quot;clang&quot; is the same as &quot;gcc&quot;, no? See my printouts above. The only<br>
&gt;&gt; difference seem to be the added prefix/include-dir config.<br>
&gt;&gt;<br>
&gt;<br>
&gt; No; very different.  I&#39;m not an expert but I think essentially clang is<br>
&gt; Apple&#39;s C compiler that uses the LLVM backend, and gcc is good old gcc.<br>
<br>
Not on a default Mac Xcode installation.<br>
See my OSX 10.8 + Xcode 4.x installation:<br>
<br>
$ ls -al $(which gcc)<br>
lrwxr-xr-x  1 root  wheel  12 24 Apr 16:42 /usr/bin/gcc -&gt; llvm-gcc-4.2<br>
<br>
But with Xcode 5, no gcc (be it a pure gcc-4.2 or a llvm backed gcc)<br>
ships. gcc is linked to clang.<br>
<br>
It is a problem of default naming. From Xcode 5 on, if you don&#39;t change<br>
a thing, &quot;gcc&quot; will get you &quot;clang&quot;.<br></blockquote><div><br></div><div>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&#39;t.  Do you agree?</div>
<div> </div><blockquote class="gmail_quote" style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">&gt; Right now Cog doesn&#39;t run if compiled with clang.  Only gcc will do.  No<br>

&gt; time to debug this right now, and annoyingly clang compiles all static<br>
&gt; functions with a non-standard calling convention which means one can;t call<br>
&gt; these functions in gdb, hence lots of debugging functions aren&#39;t available<br>
&gt; without either a) turning off the optimization or b) changing the VM source<br>
&gt; so they&#39;re not static.<br>
<br>
you might want to try lldb, that ships with Xcode and is based on the<br>
llvm/clang tool chain. I am not implying it is better than gcc but<br>
maybe it can help in your situation?<br></blockquote><div><br></div><div>Thanks, that sounds promising!</div><div> </div><blockquote class="gmail_quote" style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">

<br>
&gt; I prefer a). If anyone knows of a flag to do this<br>
&gt; *please* let me know asap.<br>
<br>
<br>
Best<br>
        -Tobias<br>
<br>
<br>
<br></blockquote></div><br><br clear="all"><div><br></div>-- <br>best,<div>Eliot</div>
</div></div>