|
From: | Stefan Weil |
Subject: | Re: [Qemu-devel] [PATCH] configure: Test for libiberty.a (mingw32) |
Date: | Sat, 10 Mar 2012 19:47:20 +0100 |
User-agent: | Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.16) Gecko/20120207 Iceowl/1.0b1 Icedove/3.0.11 |
Am 10.03.2012 17:28, schrieb Andreas Färber:
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? AndreasSigned-off-by: Stefan Weil <address@hidden> --- 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" = "yes" ; then QEMU_CFLAGS="-DWIN32_LEAN_AND_MEAN -DWINVER=0x501 $QEMU_CFLAGS" # enable C99/POSIX format strings (needs mingw32-runtime 3.15 or later) QEMU_CFLAGS="-D__USE_MINGW_ANSI_STDIO=1 $QEMU_CFLAGS" - LIBS="-lwinmm -lws2_32 -liberty -liphlpapi $LIBS" + LIBS="-lwinmm -lws2_32 -liphlpapi $LIBS" +cat > $TMPC << EOF +int main(void) { return 0; } +EOF + if compile_prog "" "-liberty" ; then + LIBS="-liberty $LIBS" + fi prefix="c:/Program Files/Qemu" mandir="\${prefix}" datadir="\${prefix}"
See commit 08f3896a072c6d05e36ec3fa4fd303ea550ee38f: Author: Stefan Weil <address@hidden> 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 <address@hidden> Signed-off-by: Stefan Weil <address@hidden> Signed-off-by: Blue Swirl <address@hidden> 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
[Prev in Thread] | Current Thread | [Next in Thread] |