From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:43854) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UbFpn-0003hV-KF for qemu-devel@nongnu.org; Sat, 11 May 2013 15:52:00 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UbFpm-0000bL-BX for qemu-devel@nongnu.org; Sat, 11 May 2013 15:51:59 -0400 Received: from v220110690675601.yourvserver.net ([78.47.199.172]:46283) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UbFpm-0000bD-51 for qemu-devel@nongnu.org; Sat, 11 May 2013 15:51:58 -0400 Message-ID: <518EA157.8060606@weilnetz.de> Date: Sat, 11 May 2013 21:51:51 +0200 From: Stefan Weil MIME-Version: 1.0 References: <1364577620-32630-1-git-send-email-sw@weilnetz.de> <518D5508.8000308@gmail.com> <518DE818.2050105@weilnetz.de> <518E08D6.6090702@gmail.com> In-Reply-To: <518E08D6.6090702@gmail.com> Content-Type: text/plain; charset=windows-1251 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH] w32: Fix build with older gcc (unresolved symbol) List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Igor Mitsyanko Cc: Blue Swirl , Peter Maydell , aliguori@us.ibm.com, qemu-devel@nongnu.org Am 11.05.2013 11:01, schrieb Igor Mitsyanko: > On 11.05.2013 10:41, Stefan Weil wrote: >> Am 10.05.2013 22:14, schrieb Igor Mitsyanko: >>> On 29.03.2013 21:20, Stefan Weil wrote: >>>> The cross i586-mingw32msvc-gcc 4.4.4 from Debian Squeeze does not >>>> support >>>> __sync_val_compare_and_swap by default. >>>> >>>> Using -march=i686 fixes that and should also result in better code. >>>> >>>> Signed-off-by: Stefan Weil >>>> --- >>>> >>>> Maybe this modification is also needed for native gcc-4.4 and older >>>> on Linux i386. If yes, we can move the new script code out of the >>>> MinGW conditional code. >>>> >>>> Newer versions of gcc obviously use -march=i686 by default and >>>> don't need the patch, but it also won't do any harm for those >>>> versions. >>>> >>>> Stefan >>>> >>> mingw is built with --build=mingw32 and looks like it defaults to >>> -march=i386 (I have gcc version 4.7.2). >>> Default build on windows is broken without this patch, it should be >>> applied to 1.5 probably. >>> >>> Tested-by: Igor Mitsyanko >>> >> With latest QEMU, -march=i486 is used and there should be no problem. >> If there still is a problem, we have to look for the reason. >> >> Could you please post the output from configure? >> >> Regards, >> Stefan >> > > Right, looks like my configuration has __sync_fetch_and_and but > doesn't have __sync_val_compare_and_swap. That's why configure check > passes but build fails: > > LINK arm-softmmu/qemu-system-armw.exe > ../migration.o: In function `migrate_finish_set_state': > g:\qemu_develop_ws\qemu_upstream/migration.c:293: undefined reference > to `__sync_val_compare_and_swap_4' > g:\qemu_develop_ws\qemu_upstream/migration.c:293: undefined reference > to `__sync_val_compare_and_swap_4' > g:\qemu_develop_ws\qemu_upstream/migration.c:293: undefined reference > to `__sync_val_compare_and_swap_4' > collect2.exe: error: ld returned 1 exit status > make[1]: *** [qemu-system-armw.exe] Error 1 > make: *** [subdir-arm-softmmu] Error 2 Hi, I can reproduce that problem with a native MinGW. http://patchwork.ozlabs.org/patch/243150/ should fix it. Thank you for your report. Regards, Stefan Weil