From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:50590) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QtJ1o-0000XD-Mb for qemu-devel@nongnu.org; Tue, 16 Aug 2011 08:45:57 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QtJ1k-0000jv-HI for qemu-devel@nongnu.org; Tue, 16 Aug 2011 08:45:56 -0400 Received: from mail-yx0-f173.google.com ([209.85.213.173]:38950) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QtJ1k-0000jk-En for qemu-devel@nongnu.org; Tue, 16 Aug 2011 08:45:52 -0400 Received: by yxt3 with SMTP id 3so4283223yxt.4 for ; Tue, 16 Aug 2011 05:45:51 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: References: Date: Tue, 16 Aug 2011 13:45:51 +0100 Message-ID: From: Stefan Hajnoczi Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] Compilation error of coroutine-win32.c with gcc version 3.4.5 (mingw-vista special r3) List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Roy Tam Cc: qemu-devel On Tue, Aug 16, 2011 at 8:38 AM, Roy Tam wrote: > 2011/8/8 Roy Tam : >> 2011/8/8 Stefan Hajnoczi : >>> On Mon, Aug 8, 2011 at 1:30 AM, Roy Tam wrote: >>>> Hi all, >>>> >>>> I checked out latest git and tried to compile QEMU but I got this mess= age: >>>> qemu$ make V=3D1 >>>> gcc -m32 -D__USE_MINGW_ANSI_STDIO=3D1 -DWIN32_LEAN_AND_MEAN >>>> -DWINVER=3D0x501 -D_FORTIFY_SOURCE=3D2 -D_GNU_SOURCE >>>> -D_FILE_OFFSET_BITS=3D64 -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=3D2 -ffast-math -pipe >>>> -funroll-loops -fforce-addr -mfpmath=3Dsse =A0-Wendif-labels >>>> -Wnested-externs -Wformat-security -Wformat-y2k -Winit-self >>>> -Wold-style-definition =A0-mms-bitfields -Ic:/MinGW/include/glib-2.0 >>>> -Ic:/MinGW/lib/glib-2.0/include =A0 -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 =A0-c -o >>>> coroutine-win32.o coroutine-win32.c >>>> coroutine-win32.c:36: error: thread-local storage not supported for th= is target >>>> coroutine-win32.c:37: error: thread-local storage not supported for th= is target >>>> make: *** [coroutine-win32.o] Error 1 >>> >>> Hi Roy, >>> Others have successfully built for win32. =A0Are 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=3D2" 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 > This is free software: you are free to change and redistribute it. > There is NO WARRANTY, to the extent permitted by law. =A0Type "show > copying" and "show warranty" for details. > This GDB was configured as "mingw32". > For bug reporting instructions, please see: > ... > 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 () > =A0 from C:\WINDOWS\system32\msvcrt.dll > (gdb) backtrace > #0 =A00x77c0554a in msvcrt!_abnormal_termination () > =A0 from C:\WINDOWS\system32\msvcrt.dll > #1 =A00x77c09bc6 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