From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:45830) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QkxB9-0007e2-EV for qemu-devel@nongnu.org; Sun, 24 Jul 2011 07:49:04 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QkxB8-0002Qw-7e for qemu-devel@nongnu.org; Sun, 24 Jul 2011 07:49:03 -0400 Received: from fmmailgate03.web.de ([217.72.192.234]:59620) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QkxB7-0002QX-SF for qemu-devel@nongnu.org; Sun, 24 Jul 2011 07:49:02 -0400 Message-ID: <4E2C06A4.2090608@web.de> Date: Sun, 24 Jul 2011 13:48:52 +0200 From: Jan Kiszka MIME-Version: 1.0 References: <4E2BEFFF.5050000@web.de> <4E2BFC35.6040202@mail.berlios.de> In-Reply-To: <4E2BFC35.6040202@mail.berlios.de> Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enig2579C70FA57B0B5AFE2D5A85" Sender: jan.kiszka@web.de Subject: Re: [Qemu-devel] [PATCH] mingw32: Only link against libiberty if required List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Stefan Weil Cc: Blue Swirl , qemu-devel This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig2579C70FA57B0B5AFE2D5A85 Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: quoted-printable On 2011-07-24 13:04, Stefan Weil wrote: > Am 24.07.2011 12:12, schrieb Jan Kiszka: >> From: Jan Kiszka >> >> Not all (didn't find any) mingw32 cross-toolchains ship a binutils-dev= el >> package, thus lack libiberty.a. According to 08f3896a, -liberty is onl= y >> needed for getopt when building for 64 bit. Test for the availability >> of a getopt implementation and only pull in libiberty when linking >> without it failed. >> >> Signed-off-by: Jan Kiszka >> --- >> configure | 11 ++++++++++- >> 1 files changed, 10 insertions(+), 1 deletions(-) >=20 > Hi, >=20 > I also had problems with some MinGW build environments > which don't provide libiberty.a. Debian's gcc-mingw32 > cross toolchain which I normally use provides it. >=20 > libiberty.a not only includes getopt(), but also several other > useful functions. Especially ffs() is needed for compilations > without optimization and was the main reason for commit 08f3896a. > ffs() normally is inline code, and an implementation in > QEMU code was removed after 08f3896a. >=20 > So at least for Debian cross compilation without optimization, > your patch will break 32 bit builds because ffs() would be missing. >=20 > The latest commits to QEMU git master added a lot of new requirements > for MinGW builds (glib ...). Maybe some of these also require > libiberty.a. Therefore I suggest to wait until git master is > working again with MinGW32. Builds fine here (except for the usual warnings) with Blue's fix for qemu-char.c. Same is true when passing in CFLAGS=3D-O0. >=20 > Could you describe your build requirements in the QEMU Wiki > (http://wiki.qemu.org/Hosts/W32)? Then we can see better how > the different needs of native builds and cross builds with > different distributions can be met, both for w32 and w64. Done. >=20 > If there are MinGW (cross) build environments which really > don't need libiberty.a, we could modify the check to add > linker option -liberty only when the library is available. That was my original idea, at least for 32-bit builds (my toolchain carries 'w64' in its name, but only support w32). How to express this bes= t? Jan --------------enig2579C70FA57B0B5AFE2D5A85 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.16 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk4sBqoACgkQitSsb3rl5xT2yQCg38Vn4ZA9iZRyUPV0Vue1Gx5t /MEAnR7uiJ7SeEIv2wBHiXN2ObmOti5E =EpEZ -----END PGP SIGNATURE----- --------------enig2579C70FA57B0B5AFE2D5A85--