<br><br><div class="gmail_quote">On Thu, Jul 22, 2010 at 8:06 PM, Eliot Miranda <span dir="ltr">&lt;<a href="mailto:eliot.miranda@gmail.com">eliot.miranda@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">

 <br>Hi Geoffroy,<br><br><div class="gmail_quote">On Thu, Jul 22, 2010 at 10:34 AM, Geoffroy Couprie <span dir="ltr">&lt;<a href="mailto:geo.couprie@gmail.com" target="_blank">geo.couprie@gmail.com</a>&gt;</span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
 <br>Hello,<br><br><div class="gmail_quote">On Thu, Jul 22, 2010 at 5:20 PM, Andreas Raab <span dir="ltr">&lt;<a href="mailto:andreas.raab@gmx.de" target="_blank">andreas.raab@gmx.de</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">




<div><div></div><div><br>
On 7/22/2010 4:55 AM, David T. Lewis wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
On Wed, Jul 21, 2010 at 08:49:19PM -0700, Eliot Miranda wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
But the more serious issue is that the configure in VMMaker is only suitable<br>
for linux.  I guess that the right thing to do for FreeBSD is to run make in<br>
platforms/unix/config to generate a FreeBSD-specific configure.  But I&#39;m out<br>
of my depth when it comes to autoconf.<br>
</blockquote>
<br>
Note that Ian moved to CMake for the unix builds, so autoconf is no longer<br>
used for building from the SVN trunk. In addition, Geoffroy Couprie has<br>
developed this further such that the VM can be built for both unix and<br>
Windows targets, see thread here:<br>
<br>
  <a href="http://lists.squeakfoundation.org/pipermail/vm-dev/2010-May/004574.html" target="_blank">http://lists.squeakfoundation.org/pipermail/vm-dev/2010-May/004574.html</a><br>
<br>
It&#39;s up to Ian and Andreas to say if they want to pursue this direction,<br>
but if you need the Cog build process to be more platform independent<br>
this would be a good thing to consider.<br>
</blockquote>
<br></div></div>
Personally, I&#39;ll be moving the Windows build back into MS land. All the reasons for using the MingW/GCC tool chain are gone by now:<br>
* Availability of the tool chain: There have been free versions of MSVC for years now, so this is no longer an issue.</blockquote><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">





* Performance of the VM: With the JIT, the performance difference between the compilers no longer matters.<br>
* Size of difficulty of the install: New versions of MingW are no easier to install than Cygwin or other monsters.<br></blockquote></div></blockquote><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">


<div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"></blockquote><div>MSYS is not that hard to install. And GCC can be use to cross compile, which is really useful for tests, continuous integration, etc.</div>


</div></blockquote><div><br></div><div>What about C++ compilation?</div></div></blockquote><div><br></div><div>I don&#39;t know what issues you encountered, but 3.4.5 was fine, 4.2 had broken exception handling, and 4.4 works well.</div>

<div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div class="gmail_quote"><div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

<div class="gmail_quote">


<div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
On the other hand, there are some exceptionally good reasons to use MSVC:<br>
* Debugging: Did you know that MSVC now has seemless in-place editing? When I worked on SqueakSSL, I was shocked to find that an access violation was simply presented as a break point and after fixing it the compiler patched the code in place without restarting Squeak, and it worked!<br>





* Up-to-date headers and libraries: SqueakSSL wouldn&#39;t compile on *any* version of MingW or Cygwin due to the absence / lack of correctness of the headers and missing libraries even though the APIs are 5+ years old.<br>


</blockquote></div></blockquote><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">




</blockquote><div>Did you check the recent headers? Most of the recent API (XP/Vista) are in the actual MinGW headers. The DirectX headers are a bit old, but considering you&#39;re using DirectX 7, I don&#39;t think that&#39;s an issue. What specific headers/libraries/functions are you talking about?</div>


</div></blockquote><div><br></div><div>The thread info block TIB isn&#39;t provided, a hack is required to get multi-monitor stuff to compile against directx7, CommandLineToArgvW doesn&#39;t appear to compile correctly.  WS_ACTIVECAPTION is not defined.  STACK_SIZE_PARAM_IS_A_RESERVATION is not defined.  Some socket constants are not defined, etc, etc.  Look for references to __MINGW32__, !defined &amp; ifndef in platforms/win32 in the Cog tree.  Not a lot current;y because we moved to cygwin and gcc 3.4.4, but when we were with the old 2.95 there was a lot more.  As far as we&#39;re aware gcc 2.95 still produces better code for the interpreter than either gcc 3.x or 4.x (although I suspect that one needs to declare global registers differently, i,e. prefix them with static, and things will be copacetic again).</div>

</div></blockquote><div><br></div><div>Would it be hard to update the code to more recent directx versions? (do you have to maintain the code for old Windows versions?)</div><div><br></div><div>A lot of headers were fixed in recent MinGW versions (and as far as I know, squeak builds fine with gcc 4). I don&#39;t know gcc 2.95 (the version used when I learned C was 3.4.5 :p), and I can&#39;t judge the performance differences, but I think requiring gcc 4.4 would allow a lot of code cleaning.</div>

<div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div class="gmail_quote">
<div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="gmail_quote">

<div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
* Consistent use of runtime libraries: For some external linkage, having the latest MSVC platform libraries available is important.<br>
<br>
At this point the advantage is clearly with the MS tool chain and the only hurdle is that I&#39;ll have to update all the makefiles etc.<br></blockquote><div> Well, here goes my shameless advertisement: CMake could be used to generate Makefiles for MSVC :)</div>




<div>I think it would still need to be fixed though, but that&#39;s less work to do.</div><div><br></div><div>Anyway, do you think you could keep the code compatible with GCC? I could take care of the header fixes.</div>


</div></blockquote><div><br></div><div>Yes.  Its just a matter of ifdeffing, and the differences can be localized.  There are differences anyway.  Since MingW uses the MS libraries a few choice MS incompatibilities surface such as printf format specifiers for 64-bit values, in C99 %llx %lld et al are used, but in MS it&#39;s %I64x %I64d etc.  Hence</div>


<div><br></div><div><div>#if _MSC_VER</div><div># define LLFMT &quot;I64d&quot;</div><div>#else</div><div># define LLFMT &quot;lld&quot;</div><div>#endif</div></div><div><br></div></div></blockquote><div>Yes, THAT is really annoying. We encountered a lot of problems with 32/64 code and format specifiers in vlc, but switching to gcc 4.4 fixed them.</div>

</div>