Index: Makefile =================================================================== RCS file: /home/pcvs/ports/emulators/qemu-devel/Makefile,v retrieving revision 1.108 diff -u -p -r1.108 Makefile --- Makefile 8 Feb 2010 22:19:28 -0000 1.108 +++ Makefile 14 Feb 2010 15:07:36 -0000 @@ -6,26 +6,28 @@ # PORTNAME= qemu -PORTVERSION= 0.12.2 -PORTREVISION= 2 +PORTVERSION= 0.12.50s.20100214 CATEGORIES= emulators MASTER_SITES= ${MASTER_SITE_SAVANNAH}:release \ ${MASTER_SITE_LOCAL}:snapshot \ http://people.freebsd.org/~nox/qemu/:snapshot MASTER_SITE_SUBDIR= qemu/:release nox/:snapshot PKGNAMESUFFIX= -devel -DISTFILES= ${DISTNAME}${EXTRACT_SUFX}:release +DISTNAME= ${PORTNAME}-snapshot-20100214_12 +DISTFILES= ${DISTNAME}${EXTRACT_SUFX}:snapshot DIST_SUBDIR= qemu MAINTAINER= nox@FreeBSD.org COMMENT= QEMU CPU Emulator - development snapshot HAS_CONFIGURE= yes +USE_BZIP2= yes USE_GMAKE= yes USE_PERL5= yes PATCH_STRIP= -p1 MAKE_ENV+= BSD_MAKE="${MAKE}" LDFLAGS="${LDFLAGS}" MAN1= qemu.1 qemu-img.1 +MAN8= qemu-nbd.8 ONLY_FOR_ARCHS= amd64 i386 powerpc CONFLICTS= qemu-[0-9]* MAKE_JOBS_SAFE= yes @@ -50,7 +52,7 @@ PLIST_SUB+= ALLTARGETS="" WITHOUT_CPU_CFLAGS=yes #to avoid problems with register allocation CFLAGS:= ${CFLAGS:C/-fno-tree-vrp//} -CONFIGURE_ARGS+= --prefix=${PREFIX} --cc=${CC} +CONFIGURE_ARGS+= --prefix=${PREFIX} --cc=${CC} --enable-docs .if defined(WITHOUT_SDL) CONFIGURE_ARGS+= --disable-sdl Index: distinfo =================================================================== RCS file: /home/pcvs/ports/emulators/qemu-devel/distinfo,v retrieving revision 1.52 diff -u -p -r1.52 distinfo --- distinfo 19 Jan 2010 22:06:58 -0000 1.52 +++ distinfo 14 Feb 2010 13:41:31 -0000 @@ -1,3 +1,3 @@ -MD5 (qemu/qemu-0.12.2.tar.gz) = 1d7c2d95acb6d0789de86508c608e26d -SHA256 (qemu/qemu-0.12.2.tar.gz) = accec2eec7dbd89e0b49474d1a0277ae3e7239a7700754b1cfb192f091766843 -SIZE (qemu/qemu-0.12.2.tar.gz) = 4691757 +MD5 (qemu/qemu-snapshot-20100214_12.tar.bz2) = 70e5d254a050701d78d2064a91c10d5a +SHA256 (qemu/qemu-snapshot-20100214_12.tar.bz2) = b25e1be65d6ac43a70eba517858a526cc90cb75fe833933f92df727e8fef783d +SIZE (qemu/qemu-snapshot-20100214_12.tar.bz2) = 3617027 Index: pkg-plist =================================================================== RCS file: /home/pcvs/ports/emulators/qemu-devel/pkg-plist,v retrieving revision 1.26 diff -u -p -r1.26 pkg-plist --- pkg-plist 17 Jan 2010 16:20:32 -0000 1.26 +++ pkg-plist 14 Feb 2010 15:07:19 -0000 @@ -1,6 +1,7 @@ bin/qemu bin/qemu-img bin/qemu-io +bin/qemu-nbd %%ALLTARGETS%%bin/qemu-system-arm %%ALLTARGETS%%bin/qemu-system-cris %%ALLTARGETS%%bin/qemu-system-m68k Index: files/patch-90_security =================================================================== RCS file: /home/pcvs/ports/emulators/qemu-devel/files/patch-90_security,v retrieving revision 1.6 diff -u -p -r1.6 patch-90_security --- files/patch-90_security 17 Jan 2010 16:20:55 -0000 1.6 +++ files/patch-90_security 14 Feb 2010 13:46:02 -0000 @@ -1,11 +1,8 @@ -Index: qemu-0.8.2/hw/dma.c -=================================================================== ---- qemu-0.8.2.orig/hw/dma.c 2006-07-22 20:23:34.000000000 +0300 -+++ qemu-0.8.2/hw/dma.c 2007-04-20 06:05:59.000000000 +0300 -@@ -340,9 +340,11 @@ static void channel_run (int ncont, int +Index: qemu/hw/dma.c +@@ -344,9 +344,11 @@ static void channel_run (int ncont, int + } #endif - r = dma_controllers[ncont].regs + ichan; - n = r->transfer_handler (r->opaque, ichan + (ncont << 2), - r->now[COUNT], (r->base[COUNT] + 1) << ncont); - r->now[COUNT] = n; Index: files/patch-Makefile =================================================================== RCS file: /home/pcvs/ports/emulators/qemu-devel/files/patch-Makefile,v retrieving revision 1.7 diff -u -p -r1.7 patch-Makefile --- files/patch-Makefile 17 Jan 2010 16:20:55 -0000 1.7 +++ files/patch-Makefile 14 Feb 2010 15:06:52 -0000 @@ -11,7 +11,7 @@ Index: qemu/Makefile else DOCS= endif -@@ -213,13 +217,13 @@ +@@ -213,13 +217,15 @@ endif install-doc: $(DOCS) @@ -22,8 +22,8 @@ Index: qemu/Makefile ifdef CONFIG_POSIX $(INSTALL_DIR) "$(DESTDIR)$(mandir)/man1" $(INSTALL_DATA) qemu.1 qemu-img.1 "$(DESTDIR)$(mandir)/man1" -- $(INSTALL_DIR) "$(DESTDIR)$(mandir)/man8" -- $(INSTALL_DATA) qemu-nbd.8 "$(DESTDIR)$(mandir)/man8" + $(INSTALL_DIR) "$(DESTDIR)$(mandir)/man8" + $(INSTALL_DATA) qemu-nbd.8 "$(DESTDIR)$(mandir)/man8" endif install: all $(if $(BUILD_DOCS),install-doc) Index: files/patch-audio-ossaudio.c =================================================================== RCS file: /home/pcvs/ports/emulators/qemu-devel/files/patch-audio-ossaudio.c,v retrieving revision 1.1 diff -u -p -r1.1 patch-audio-ossaudio.c --- files/patch-audio-ossaudio.c 17 Jan 2010 16:20:56 -0000 1.1 +++ files/patch-audio-ossaudio.c 14 Feb 2010 13:42:06 -0000 @@ -1,110 +0,0 @@ ---- a/audio/ossaudio.c -+++ b/audio/ossaudio.c -@@ -38,6 +38,10 @@ - #define AUDIO_CAP "oss" - #include "audio_int.h" - -+#if defined OSS_GETVERSION && defined SNDCTL_DSP_POLICY -+#define USE_DSP_POLICY -+#endif -+ - typedef struct OSSVoiceOut { - HWVoiceOut hw; - void *pcm_buf; -@@ -236,14 +240,39 @@ static void oss_dump_info (struct oss_pa - } - #endif - -+#ifdef USE_DSP_POLICY -+static int oss_get_version (int fd, int *version, const char *typ) -+{ -+ if (ioctl (fd, OSS_GETVERSION, &version)) { -+#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) -+ /* -+ * Looks like atm (20100109) FreeBSD knows OSS_GETVERSION -+ * since 7.x, but currently only on the mixer device (or in -+ * the Linuxolator), and in the native version that part of -+ * the code is in fact never reached so the ioctl fails anyway. -+ * Until this is fixed, just check the errno and if its what -+ * FreeBSD's sound drivers return atm assume they are new enough. -+ */ -+ if (errno == EINVAL) { -+ *version = 0x040000; -+ return 0; -+ } -+#endif -+ oss_logerr2 (errno, typ, "Failed to get OSS version\n"); -+ return -1; -+ } -+ return 0; -+} -+#endif -+ - static int oss_open (int in, struct oss_params *req, - struct oss_params *obt, int *pfd) - { - int fd; -- int version; - int oflags = conf.exclusive ? O_EXCL : 0; - audio_buf_info abinfo; - int fmt, freq, nchannels; -+ int setfragment = 1; - const char *dspname = in ? conf.devpath_in : conf.devpath_out; - const char *typ = in ? "ADC" : "DAC"; - -@@ -281,27 +310,30 @@ static int oss_open (int in, struct oss_ - goto err; - } - -- if (ioctl (fd, OSS_GETVERSION, &version)) { -- oss_logerr2 (errno, typ, "Failed to get OSS version\n"); -- version = 0; -- } -+#ifdef USE_DSP_POLICY -+ if (conf.policy >= 0) { -+ int version; - -- if (conf.debug) { -- dolog ("OSS version = %#x\n", version); -- } -+ if (!oss_get_version (fd, &version, typ)) { -+ if (conf.debug) { -+ dolog ("OSS version = %#x\n", version); -+ } - --#ifdef SNDCTL_DSP_POLICY -- if (conf.policy >= 0 && version >= 0x040000) { -- int policy = conf.policy; -- if (ioctl (fd, SNDCTL_DSP_POLICY, &policy)) { -- oss_logerr2 (errno, typ, "Failed to set timing policy to %d\n", -- conf.policy); -- goto err; -+ if (version >= 0x040000) { -+ int policy = conf.policy; -+ if (ioctl (fd, SNDCTL_DSP_POLICY, &policy)) { -+ oss_logerr2 (errno, typ, -+ "Failed to set timing policy to %d\n", -+ conf.policy); -+ goto err; -+ } -+ setfragment = 0; -+ } - } - } -- else - #endif -- { -+ -+ if (setfragment) { - int mmmmssss = (req->nfrags << 16) | ctz32 (req->fragsize); - if (ioctl (fd, SNDCTL_DSP_SETFRAGMENT, &mmmmssss)) { - oss_logerr2 (errno, typ, "Failed to set buffer length (%d, %d)\n", -@@ -857,7 +889,7 @@ static struct audio_option oss_options[] - .valp = &conf.exclusive, - .descr = "Open device in exclusive mode (vmix wont work)" - }, --#ifdef SNDCTL_DSP_POLICY -+#ifdef USE_DSP_POLICY - { - .name = "POLICY", - .tag = AUD_OPT_INT, Index: files/patch-bsd-user-ld =================================================================== RCS file: /home/pcvs/ports/emulators/qemu-devel/files/patch-bsd-user-ld,v retrieving revision 1.1 diff -u -p -r1.1 patch-bsd-user-ld --- files/patch-bsd-user-ld 17 Jan 2010 16:20:56 -0000 1.1 +++ files/patch-bsd-user-ld 14 Feb 2010 14:09:39 -0000 @@ -1,6 +1,29 @@ --- a/x86_64.ld +++ b/x86_64.ld -@@ -59,8 +59,6 @@ +@@ -35,20 +35,8 @@ SECTIONS + .rela.got : { *(.rela.got) } + .rel.bss : { *(.rel.bss .rel.bss.* .rel.gnu.linkonce.b.*) } + .rela.bss : { *(.rela.bss .rela.bss.* .rela.gnu.linkonce.b.*) } +- .rel.plt : +- { +- *(.rel.plt) +- PROVIDE_HIDDEN (__rel_iplt_start = .); +- *(.rel.iplt) +- PROVIDE_HIDDEN (__rel_iplt_end = .); +- } +- .rela.plt : +- { +- *(.rela.plt) +- PROVIDE_HIDDEN (__rela_iplt_start = .); +- *(.rela.iplt) +- PROVIDE_HIDDEN (__rela_iplt_end = .); +- } ++ .rel.plt : { *(.rel.plt) } ++ .rela.plt : { *(.rela.plt) } + .init : + { + KEEP (*(.init)) +@@ -70,8 +58,6 @@ SECTIONS .rodata : { *(.rodata .rodata.* .gnu.linkonce.r.*) } .rodata1 : { *(.rodata1) } .eh_frame_hdr : { *(.eh_frame_hdr) } @@ -9,7 +32,7 @@ /* Adjust the address for the data segment. We want to adjust up to the same address within the page on the next page up. */ . = ALIGN (0x100000) - ((0x100000 - .) & (0x100000 - 1)); . = DATA_SEGMENT_ALIGN (0x100000, 0x1000); -@@ -86,8 +84,8 @@ +@@ -97,8 +83,8 @@ SECTIONS .data1 : { *(.data1) } .tdata : { *(.tdata .tdata.* .gnu.linkonce.td.*) } .tbss : { *(.tbss .tbss.* .gnu.linkonce.tb.*) *(.tcommon) } @@ -22,7 +45,7 @@ { --- a/i386.ld +++ b/i386.ld -@@ -1,57 +1,76 @@ +@@ -1,69 +1,76 @@ -/* ld script to make i386 Linux kernel - * Written by Martin Mares ; - */ @@ -66,8 +89,20 @@ - .rela.fini : { *(.rela.fini) } - .rel.bss : { *(.rel.bss) } - .rela.bss : { *(.rela.bss) } -- .rel.plt : { *(.rel.plt) } -- .rela.plt : { *(.rela.plt) } +- .rel.plt : +- { +- *(.rel.plt) +- PROVIDE_HIDDEN (__rel_iplt_start = .); +- *(.rel.iplt) +- PROVIDE_HIDDEN (__rel_iplt_end = .); +- } +- .rela.plt : +- { +- *(.rela.plt) +- PROVIDE_HIDDEN (__rela_iplt_start = .); +- *(.rela.iplt) +- PROVIDE_HIDDEN (__rela_iplt_end = .); +- } - .init : { *(.init) } =0x47ff041f - .text : + PROVIDE (__executable_start = 0x60000000); . = 0x60000000 + SIZEOF_HEADERS; @@ -109,13 +144,13 @@ + .rel.plt : { *(.rel.plt) } + .rela.plt : { *(.rela.plt) } + .init : - { -- *(.text) ++ { + KEEP (*(.init)) + } =0x90909090 + .plt : { *(.plt) } + .text : -+ { + { +- *(.text) + *(.text .stub .text.* .gnu.linkonce.t.*) /* .gnu.warning sections are handled specially by elf32.em. */ *(.gnu.warning) @@ -144,126 +179,3 @@ . = ALIGN(32 / 8); PROVIDE (__preinit_array_start = .); .preinit_array : { *(.preinit_array) } -@@ -62,56 +81,71 @@ - PROVIDE (__fini_array_start = .); - .fini_array : { *(.fini_array) } - PROVIDE (__fini_array_end = .); -- .rodata : { *(.rodata) *(.gnu.linkonce.r*) } -- .rodata1 : { *(.rodata1) } -- .reginfo : { *(.reginfo) } -- /* Adjust the address for the data segment. We want to adjust up to -- the same address within the page on the next page up. */ -- . = ALIGN(0x100000) + (. & (0x100000 - 1)); -- .tdata : { *(.tdata .tdata.* .gnu.linkonce.td.*) } -- .tbss : { *(.tbss .tbss.* .gnu.linkonce.tb.*) *(.tcommon) } -- .data : -+ .data : - { -- *(.data) -- *(.gnu.linkonce.d*) -- CONSTRUCTORS -+ *(.data .data.* .gnu.linkonce.d.*) -+ SORT(CONSTRUCTORS) - } -- .data1 : { *(.data1) } -- .ctors : -+ .data1 : { *(.data1) } -+ .tdata : { *(.tdata .tdata.* .gnu.linkonce.td.*) } -+ .tbss : { *(.tbss .tbss.* .gnu.linkonce.tb.*) *(.tcommon) } -+ .eh_frame : { KEEP (*(.eh_frame)) } -+ .gcc_except_table : { *(.gcc_except_table) } -+ .dynamic : { *(.dynamic) } -+ .ctors : - { -- *(.ctors) -+ /* gcc uses crtbegin.o to find the start of -+ the constructors, so we make sure it is -+ first. Because this is a wildcard, it -+ doesn't matter if the user does not -+ actually link against crtbegin.o; the -+ linker won't look for a file to match a -+ wildcard. The wildcard also means that it -+ doesn't matter which directory crtbegin.o -+ is in. */ -+ KEEP (*crtbegin*.o(.ctors)) -+ /* We don't want to include the .ctor section from -+ from the crtend.o file until after the sorted ctors. -+ The .ctor section from the crtend file contains the -+ end of ctors marker and it must be last */ -+ KEEP (*(EXCLUDE_FILE (*crtend*.o ) .ctors)) -+ KEEP (*(SORT(.ctors.*))) -+ KEEP (*(.ctors)) - } -- .dtors : -+ .dtors : - { -- *(.dtors) -+ KEEP (*crtbegin*.o(.dtors)) -+ KEEP (*(EXCLUDE_FILE (*crtend*.o ) .dtors)) -+ KEEP (*(SORT(.dtors.*))) -+ KEEP (*(.dtors)) - } -- .plt : { *(.plt) } -- .got : { *(.got.plt) *(.got) } -- .dynamic : { *(.dynamic) } -- /* We want the small data sections together, so single-instruction offsets -- can access them all, and initialized data all before uninitialized, so -- we can shorten the on-disk segment size. */ -- .sdata : { *(.sdata) } -- _edata = .; -+ .jcr : { KEEP (*(.jcr)) } -+ .got : { *(.got.plt) *(.got) } -+ _edata = .; - PROVIDE (edata = .); - __bss_start = .; -- .sbss : { *(.sbss) *(.scommon) } -- .bss : -+ .bss : - { - *(.dynbss) -- *(.bss) -+ *(.bss .bss.* .gnu.linkonce.b.*) - *(COMMON) -+ /* Align here to ensure that the .bss section occupies space up to -+ _end. Align after .bss to ensure correct alignment even if the -+ .bss section disappears because there are no input sections. */ -+ . = ALIGN(32 / 8); - } -- _end = . ; -+ . = ALIGN(32 / 8); -+ _end = .; - PROVIDE (end = .); -+ . = DATA_SEGMENT_END (.); - /* Stabs debugging sections. */ -- .stab 0 : { *(.stab) } -- .stabstr 0 : { *(.stabstr) } -- .stab.excl 0 : { *(.stab.excl) } -- .stab.exclstr 0 : { *(.stab.exclstr) } -- .stab.index 0 : { *(.stab.index) } -+ .stab 0 : { *(.stab) } -+ .stabstr 0 : { *(.stabstr) } -+ .stab.excl 0 : { *(.stab.excl) } -+ .stab.exclstr 0 : { *(.stab.exclstr) } -+ .stab.index 0 : { *(.stab.index) } - .stab.indexstr 0 : { *(.stab.indexstr) } -- .comment 0 : { *(.comment) } -+ .comment 0 : { *(.comment) } - /* DWARF debug sections. - Symbols in the DWARF debugging sections are relative to the beginning - of the section so we begin them at 0. */ -@@ -125,7 +159,7 @@ - .debug_aranges 0 : { *(.debug_aranges) } - .debug_pubnames 0 : { *(.debug_pubnames) } - /* DWARF 2 */ -- .debug_info 0 : { *(.debug_info) } -+ .debug_info 0 : { *(.debug_info .gnu.linkonce.wi.*) } - .debug_abbrev 0 : { *(.debug_abbrev) } - .debug_line 0 : { *(.debug_line) } - .debug_frame 0 : { *(.debug_frame) } -@@ -137,5 +171,5 @@ - .debug_funcnames 0 : { *(.debug_funcnames) } - .debug_typenames 0 : { *(.debug_typenames) } - .debug_varnames 0 : { *(.debug_varnames) } -- /* These must appear regardless of . */ -+ /DISCARD/ : { *(.note.GNU-stack) } - } Index: files/patch-configure =================================================================== RCS file: /home/pcvs/ports/emulators/qemu-devel/files/patch-configure,v retrieving revision 1.4 diff -u -p -r1.4 patch-configure --- files/patch-configure 17 Jan 2010 16:20:56 -0000 1.4 +++ files/patch-configure 14 Feb 2010 13:53:40 -0000 @@ -1,11 +1,10 @@ Index: qemu/configure -@@ -1605,17 +1605,18 @@ +@@ -1741,16 +1741,16 @@ if compile_prog "" "" ; then fi # Check if tools are available to build documentation. -if test "$docs" != "no" ; then -- if test -x "`which texi2html 2>/dev/null`" -a \ -- -x "`which pod2man 2>/dev/null`" ; then +- if has texi2html && has pod2man; then - docs=yes - else - if test "$docs" = "yes" ; then @@ -15,8 +14,7 @@ Index: qemu/configure - fi -fi +#if test "$docs" != "no" ; then -+# if test -x "`which texi2html 2>/dev/null`" -a \ -+# -x "`which pod2man 2>/dev/null`" ; then ++# if has texi2html && has pod2man; then +# docs=yes +# else +# if test "$docs" = "yes" ; then @@ -25,7 +23,6 @@ Index: qemu/configure +# docs=no +# fi +#fi -+docs=yes # Search for bswap_32 function byteswap_h=no Index: files/patch-fbsd =================================================================== RCS file: /home/pcvs/ports/emulators/qemu-devel/files/patch-fbsd,v retrieving revision 1.14 diff -u -p -r1.14 patch-fbsd --- files/patch-fbsd 17 Jan 2010 16:20:56 -0000 1.14 +++ files/patch-fbsd 14 Feb 2010 14:52:17 -0000 @@ -20,24 +20,17 @@ Index: qemu/Makefile rm -f *.o *.d *.a $(TOOLS) TAGS cscope.* *.pod *~ */*~ rm -f slirp/*.o slirp/*.d audio/*.o audio/*.d block/*.o block/*.d net/*.o net/*.d Index: qemu/Makefile.target -@@ -137,7 +137,7 @@ +@@ -330,8 +330,8 @@ endif # CONFIG_SOFTMMU - obj-i386-y += ioport-user.o + obj-$(CONFIG_GDBSTUB_XML) += gdbstub-xml.o --ARLIBS=../libuser/libuser.a libqemu.a -+ARLIBS=../libuser/libuser.a libqemu.a ../bsd/libmath.a +-$(QEMU_PROG): $(obj-y) $(obj-$(TARGET_BASE_ARCH)-y) +- $(call LINK,$(obj-y) $(obj-$(TARGET_BASE_ARCH)-y)) ++$(QEMU_PROG): $(obj-y) $(obj-$(TARGET_BASE_ARCH)-y) ../bsd/libmath.a ++ $(call LINK,$(obj-y) $(obj-$(TARGET_BASE_ARCH)-y) ../bsd/libmath.a) - endif #CONFIG_BSD_USER - -@@ -293,7 +293,7 @@ - - monitor.o: qemu-monitor.h - --ARLIBS=../libqemu_common.a libqemu.a $(HWLIB) -+ARLIBS=../libqemu_common.a libqemu.a $(HWLIB) ../bsd/libmath.a - - endif # CONFIG_SOFTMMU + gdbstub-xml.c: $(TARGET_XML_FILES) $(SRC_PATH)/feature_to_c.sh Index: qemu/fpu/softfloat-native.c @@ -9,7 +9,8 @@ void set_float_rounding_mode(int val STATUS_PARAM)