Index: Makefile =================================================================== RCS file: /home/pcvs/ports/emulators/qemu-devel/Makefile,v retrieving revision 1.109 diff -u -p -r1.109 Makefile --- Makefile 1 Mar 2010 20:05:17 -0000 1.109 +++ Makefile 11 Mar 2010 19:06:22 -0000 @@ -2,35 +2,37 @@ # Date created: 2004/05/31 # Whom: Juergen Lock # -# $FreeBSD: ports/emulators/qemu-devel/Makefile,v 1.109 2010/03/01 20:05:17 nox Exp $ +# $FreeBSD: ports/emulators/qemu-devel/Makefile,v 1.108 2010/02/08 22:19:28 nox Exp $ # PORTNAME= qemu -PORTVERSION= 0.12.3 +PORTVERSION= 0.12.50s.20100307 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-20100307_14 +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 -OPTIONS= RTL8139_TIMER "allow use of re(4) nic with FreeBSD guests" Off \ - SAMBA "samba dependency (for -smb)" Off \ +OPTIONS= SAMBA "samba dependency (for -smb)" Off \ SDL "SDL/X dependency (graphical output)" On \ GNUTLS "gnutls dependency (vnc encryption)" On \ PCAP "pcap dependency (networking with bpf)" On \ @@ -49,7 +51,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 @@ -109,9 +111,6 @@ post-patch: .endif .endif -.if defined(WITH_RTL8139_TIMER) - @cd ${WRKSRC} && ${PATCH} --quiet < ${FILESDIR}/rtl8139-re-patch -.endif .if defined(WITH_PCAP) @cd ${WRKSRC} && ${PATCH} --quiet < ${FILESDIR}/pcap-patch .endif Index: distinfo =================================================================== RCS file: /home/pcvs/ports/emulators/qemu-devel/distinfo,v retrieving revision 1.53 diff -u -p -r1.53 distinfo --- distinfo 1 Mar 2010 20:05:17 -0000 1.53 +++ distinfo 11 Mar 2010 17:03:44 -0000 @@ -1,3 +1,3 @@ -MD5 (qemu/qemu-0.12.3.tar.gz) = d215e4568650e8019816397174c090e1 -SHA256 (qemu/qemu-0.12.3.tar.gz) = 3ce26f8fb0a59418b2064a26bac4b40ea4e493acbc3df7ad5932635477fade4b -SIZE (qemu/qemu-0.12.3.tar.gz) = 4693581 +MD5 (qemu/qemu-snapshot-20100307_14.tar.bz2) = 9c314765c86993a7e6631a98f17dccb5 +SHA256 (qemu/qemu-snapshot-20100307_14.tar.bz2) = d31f5759961e9acfbc52ef8157e21d99c789b08721621905555fe70340002678 +SIZE (qemu/qemu-snapshot-20100307_14.tar.bz2) = 3660899 Index: pkg-message =================================================================== RCS file: /home/pcvs/ports/emulators/qemu-devel/pkg-message,v retrieving revision 1.33 diff -u -p -r1.33 pkg-message --- pkg-message 8 Feb 2010 22:19:28 -0000 1.33 +++ pkg-message 11 Mar 2010 19:06:44 -0000 @@ -69,16 +69,6 @@ FreeBSD host notes (linux') uhci module got loaded. Workaround: either add devices before linux loads the module or rmmod and modprobe it afterwards. -- To avoid panics or non-working re(4) nics with FreeBSD guests if you use - qemu -net nic,model=rtl8139 -net user or tap ... enable the emulated rtl8139 - timer by building the port with RTL8139_TIMER enabled. (The rtl8139c+ that - model=rtl8139 emulates needs less cpu than qemu's default ne2k nic which is - driven by ed(4), it has not been made default only because it may not work - with all guests yet. Btw qemu now also can emulate a few intel eepro100 and - e1000 nics which seem to be a tad more efficient even, and at least i82557b - and e1000 work without tweaks for FreeBSD guests - driven by fxp(4) and - em(4) repectively - and Linux guests too.) - - If you get repeated `atapi_poll called!' console messages with FreeBSD guests or other weird cdrom problems then thats probably because the guest has atapicam loaded, which for reasons still to be determined has problems 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 11 Mar 2010 17:03:44 -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 @@ -27,6 +28,10 @@ etc/qemu-ifup.sample @unexec if cmp -s %D/etc/qemu-ifdown.sample %D/etc/qemu-ifdown; then rm -f %D/etc/qemu-ifdown; fi etc/qemu-ifdown.sample @exec if [ ! -f %D/etc/qemu-ifdown ] ; then cp -p %D/%F %B/qemu-ifdown; fi +@unexec if cmp -s %D/etc/qemu/target-x86_64.conf.sample %D/etc/qemu/target-x86_64.conf; then rm -f %D/etc/qemu/target-x86_64.conf; fi +etc/qemu/target-x86_64.conf.sample +@exec if [ ! -f %D/etc/qemu/target-x86_64.conf ] ; then cp -p %D/%F %B/etc/qemu/target-x86_64.conf; fi +@dirrmtry etc/qemu %%PORTDOCS%%%%DOCSDIR%%/qemu-doc.html %%PORTDOCS%%%%DOCSDIR%%/qemu-tech.html %%PORTDOCS%%@dirrm %%DOCSDIR%% @@ -39,11 +44,12 @@ etc/qemu-ifdown.sample %%DATADIR%%/openbios-sparc64 %%DATADIR%%/video.x %%DATADIR%%/pxe-e1000.bin -%%DATADIR%%/pxe-i82559er.bin %%DATADIR%%/pxe-ne2k_pci.bin %%DATADIR%%/pxe-rtl8139.bin %%DATADIR%%/pxe-pcnet.bin %%DATADIR%%/pxe-virtio.bin +%%DATADIR%%/gpxe-eepro100-80861209.rom +%%DATADIR%%/gpxe-eepro100-80861229.rom %%DATADIR%%/linuxboot.bin %%DATADIR%%/multiboot.bin %%DATADIR%%/petalogix-s3adsp1800.dtb 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 11 Mar 2010 17:03:44 -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 11 Mar 2010 17:03:44 -0000 @@ -1,5 +1,5 @@ Index: qemu/Makefile -@@ -19,7 +19,11 @@ +@@ -29,7 +29,11 @@ $(call set-vpath, $(SRC_PATH):$(SRC_PATH LIBS+=-lz $(LIBS_TOOLS) ifdef BUILD_DOCS @@ -11,7 +11,7 @@ Index: qemu/Makefile else DOCS= endif -@@ -213,13 +217,13 @@ +@@ -184,8 +188,10 @@ BLOBS= endif install-doc: $(DOCS) @@ -22,8 +22,15 @@ 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" - endif +@@ -195,7 +201,10 @@ endif + + install-sysconfig: + $(INSTALL_DIR) "$(sysconfdir)/qemu" +- $(INSTALL_DATA) $(SRC_PATH)/sysconfigs/target/target-x86_64.conf "$(sysconfdir)/qemu" ++ $(INSTALL_DATA) $(SRC_PATH)/sysconfigs/target/target-x86_64.conf "$(sysconfdir)/qemu/target-x86_64.conf.sample" ++ if [ ! -f "$(sysconfdir)/qemu/target-x86_64.conf" ]; then \ ++ $(INSTALL_DATA) $(SRC_PATH)/sysconfigs/target/target-x86_64.conf "$(sysconfdir)/qemu"; \ ++ fi - install: all $(if $(BUILD_DOCS),install-doc) + install: all $(if $(BUILD_DOCS),install-doc) install-sysconfig + $(INSTALL_DIR) "$(DESTDIR)$(bindir)" 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 11 Mar 2010 17:03:44 -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 11 Mar 2010 17:03:44 -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-cache-utils.c =================================================================== RCS file: /home/pcvs/ports/emulators/qemu-devel/files/patch-cache-utils.c,v retrieving revision 1.1 diff -u -p -r1.1 patch-cache-utils.c --- files/patch-cache-utils.c 8 Feb 2010 22:19:29 -0000 1.1 +++ files/patch-cache-utils.c 11 Mar 2010 16:51:52 -0000 @@ -1,26 +1,13 @@ --- a/cache-utils.c -+++ b/cache-utils.c -@@ -57,6 +57,23 @@ - } ++++ a/cache-utils.c +@@ -58,7 +58,10 @@ static void ppc_init_cacheline_sizes(voi #endif -+#ifdef __FreeBSD__ -+#include -+#include -+#include -+ -+static void ppc_init_cacheline_sizes(void) -+{ -+ size_t len = 4; -+ unsigned cacheline; -+ -+ sysctlbyname ("machdep.cacheline_size", &cacheline, &len, NULL, 0); -+ -+ qemu_cache_conf.dcache_bsize = cacheline; -+ qemu_cache_conf.icache_bsize = cacheline; -+} -+#endif -+ - #ifdef __linux__ - void qemu_cache_utils_init(char **envp) - { + #if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) ++#include + #include ++#include ++#include + #include + #include + 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 11 Mar 2010 17:03:44 -0000 @@ -1,11 +1,10 @@ Index: qemu/configure -@@ -1605,17 +1605,18 @@ +@@ -1749,16 +1749,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 makeinfo && 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 makeinfo && 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-cpu-exec.c =================================================================== RCS file: /home/pcvs/ports/emulators/qemu-devel/files/patch-cpu-exec.c,v retrieving revision 1.7 diff -u -p -r1.7 patch-cpu-exec.c --- files/patch-cpu-exec.c 8 Feb 2010 22:19:29 -0000 1.7 +++ files/patch-cpu-exec.c 11 Mar 2010 17:03:44 -0000 @@ -1,35 +0,0 @@ ---- a/cpu-exec.c -+++ b/cpu-exec.c -@@ -933,6 +933,20 @@ - # define TRAP_sig(context) REG_sig(trap, context) - #endif /* linux */ - -+#ifdef __FreeBSD__ -+#include -+# define IAR_sig(context) ((context)->uc_mcontext.mc_srr0) -+# define MSR_sig(context) ((context)->uc_mcontext.mc_srr1) -+# define CTR_sig(context) ((context)->uc_mcontext.mc_ctr) -+# define XER_sig(context) ((context)->uc_mcontext.mc_xer) -+# define LR_sig(context) ((context)->uc_mcontext.mc_lr) -+# define CR_sig(context) ((context)->uc_mcontext.mc_cr) -+/* Exception Registers access */ -+# define DAR_sig(context) ((context)->uc_mcontext.mc_dar) -+# define DSISR_sig(context) ((context)->uc_mcontext.mc_dsisr) -+# define TRAP_sig(context) ((context)->uc_mcontext.mc_exc) -+#endif /* __FreeBSD__ */ -+ - #ifdef __APPLE__ - # include - typedef struct ucontext SIGCONTEXT; -@@ -962,7 +976,11 @@ - void *puc) - { - siginfo_t *info = pinfo; -+#if defined (__FreeBSD__) -+ ucontext_t *uc = puc; -+#else - struct ucontext *uc = puc; -+#endif - unsigned long pc; - int is_write; - 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 11 Mar 2010 17:03:44 -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) Index: files/patch-tcg-ppc-tcg_target.h =================================================================== RCS file: /home/pcvs/ports/emulators/qemu-devel/files/patch-tcg-ppc-tcg_target.h,v retrieving revision 1.1 diff -u -p -r1.1 patch-tcg-ppc-tcg_target.h --- files/patch-tcg-ppc-tcg_target.h 8 Feb 2010 22:19:29 -0000 1.1 +++ files/patch-tcg-ppc-tcg_target.h 11 Mar 2010 17:03:44 -0000 @@ -1,11 +0,0 @@ ---- a/tcg/ppc/tcg-target.h -+++ b/tcg/ppc/tcg-target.h -@@ -69,7 +69,7 @@ - #define TCG_TARGET_CALL_STACK_OFFSET 24 - #elif defined _AIX - #define TCG_TARGET_CALL_STACK_OFFSET 52 --#elif defined __linux__ -+#elif defined __linux__ || defined __FreeBSD__ - #define TCG_TARGET_CALL_ALIGN_ARGS 1 - #define TCG_TARGET_CALL_STACK_OFFSET 8 - #else Index: files/pcap-patch =================================================================== RCS file: /home/pcvs/ports/emulators/qemu-devel/files/pcap-patch,v retrieving revision 1.4 diff -u -p -r1.4 pcap-patch --- files/pcap-patch 1 Mar 2010 20:05:17 -0000 1.4 +++ files/pcap-patch 11 Mar 2010 17:03:44 -0000 @@ -337,7 +337,7 @@ Index: net.c #define NET_COMMON_PARAMS_DESC \ { \ .name = "type", \ -@@ -977,6 +1202,20 @@ static struct { +@@ -977,6 +1202,20 @@ static const struct { #endif /* _WIN32 */ { /* end of list */ } }, @@ -358,6 +358,14 @@ Index: net.c }, { .type = "socket", .init = net_init_socket, +@@ -1296,6 +1535,7 @@ void net_check_clients(void) + case NET_CLIENT_TYPE_TAP: + case NET_CLIENT_TYPE_SOCKET: + case NET_CLIENT_TYPE_VDE: ++ case NET_CLIENT_TYPE_PCAP: + has_host_dev = 1; + break; + default: ; --- qemu-options.hx.orig 2010-01-14 17:18:00.000000000 -0500 +++ qemu-options.hx 2010-01-29 14:36:00.000000000 -0500 @@ -799,6 +799,10 @@ DEF("smb", HAS_ARG, QEMU_OPTION_smb, "") Index: files/rtl8139-re-patch =================================================================== RCS file: /home/pcvs/ports/emulators/qemu-devel/files/rtl8139-re-patch,v retrieving revision 1.2 diff -u -p -r1.2 rtl8139-re-patch --- files/rtl8139-re-patch 10 Mar 2007 17:03:05 -0000 1.2 +++ files/rtl8139-re-patch 11 Mar 2010 19:06:04 -0000 @@ -1,10 +0,0 @@ -Index: hw/rtl8139.c -@@ -58,7 +58,7 @@ - //#define RTL8139_CALCULATE_RXCRC 1 - - /* Uncomment to enable on-board timer interrupts */ --//#define RTL8139_ONBOARD_TIMER 1 -+#define RTL8139_ONBOARD_TIMER 1 - - #if defined(RTL8139_CALCULATE_RXCRC) - /* For crc32 */