Browse Source

fix cross-compile under Darwin

Waldemar Brodkorb 13 years ago
parent
commit
d512d21dc7

+ 2 - 1
package/qemu/Makefile

@@ -5,7 +5,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=		qemu
 PKG_VERSION:=		0.13.0
-PKG_RELEASE:=		1
+PKG_RELEASE:=		2
 PKG_MD5SUM:=		397a0d665da8ba9d3b9583629f3d6421
 PKG_DESCR:=		cpu and system emulator
 PKG_SECTION:=		misc
@@ -24,6 +24,7 @@ CONFIGURE_ARGS+=	--host-cc=$(HOSTCC) \
 			--prefix=/usr \
 			--sysconfdir=/etc \
 			--bindir=/usr/bin
+TLDFLAGS+=		-pthread -lrt
 
 post-install:
 	$(INSTALL_DIR) $(IDIR_QEMU)/usr/bin

+ 11 - 0
package/qemu/patches/patch-configure

@@ -0,0 +1,11 @@
+--- qemu-0.13.0.orig/configure	2010-10-15 22:56:09.000000000 +0200
++++ qemu-0.13.0/configure	2011-01-12 22:34:59.000000000 +0100
+@@ -136,7 +136,7 @@ QEMU_CFLAGS="-D_FORTIFY_SOURCE=2 $QEMU_C
+ QEMU_CFLAGS="-I. -I\$(SRC_PATH) $QEMU_CFLAGS"
+ LDFLAGS="-g $LDFLAGS"
+ 
+-gcc_flags="-Wold-style-declaration -Wold-style-definition -fstack-protector-all"
++gcc_flags="-Wold-style-declaration -Wold-style-definition"
+ cat > $TMPC << EOF
+ int main(void) { return 0; }
+ EOF

+ 10 - 0
package/qemu/patches/patch-hw_vhost_c

@@ -0,0 +1,10 @@
+--- qemu-0.13.0.orig/hw/vhost.c	2010-10-15 22:56:09.000000000 +0200
++++ qemu-0.13.0/hw/vhost.c	2011-01-12 21:27:10.000000000 +0100
+@@ -11,7 +11,6 @@
+  */
+ 
+ #include <sys/ioctl.h>
+-#include <sys/eventfd.h>
+ #include "vhost.h"
+ #include "hw/hw.h"
+ /* For range_get_last */

+ 10 - 0
package/qemu/patches/patch-hw_vhost_net_c

@@ -0,0 +1,10 @@
+--- qemu-0.13.0.orig/hw/vhost_net.c	2010-10-15 22:56:09.000000000 +0200
++++ qemu-0.13.0/hw/vhost_net.c	2011-01-12 21:27:20.000000000 +0100
+@@ -20,7 +20,6 @@
+ 
+ #ifdef CONFIG_VHOST_NET
+ #include <linux/vhost.h>
+-#include <sys/eventfd.h>
+ #include <sys/socket.h>
+ #include <linux/kvm.h>
+ #include <fcntl.h>