summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--emulators/qemu-devel/Makefile4
-rw-r--r--emulators/qemu-devel/files/extra-patch-6201cb17ad905dffee1b2eb76f58fb032e99b2a111
-rw-r--r--emulators/qemu-devel/files/extra-patch-bsd-user-mmap.c18
3 files changed, 32 insertions, 1 deletions
diff --git a/emulators/qemu-devel/Makefile b/emulators/qemu-devel/Makefile
index 2d0cabd26445..752199f8f6fb 100644
--- a/emulators/qemu-devel/Makefile
+++ b/emulators/qemu-devel/Makefile
@@ -3,7 +3,7 @@
PORTNAME= qemu
PORTVERSION= 1.7.1
-PORTREVISION= 3
+PORTREVISION= 4
CATEGORIES= emulators
MASTER_SITES= http://wiki.qemu.org/download/:release \
LOCAL/nox:snapshot
@@ -71,9 +71,11 @@ EXTRA_PATCHES+= ${FILESDIR}/extra-patch-05ee8495804599b52a88eb36b13ea9c06b3207cd
EXTRA_PATCHES+= ${FILESDIR}/extra-patch-bsd-user-mips-target_arch_vmparam.h
EXTRA_PATCHES+= ${FILESDIR}/extra-patch-inherit-interp_prefix
EXTRA_PATCHES+= ${FILESDIR}/extra-patch-d62553b108aa27c0c020dbb771d29f8673807a3b
+EXTRA_PATCHES+= ${FILESDIR}/extra-patch-6201cb17ad905dffee1b2eb76f58fb032e99b2a1
EXTRA_PATCHES+= ${FILESDIR}/extra-patch-bsd-user-syscall.c
EXTRA_PATCHES+= ${FILESDIR}/extra-patch-sysctl-hw-availpages
EXTRA_PATCHES+= ${FILESDIR}/extra-patch-sysctl-0oldlen
+EXTRA_PATCHES+= ${FILESDIR}/extra-patch-bsd-user-mmap.c
.endif
CONFIGURE_ARGS+= --extra-ldflags=-L${LOCALBASE}/lib
diff --git a/emulators/qemu-devel/files/extra-patch-6201cb17ad905dffee1b2eb76f58fb032e99b2a1 b/emulators/qemu-devel/files/extra-patch-6201cb17ad905dffee1b2eb76f58fb032e99b2a1
new file mode 100644
index 000000000000..93fe4f62bbe5
--- /dev/null
+++ b/emulators/qemu-devel/files/extra-patch-6201cb17ad905dffee1b2eb76f58fb032e99b2a1
@@ -0,0 +1,11 @@
+--- a/bsd-user/mips/target_arch_sigtramp.h
++++ b/bsd-user/mips/target_arch_sigtramp.h
+@@ -8,7 +8,7 @@ static inline abi_long setup_sigtramp(abi_ulong offset, unsigned sigf_uc,
+ {
+ int i;
+ uint32_t sigtramp_code[TARGET_SZSIGCODE/TARGET_INSN_SIZE] = {
+- /* 1 */ 0x27A40000 + sigf_uc, /* daddu $a0, $sp, (sigf_uc) */
++ /* 1 */ 0x27A40000 + sigf_uc, /* addu $a0, $sp, (sigf_uc) */
+ /* 2 */ 0x24020000 + sys_sigreturn, /* li $v0, (sys_sigreturn) */
+ /* 3 */ 0x0000000C, /* syscall */
+ /* 4 */ 0x0000000D /* break */
diff --git a/emulators/qemu-devel/files/extra-patch-bsd-user-mmap.c b/emulators/qemu-devel/files/extra-patch-bsd-user-mmap.c
new file mode 100644
index 000000000000..9370e5bd7fd3
--- /dev/null
+++ b/emulators/qemu-devel/files/extra-patch-bsd-user-mmap.c
@@ -0,0 +1,18 @@
+--- a/bsd-user/mmap.c
++++ b/bsd-user/mmap.c
+@@ -238,8 +238,13 @@ abi_ulong mmap_find_vma(abi_ulong start,
+ for (addr1 = addr; addr1 < (addr + size); addr1 += TARGET_PAGE_SIZE) {
+ prot |= page_get_flags(addr1);
+ }
+- if (prot == 0)
+- break;
++ if (prot == 0) {
++ if (reserved_va && addr + size >= reserved_va) {
++ addr = 0;
++ } else {
++ break;
++ }
++ }
+ addr += qemu_host_page_size;
+ /* we found nothing */
+ if (addr == addr_start)