<table cellspacing="0" cellpadding="0" border="0" ><tr><td valign="top" style="font: inherit;"><DIV>Doesn't seem to be too bad.</DIV>
<DIV> </DIV>
<DIV>I managed to compile the recompiler with VS 2005. Will test soon if there are any runtime issues.<BR><BR>--- On <B>Wed, 7/15/09, Nikolay Igotti <I><Nikolay.Igotti@Sun.COM></I></B> wrote:<BR></DIV>
<BLOCKQUOTE style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: rgb(16,16,255) 2px solid"><BR>From: Nikolay Igotti <Nikolay.Igotti@Sun.COM><BR>Subject: Re: [vbox-dev] Is gcc 3.3.x really necessary to compile the recompiler?<BR>To: "Huihong Luo" <huisinro@yahoo.com><BR>Cc: "VirtualBox developer's list" <vbox-dev@virtualbox.org><BR>Date: Wednesday, July 15, 2009, 2:26 AM<BR><BR>
<DIV class=plainMail>    Hi Huihong,<BR><BR>Don't think MSVC compilation can be easily done (C compiler in MSVC also don't support C99, whose array initialization by index feature is heavily used).<BR>Maybe easier will be to use MinGW64. Cross compilation process is just a compilation with cross-compiler :) - you build GCC as Windows executable capable to produce Linux binaries. There are docs on the net. GCC version is around 3.4, IIRC.<BR><BR>Thanks,<BR>   Nikolay.<BR><BR><BR><BR>Huihong Luo пишет:<BR>> Hi Nilolay,<BR>>  I will give it a try to see if msvc++ compilation of recompiler can be easily done.<BR>>  In the meantime, can you give some details on the cross compilation process? which tool are you using? which version? more info is highly appreciated.<BR>>  Thanks for your very helpful info thus far,<BR>>  Huihong<BR>> <BR>> --- On *Tue, 7/14/09, Nikolay Igotti /<<A
 href="http://us.mc343.mail.yahoo.com/mc/compose?to=Nikolay.Igotti@Sun.COM" ymailto="mailto:Nikolay.Igotti@Sun.COM">Nikolay.Igotti@Sun.COM</A>>/* wrote:<BR>> <BR>> <BR>>     From: Nikolay Igotti <<A href="http://us.mc343.mail.yahoo.com/mc/compose?to=Nikolay.Igotti@Sun.COM" ymailto="mailto:Nikolay.Igotti@Sun.COM">Nikolay.Igotti@Sun.COM</A>><BR>>     Subject: Re: [vbox-dev] Is gcc 3.3.x really necessary to compile<BR>>     the recompiler?<BR>>     To: "Huihong Luo" <<A href="http://us.mc343.mail.yahoo.com/mc/compose?to=huisinro@yahoo.com" ymailto="mailto:huisinro@yahoo.com">huisinro@yahoo.com</A>><BR>>     Cc: "VirtualBox developer's list" <<A href="http://us.mc343.mail.yahoo.com/mc/compose?to=vbox-dev@virtualbox.org" ymailto="mailto:vbox-dev@virtualbox.org">vbox-dev@virtualbox.org</A>><BR>> 
    Date: Tuesday, July 14, 2009, 12:25 PM<BR>> <BR>>     Hi Huihong,<BR>> <BR>>     Actually this file is built on Windows using cross-compiler for<BR>>     Linux target :). It's being built this way, because there was no<BR>>     good MinGW for 64-bit at times it was done, and REM relies on GCC<BR>>     extensions (notably global registers variables and some FP stuff)<BR>>     to function correctly. Right approach would be to rebuild<BR>>     recompiler with MSVC eventually, but it needs a volunteer (I think<BR>>     it was done for QEMU, so should be feasible).<BR>>     Also if taking MinGW64 approach don't forget calling convention<BR>>     difference on AMD64 between Linux and Windows. REM relies on
 that<BR>>     too (not too hard to fix, for sure, just need a bit of<BR>>     understanding in TCG).<BR>> <BR>>     If you (or someone else on this list ) will do that - I can help<BR>>     with getting patch integrated (never found enough time/desire to<BR>>     do that myself).<BR>> <BR>>     Thanks,<BR>>     Nikolay.<BR>> <BR>> <BR>>     Huihong Luo пишет:<BR>>     > Hi Nikolay,<BR>>     > Thanks for the clarification. It's much easier without sticking<BR>>     to the old gcc version.<BR>>     > Yes, I noticed that VBoxRem2.rel is an ELF image. Can you<BR>>     explain how this file is built? I assume it's done on Linux.
 Do<BR>>     you use mingw toolchain on linux to do the cross compile? Since<BR>>     it's ELF image, perhaps it's built from pure linux gcc (w/o cross<BR>>     compile to windows)?<BR>>     > I am trying to eliminate VBoxREM2.rel on windows using MingW64,<BR>>     in other words, combining the current VBoxREM.dll + VBoxREM2.rel<BR>>     ==> VBoxREM.dll<BR>>     > Thanks,<BR>>     > Huihong<BR>>     ><BR>>     > --- On *Tue, 7/14/09, Nikolay Igotti /<<A href="http://us.mc343.mail.yahoo.com/mc/compose?to=Nikolay.Igotti@Sun.COM" ymailto="mailto:Nikolay.Igotti@Sun.COM">Nikolay.Igotti@Sun.COM</A><BR>>     <<A href="http://us.mc343.mail.yahoo.com/mc/compose?to=Nikolay.Igotti@Sun.COM"
 target=_blank>http://us.mc343.mail.yahoo.com/mc/compose?to=Nikolay.Igotti@Sun.COM</A>>>/*<BR>>     wrote:<BR>>     ><BR>>     ><BR>>     >     From: Nikolay Igotti <<A href="http://us.mc343.mail.yahoo.com/mc/compose?to=Nikolay.Igotti@Sun.COM" ymailto="mailto:Nikolay.Igotti@Sun.COM">Nikolay.Igotti@Sun.COM</A><BR>>     <<A href="http://us.mc343.mail.yahoo.com/mc/compose?to=Nikolay.Igotti@Sun.COM" target=_blank>http://us.mc343.mail.yahoo.com/mc/compose?to=Nikolay.Igotti@Sun.COM</A>>><BR>>     >     Subject: Re: [vbox-dev] Is gcc 3.3.x really necessary to compile<BR>>     >     the recompiler?<BR>>     >     To: "Huihong Luo" <<A
 href="http://us.mc343.mail.yahoo.com/mc/compose?to=huisinro@yahoo.com" ymailto="mailto:huisinro@yahoo.com">huisinro@yahoo.com</A><BR>>     <<A href="http://us.mc343.mail.yahoo.com/mc/compose?to=huisinro@yahoo.com" target=_blank>http://us.mc343.mail.yahoo.com/mc/compose?to=huisinro@yahoo.com</A>>><BR>>     >     Cc: "VirtualBox developer's list" <<A href="http://us.mc343.mail.yahoo.com/mc/compose?to=vbox-dev@virtualbox.org" ymailto="mailto:vbox-dev@virtualbox.org">vbox-dev@virtualbox.org</A><BR>>     <<A href="http://us.mc343.mail.yahoo.com/mc/compose?to=vbox-dev@virtualbox.org" target=_blank>http://us.mc343.mail.yahoo.com/mc/compose?to=vbox-dev@virtualbox.org</A>>><BR>>     >     Date: Tuesday, July 14, 2009, 2:24 AM<BR>>     ><BR>>     > 
    Hi Huihong,<BR>>     ><BR>>     ><BR>>     >     Recompiler should build OK with recent gcc. Gcc 3 limitation was<BR>>     >     applicable to 'old' recompiler, not relying on TCG for<BR>>     >     codegeneration. Windows 64-bit REM is built to ELF image,<BR>>     not PE,<BR>>     >     thus MinGW shall be of little help to you.<BR>>     ><BR>>     >     Thanks,<BR>>     >     Nikolay.<BR>>     ><BR>>     ><BR>>     >     Huihong Luo wrote:<BR>> 
    >     > The reason I asked is that gcc 4.4.3 seems to be working<BR>>     fine on<BR>>     >     linux, so I am very confused about gcc requirement.<BR>>     >     > I am trying to use the latest gcc4.4.0 mingw64 bit on amd64 to<BR>>     >     build the recompiler, would this be a problem?<BR>>     >     > Does 3.3.x requirement only apply to mingw32? in other cases,<BR>>     >     gcc 4 is OK?<BR>>     >     > Thanks,<BR>>     >     ><BR>>     >     ><BR>>     >     
   ------------------------------------------------------------------------<BR>>     >     ><BR>>     >     > _______________________________________________<BR>>     >     > vbox-dev mailing list<BR>>     >     > <A href="http://us.mc343.mail.yahoo.com/mc/compose?to=vbox-dev@virtualbox.org" ymailto="mailto:vbox-dev@virtualbox.org">vbox-dev@virtualbox.org</A><BR>>     <<A href="http://us.mc343.mail.yahoo.com/mc/compose?to=vbox-dev@virtualbox.org" target=_blank>http://us.mc343.mail.yahoo.com/mc/compose?to=vbox-dev@virtualbox.org</A>><BR>>     >        <<A href="http://us.mc343.mail.yahoo.com/mc/compose?to=vbox-dev@virtualbox.org"
 target=_blank>http://us.mc343.mail.yahoo.com/mc/compose?to=vbox-dev@virtualbox.org</A>><BR>>     >     > <A href="http://vbox.innotek.de/mailman/listinfo/vbox-dev" target=_blank>http://vbox.innotek.de/mailman/listinfo/vbox-dev</A><BR>>     >     ><BR>>     ><BR>>     ><BR>>     ------------------------------------------------------------------------<BR>>     ><BR>>     > _______________________________________________<BR>>     > vbox-dev mailing list<BR>>     > <A href="http://us.mc343.mail.yahoo.com/mc/compose?to=vbox-dev@virtualbox.org" ymailto="mailto:vbox-dev@virtualbox.org">vbox-dev@virtualbox.org</A><BR>>     <<A
 href="http://us.mc343.mail.yahoo.com/mc/compose?to=vbox-dev@virtualbox.org" target=_blank>http://us.mc343.mail.yahoo.com/mc/compose?to=vbox-dev@virtualbox.org</A>><BR>>     > <A href="http://vbox.innotek.de/mailman/listinfo/vbox-dev" target=_blank>http://vbox.innotek.de/mailman/listinfo/vbox-dev</A><BR>>     >   <BR>> ------------------------------------------------------------------------<BR>> <BR>> _______________________________________________<BR>> vbox-dev mailing list<BR>> <A href="http://us.mc343.mail.yahoo.com/mc/compose?to=vbox-dev@virtualbox.org" ymailto="mailto:vbox-dev@virtualbox.org">vbox-dev@virtualbox.org</A><BR>> <A href="http://vbox.innotek.de/mailman/listinfo/vbox-dev" target=_blank>http://vbox.innotek.de/mailman/listinfo/vbox-dev</A><BR>>   <BR><BR></DIV></BLOCKQUOTE></td></tr></table>