From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1L4dnB-0003Lg-Si for qemu-devel@nongnu.org; Mon, 24 Nov 2008 10:56:07 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1L4dn6-0003IJ-Oh for qemu-devel@nongnu.org; Mon, 24 Nov 2008 10:56:02 -0500 Received: from [199.232.76.173] (port=46048 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1L4dn5-00034r-GH for qemu-devel@nongnu.org; Mon, 24 Nov 2008 10:55:59 -0500 Received: from outbound-wa4.frontbridge.com ([216.32.181.16]:40495 helo=WA4EHSOBE004.bigfish.com) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_ARCFOUR_MD5:16) (Exim 4.60) (envelope-from ) id 1L4Xdf-0003uw-HU for qemu-devel@nongnu.org; Mon, 24 Nov 2008 04:21:51 -0500 From: Christoph Egger Date: Mon, 24 Nov 2008 11:21:39 +0200 References: <200811171200.13793.Christoph.Egger@amd.com> In-Reply-To: MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="Boundary-00=_jInKJ79gI3YGkWO" Message-ID: <200811241021.39852.Christoph.Egger@amd.com> Subject: [Qemu-devel] Re: [PATCH] fix compile & linking errors on NetBSD Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Blue Swirl Cc: qemu-devel@nongnu.org --Boundary-00=_jInKJ79gI3YGkWO Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline On Saturday 22 November 2008 21:28:56 Blue Swirl wrote: > On 11/17/08, Christoph Egger wrote: > > Hi, > > > > Attached patch fixes some compile and linking issues on NetBSD. > > > > - change configure and bswap.h to get the bswap* functions > > I didn't apply this, I think the bswap functions are fully optimized > by the compiler. The bswap part is needed on NetBSD. W/o it, I get this build error: bswap.h:46: error: expected declaration specifiers or '...' before '(' token bswap.h:46: error: expected ')' before '?' token bswap.h:51: error: expected declaration specifiers or '...' before '(' token bswap.h:51: error: expected ')' before '?' token bswap.h:56: error: expected declaration specifiers or '...' before '(' token bswap.h:56: error: expected ')' before '?' token Attached patch re-adds this. Signed-off-by: Christoph Egger > > > - adapt configure to link against -lrt to fix aio linking errors > > - adapt configure to link against -lossaudio to fix oss linking errors > > - add native softfloat fpu functions > > These are applied as r5774, r5775 and r5776. Thanks. Thanks for applying it and fixing the typo. Christoph =2D-=20 AMD Saxony, Dresden, Germany Operating System Research Center Legal Information: AMD Saxony Limited Liability Company & Co. KG Sitz (Gesch=C3=A4ftsanschrift): Wilschdorfer Landstr. 101, 01109 Dresden, Deutschland Registergericht Dresden: HRA 4896 vertretungsberechtigter Komplement=C3=A4r: AMD Saxony LLC (Sitz Wilmington, Delaware, USA) Gesch=C3=A4ftsf=C3=BChrer der AMD Saxony LLC: Dr. Hans-R. Deppe, Thomas McCoy --Boundary-00=_jInKJ79gI3YGkWO Content-Type: text/x-diff; charset="utf-8"; name="qemu.diff" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="qemu.diff" Index: bswap.h =================================================================== --- bswap.h (revision 5786) +++ bswap.h (working copy) @@ -5,6 +5,12 @@ #include +#ifdef HAVE_MACHINE_BSWAP_H +#include +#include +#include +#else + #ifdef HAVE_BYTESWAP_H #include #else @@ -58,6 +64,8 @@ return bswap_64(x); } +#endif /* ! HAVE_MACHINE_BSWAP_H */ + static inline void bswap16s(uint16_t *s) { *s = bswap16(*s); Index: configure =================================================================== --- configure (revision 5786) +++ configure (working copy) @@ -1222,6 +1233,15 @@ if $cc $ARCH_CFLAGS -o $TMPE $TMPC 2> /dev/null ; then echo "#define HAVE_BYTESWAP_H 1" >> $config_h fi + cat > $TMPC << EOF +#include +#include +#include +int main(void) { return bswap32(0); } +EOF + if $cc $ARCH_CFLAGS -o $TMPE $TMPC 2> /dev/null ; then + echo "#define HAVE_MACHINE_BSWAP_H 1" >> $config_h + fi fi if [ "$openbsd" = "yes" ] ; then --Boundary-00=_jInKJ79gI3YGkWO--