diff --git a/emulators/qemu/Makefile b/emulators/qemu/Makefile index 985ca4068f7..e8a5513a647 100644 --- a/emulators/qemu/Makefile +++ b/emulators/qemu/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.18 2007/01/17 20:35:09 mpf Exp $ +# $OpenBSD: Makefile,v 1.19 2007/02/19 12:43:38 robert Exp $ # no success building on other archs yet ONLY_FOR_ARCHS= amd64 arm i386 powerpc @@ -6,7 +6,7 @@ ONLY_FOR_ARCHS= amd64 arm i386 powerpc COMMENT= "multi system emulator" DISTNAME= qemu-0.8.2 -PKGNAME= ${DISTNAME}p2 +PKGNAME= ${DISTNAME}p3 CATEGORIES= emulators HOMEPAGE= http://fabrice.bellard.free.fr/qemu/ @@ -27,6 +27,9 @@ USE_X11= Yes WANTLIB= m z ossaudio X11 Xext usbhid util pthread c CONFIGURE_STYLE= gnu +# Currently, the regression tests are utterly broken. +REGRESS_TARGET= test test2 + .if ${MACHINE_ARCH} == "amd64" PATCH_LIST= patch-* misc-* .endif diff --git a/emulators/qemu/patches/patch-configure b/emulators/qemu/patches/patch-configure index d4819b2cce2..d26d59546d8 100644 --- a/emulators/qemu/patches/patch-configure +++ b/emulators/qemu/patches/patch-configure @@ -1,6 +1,6 @@ -$OpenBSD: patch-configure,v 1.6 2006/12/22 17:31:45 todd Exp $ ---- configure.orig Sat Jul 22 13:23:34 2006 -+++ configure Sun Nov 12 17:10:10 2006 +$OpenBSD: patch-configure,v 1.7 2007/02/19 12:43:38 robert Exp $ +--- configure.orig Sat Jul 22 19:23:34 2006 ++++ configure Tue Feb 13 09:22:48 2007 @@ -21,8 +21,8 @@ prefix="" interp_prefix="/usr/gnemul/qemu-%M" static="no" @@ -25,7 +25,7 @@ $OpenBSD: patch-configure,v 1.6 2006/12/22 17:31:45 todd Exp $ x86_64|amd64) cpu="x86_64" ;; -+ zaurus) ++ armish|zaurus) + cpu="arm" + ;; *) diff --git a/emulators/qemu/patches/patch-cpu-all_h b/emulators/qemu/patches/patch-cpu-all_h new file mode 100644 index 00000000000..c7307b88372 --- /dev/null +++ b/emulators/qemu/patches/patch-cpu-all_h @@ -0,0 +1,28 @@ +$OpenBSD: patch-cpu-all_h,v 1.1 2007/02/19 12:43:38 robert Exp $ +--- cpu-all.h.orig Mon Feb 19 10:54:26 2007 ++++ cpu-all.h Mon Feb 19 10:56:42 2007 +@@ -992,6 +992,24 @@ static inline int64_t cpu_get_real_ticks + return rval.i64; + #endif + } ++#else ++# warning non-optimized CPU ++#include ++#include ++ ++static inline int64_t cpu_get_real_ticks (void) ++{ ++ struct timeval tv; ++ static int64_t i = 0; ++ int64_t j; ++ ++ gettimeofday(&tv, NULL); ++ do { ++ j = (tv.tv_sec * (uint64_t) 1000000) + tv.tv_usec; ++ } while (i == j); ++ i = j; ++ return j; ++} + #endif + + /* profiling */ diff --git a/emulators/qemu/patches/patch-vl_c b/emulators/qemu/patches/patch-vl_c index 2fe84be6b2c..a9aad5da4dd 100644 --- a/emulators/qemu/patches/patch-vl_c +++ b/emulators/qemu/patches/patch-vl_c @@ -1,5 +1,5 @@ --- vl.c.orig Sat Jul 22 19:23:34 2006 -+++ vl.c Tue Jan 16 19:51:19 2007 ++++ vl.c Mon Feb 19 11:30:23 2007 @@ -43,7 +43,8 @@ #include #ifdef _BSD @@ -178,32 +178,7 @@ } } else #endif -@@ -5453,7 +5538,23 @@ void register_machines(void) - #elif defined(TARGET_SH4) - qemu_register_machine(&shix_machine); - #else --#error unsupported CPU -+# warning non-optimized CPU -+#include -+#include -+ -+int64_t cpu_get_real_ticks(void) -+{ -+ struct timeval tv; -+ static int64_t i = 0; -+ int64_t j; -+ -+ gettimeofday(&tv, NULL); -+ do { -+ j = (tv.tv_sec * (uint64_t) 1000000) + tv.tv_usec; -+ } while (i == j); -+ i = j; -+ return j; -+} - #endif - } - -@@ -5671,7 +5772,7 @@ int main(int argc, char **argv) +@@ -5671,7 +5756,7 @@ int main(int argc, char **argv) serial_devices[i][0] = '\0'; serial_device_index = 0;