<div dir="ltr">Ah, that explains why Esteban did not find the same flags as me.<br><a href="http://smallissimo.blogspot.fr/2013/02/compiling-squeak-cog-virtual-machine-on.html">http://smallissimo.blogspot.fr/2013/02/compiling-squeak-cog-virtual-machine-on.html</a><br>
I never understood he was not really using gcc but a facade to clang!<br></div><div class="gmail_extra"><br><br><div class="gmail_quote">2013/10/5 Göran Krampe <span dir="ltr">&lt;<a href="mailto:goran@krampe.se" target="_blank">goran@krampe.se</a>&gt;</span><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><br>
On 10/05/2013 07:25 PM, Tobias Pape wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Am 05.10.2013 um 19:07 schrieb Göran Krampe &lt;<a href="mailto:goran@krampe.se" target="_blank">goran@krampe.se</a>&gt;:<div><div class="h5"><br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
On 10/05/2013 12:31 PM, Tobias Pape wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Am 05.10.2013 um 11:48 schrieb Göran Krampe &lt;<a href="mailto:goran@krampe.se" target="_blank">goran@krampe.se</a>&gt;:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
PPS. Also tried using GCC 4.8.1 and 4.9, but then the compiled VM throws &quot;Bus error: 10&quot; at me. Note that it compiles using the switches for clang then... (Esteban and Igor - we need a nice way of switching compiler in CMakeVMMaker!)<br>

</blockquote>
<br>
You typically do that with the CMake invocation yourself like in:<br>
<br>
CC=&quot;clang -m32&quot; CXX=&quot;clang++ -m32&quot; cmake $SRCDIR<br>
cmake --build $BUILDDIR<br>
</blockquote>
<br>
Well, let me just say that the framework building the sources adds lots of switches for compiling the VM and also sometimes adjusts for different plugins etc.<br>
</blockquote>
<br></div></div>
Yes, clearly.<br>
The point is here, that CMake tries to match make insofar it<br>
respects the CC and CXX environment variables.<br>
   That is, when you want to switch the compiler for CMake,<br>
you announce it by setting the environment variables[1]<br>
This should  even work when CMake itself is run by a build script, so you<br>
say<br>
<br>
   CC=&quot;clang -m32&quot; ./build.sh<br>
<br>
<br>
All other switches should be unaffected by this.<br>
</blockquote>
<br>
Sure, but that is the whole problem :). The current sources generated by the Pharo setup has a range of switches that makes it compile fine with clang, specifically made for clang. (on OSX)<br>
<br>
Now... if I throw in gcc 4.8.1 or 4.9, it produces a VM that bombs when I run it. I suspect it is because the specific combo of switches that makes clang dance (and Esteban reportedly did a lot of test-and-try to find that specific combo) also makes GCC produce bad VMs.<br>

<br>
Granted, it could be some other reason. :)<br>
<br>
But it would be nice to keep both sets of &quot;working switches&quot; in the code, instead of just a single set.<br>
<br>
regards, Göran<br>
</blockquote></div><br></div>