On Tue, Aug 16, 2011 at 8:38 AM, Roy Tam <roy...@gmail.com> wrote: > 2011/8/8 Roy Tam <roy...@gmail.com>: >> 2011/8/8 Stefan Hajnoczi <stefa...@gmail.com>: >>> On Mon, Aug 8, 2011 at 1:30 AM, Roy Tam <roy...@gmail.com> wrote: >>>> Hi all, >>>> >>>> I checked out latest git and tried to compile QEMU but I got this message: >>>> qemu$ make V=1 >>>> gcc -m32 -D__USE_MINGW_ANSI_STDIO=1 -DWIN32_LEAN_AND_MEAN >>>> -DWINVER=0x501 -D_FORTIFY_SOURCE=2 -D_GNU_SOURCE >>>> -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -Wstrict-prototypes >>>> -Wredundant-decls -Wall -Wundef -Wwrite-strings -Wmissing-prototypes >>>> -fno-strict-aliasing -O3 -msse3 -msse2 -msse -mmmx >>>> -fomit-frame-pointer -mpreferred-stack-boundary=2 -ffast-math -pipe >>>> -funroll-loops -fforce-addr -mfpmath=sse -Wendif-labels >>>> -Wnested-externs -Wformat-security -Wformat-y2k -Winit-self >>>> -Wold-style-definition -mms-bitfields -Ic:/MinGW/include/glib-2.0 >>>> -Ic:/MinGW/lib/glib-2.0/include -I/usr/home/User/qemu/slirp -I. >>>> -I/usr/home/User/qemu -I/usr/home/User/qemu/fpu -MMD -MP -MT >>>> coroutine-win32.o -MF ./coroutine-win32.d -O2 -g -c -o >>>> coroutine-win32.o coroutine-win32.c >>>> coroutine-win32.c:36: error: thread-local storage not supported for this >>>> target >>>> coroutine-win32.c:37: error: thread-local storage not supported for this >>>> target >>>> make: *** [coroutine-win32.o] Error 1 >>> >>> Hi Roy, >>> Others have successfully built for win32. Are you able to upgrade to >>> a newer toolchain, gcc-3.4 is 6 years old and doesn't support __thread >>> variables? >> >> I tried many MinGW GCC 4.x(from 4.5.0 to 4.7.0) but resulting an >> internal compiler error when compiling op_helper.c >> > > I removed "-mpreferred-stack-boundary=2" switch and it now builds. > But created binaries are unusable, even I remove all cflags. > > C:\msys\home\User\qemu\i386-softmmu>gdb --args qemu -L ..\pc-bios > GNU gdb (GDB) 7.3 > Copyright (C) 2011 Free Software Foundation, Inc. > License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html> > This is free software: you are free to change and redistribute it. > There is NO WARRANTY, to the extent permitted by law. Type "show > copying" and "show warranty" for details. > This GDB was configured as "mingw32". > For bug reporting instructions, please see: > <http://www.gnu.org/software/gdb/bugs/>... > Reading symbols from > C:\msys\home\User\qemu\i386-softmmu/qemu.exe...(no debugging symbols > found)...done. > (gdb) run > Starting program: C:\msys\home\User\qemu\i386-softmmu/qemu.exe -L ..\\pc-bios > [New Thread 5880.0x13c4] > [New Thread 5880.0x16ac] > [New Thread 5880.0x110c] > > Program received signal SIGSEGV, Segmentation fault. > [Switching to Thread 5880.0x110c] > 0x77c0554a in msvcrt!_abnormal_termination () > from C:\WINDOWS\system32\msvcrt.dll > (gdb) backtrace > #0 0x77c0554a in msvcrt!_abnormal_termination () > from C:\WINDOWS\system32\msvcrt.dll > #1 0x77c09bc6 in strerror () from C:\WINDOWS\system32\msvcrt.dll > Backtrace stopped: previous frame inner to this frame (corrupt stack?) > (gdb)
Roy, This stack trace does not reveal much. Is there any MinGW gcc user that has successfully built and run qemu.git? Which version/architecture of Windows and which MinGW version? Stefan