From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:51089) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S6RK9-0006Eb-K8 for qemu-devel@nongnu.org; Sat, 10 Mar 2012 13:47:27 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1S6RK7-0004av-PH for qemu-devel@nongnu.org; Sat, 10 Mar 2012 13:47:25 -0500 Received: from v220110690675601.yourvserver.net ([78.47.199.172]:45926) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S6RK7-0004aj-IR for qemu-devel@nongnu.org; Sat, 10 Mar 2012 13:47:23 -0500 Message-ID: <4F5BA1B8.80606@weilnetz.de> Date: Sat, 10 Mar 2012 19:47:20 +0100 From: Stefan Weil MIME-Version: 1.0 References: <1331374472-15157-1-git-send-email-sw@weilnetz.de> <1331374472-15157-2-git-send-email-sw@weilnetz.de> <4F5B814B.2050602@suse.de> In-Reply-To: <4F5B814B.2050602@suse.de> Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH] configure: Test for libiberty.a (mingw32) List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: =?ISO-8859-15?Q?Andreas_F=E4rber?= Cc: qemu-devel@nongnu.org Am 10.03.2012 17:28, schrieb Andreas F=E4rber: > Am 10.03.2012 11:14, schrieb Stefan Weil: >> MinGW-w64 and some versions of MinGW32 don't provide libiberty.a, >> so add this library only if it was found. > > What do we need it for at all then? > > Andreas > >> Signed-off-by: Stefan Weil >> --- >> configure | 8 +++++++- >> 1 files changed, 7 insertions(+), 1 deletions(-) >> >> diff --git a/configure b/configure >> index ca25250..bb16498 100755 >> --- a/configure >> +++ b/configure >> @@ -511,7 +511,13 @@ if test "$mingw32" =3D "yes" ; then >> QEMU_CFLAGS=3D"-DWIN32_LEAN_AND_MEAN -DWINVER=3D0x501 $QEMU_CFLAGS" >> # enable C99/POSIX format strings (needs mingw32-runtime 3.15 or later= ) >> QEMU_CFLAGS=3D"-D__USE_MINGW_ANSI_STDIO=3D1 $QEMU_CFLAGS" >> - LIBS=3D"-lwinmm -lws2_32 -liberty -liphlpapi $LIBS" >> + LIBS=3D"-lwinmm -lws2_32 -liphlpapi $LIBS" >> +cat > $TMPC << EOF >> +int main(void) { return 0; } >> +EOF >> + if compile_prog "" "-liberty" ; then >> + LIBS=3D"-liberty $LIBS" >> + fi >> prefix=3D"c:/Program Files/Qemu" >> mandir=3D"\${prefix}" >> datadir=3D"\${prefix}" See commit 08f3896a072c6d05e36ec3fa4fd303ea550ee38f: Author: Stefan Weil Date: Fri Feb 4 22:38:47 2011 +0100 w32: Use additional library libiberty.a libiberty.a is part of MinGW and provides useful functions like ffs (MinGW) and getopt (MinGW-w64). It is needed for w64 compilations and allows simpler code for w32. Cc: Anthony Liguori Signed-off-by: Stefan Weil Signed-off-by: Blue Swirl It looks like newer versions of MinGW-w64 don't have libiberty.a while older ones (Debian squeeze) provide it. For those versions which have libiberty.a, it is needed because it includes ffs, strncmp and several other functions used by QEMU code. Stefan