- Add two more bsd-user patches, with these sbruno can now build 32bit

mips packages in poudriere (after adding 32bit qemu-mips support to it),
  tho he used his git repo that has the same patches: (and sson's binmisc
  code)

	https://github.com/seanbruno/qemu/tree/bsd-user/bsd-user

	https://wiki.freebsd.org/QemuUserModeHowTo

  - Fixup comment s/daddu/addu/g . [1]
  - Wrap mmap() allocation search to low memory to avoid another assert.

- Bump PORTREVISION.

Submitted by:	sbruno [1]
Obtained from:	6201cb17ad (diff-3ed994b5af908e5063b9d5724056d1b4) [1]
This commit is contained in:
Juergen Lock 2014-04-06 15:56:23 +00:00
parent c681daaf94
commit 48a18b5a84
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=350371
3 changed files with 32 additions and 1 deletions

View file

@ -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

View file

@ -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 */

View file

@ -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)