From: Christoph Egger <Christoph.Egger@amd.com>
To: Blue Swirl <blauwirbel@gmail.com>
Cc: qemu-devel@nongnu.org
Subject: [Qemu-devel] Re: [PATCH] fix compile & linking errors on NetBSD
Date: Mon, 24 Nov 2008 11:21:39 +0200 [thread overview]
Message-ID: <200811241021.39852.Christoph.Egger@amd.com> (raw)
In-Reply-To: <f43fc5580811221228t2b188276nae07c93475b7fd0d@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 1665 bytes --]
On Saturday 22 November 2008 21:28:56 Blue Swirl wrote:
> On 11/17/08, Christoph Egger <Christoph.Egger@amd.com> 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 <Christoph.Egger@amd.com>
>
> > - 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
--
AMD Saxony, Dresden, Germany
Operating System Research Center
Legal Information:
AMD Saxony Limited Liability Company & Co. KG
Sitz (Geschäftsanschrift):
Wilschdorfer Landstr. 101, 01109 Dresden, Deutschland
Registergericht Dresden: HRA 4896
vertretungsberechtigter Komplementär:
AMD Saxony LLC (Sitz Wilmington, Delaware, USA)
Geschäftsführer der AMD Saxony LLC:
Dr. Hans-R. Deppe, Thomas McCoy
[-- Attachment #2: qemu.diff --]
[-- Type: text/x-diff, Size: 1091 bytes --]
Index: bswap.h
===================================================================
--- bswap.h (revision 5786)
+++ bswap.h (working copy)
@@ -5,6 +5,12 @@
#include <inttypes.h>
+#ifdef HAVE_MACHINE_BSWAP_H
+#include <sys/endian.h>
+#include <sys/types.h>
+#include <machine/bswap.h>
+#else
+
#ifdef HAVE_BYTESWAP_H
#include <byteswap.h>
#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 <sys/endian.h>
+#include <sys/types.h>
+#include <machine/bswap.h>
+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
next prev parent reply other threads:[~2008-11-24 15:56 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-11-17 11:00 [Qemu-devel] [PATCH] fix compile & linking errors on NetBSD Christoph Egger
2008-11-22 20:28 ` [Qemu-devel] " Blue Swirl
2008-11-24 9:21 ` Christoph Egger [this message]
2008-11-23 4:36 ` [Qemu-devel] " Thiemo Seufer
2008-11-23 7:29 ` Blue Swirl
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200811241021.39852.Christoph.Egger@amd.com \
--to=christoph.egger@amd.com \
--cc=blauwirbel@gmail.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.