Am 26.11.2014 um 21:13 schrieb Peter Maydell:
> On 26 November 2014 at 19:55, Liviu Ionescu <i...@livius.net> wrote:
>> since I had some troubles to build QEMU on Windows, I compiled a page with 
>> some instructions:
>>
>>         http://gnuarmeclipse.livius.net/wiki/How_to_build_QEMU#Windows
>>
>> the purpose was to generate a standalone executable, that requires no 
>> libraries.
>>
>>
>> although the procedure is fully functional, I had to apply a small patch, 
>> basically:
>>
>> #ifdef __MINGW32__
>>     #if !defined(ffs)
>>     #define ffs __builtin_ffs
>>     #endif
>> #endif
>>
>> in several files.
> 
> Hmm. We have a workaround already for a similar thing in
> include/sysemu/os-win32.h,
> but that works by declaring a prototype rather than using a #define, and it's
> guarded by defined(_WIN64). I wonder if some of those workarounds in that file
> need to be guarded by more specific checks than just _WIN64...
> 
> Do you have any experience with mingw-w64? When I was doing Windows
> (cross-compiled) builds mingw-w64 seemed to be more actively maintained
> (even for 32 bit windows targets) than the original mingw project,
> and I think there was at least one issue where the fix was basically
> "don't try to use mingw, it's just too old, use mingw-w64 instead".
> 
> In any case, thanks very much for writing up the instructions -- we do
> get people wanting to know how to build on Windows from time to time,
> so it will be useful to be able to point them at instructions.
> 
> You might consider tweaking the instructions to recommend building in
> a subdirectory (ie 'mkdir -p build/windows; cd build/windows;
> ../../configure; make'). This is good if you're going to be building
> more than one configuration, and it also makes it easy to blow away
> an old build by removing the whole build tree (distclean is not always
> 100% reliable especially if you track head-of-git often).
> 
> -- PMM
> 


I was just writing nearly the same as Peter. So now I can only add one
remark: there is also a QEMU Wiki which has some rather old instructions
on building for Windows: http://wiki.qemu.org/Hosts/W32. Maybe you could
add updated / new instructions there.

Thanks
Stefan


Reply via email to