diff options
Diffstat (limited to 'app-emulation/qemu-user')
-rw-r--r-- | app-emulation/qemu-user/ChangeLog | 9 | ||||
-rw-r--r-- | app-emulation/qemu-user/files/digest-qemu-user-0.8.1 | 3 | ||||
-rw-r--r-- | app-emulation/qemu-user/files/qemu-0.8.0-gcc4-hacks.patch | 118 | ||||
-rw-r--r-- | app-emulation/qemu-user/qemu-user-0.8.0.20060329.ebuild | 4 | ||||
-rw-r--r-- | app-emulation/qemu-user/qemu-user-0.8.0.ebuild | 4 | ||||
-rw-r--r-- | app-emulation/qemu-user/qemu-user-0.8.1.ebuild | 85 |
6 files changed, 220 insertions, 3 deletions
diff --git a/app-emulation/qemu-user/ChangeLog b/app-emulation/qemu-user/ChangeLog index 5925b8e480d5..78f104d65e8a 100644 --- a/app-emulation/qemu-user/ChangeLog +++ b/app-emulation/qemu-user/ChangeLog @@ -1,6 +1,13 @@ # ChangeLog for app-emulation/qemu-user # Copyright 1999-2006 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/app-emulation/qemu-user/ChangeLog,v 1.13 2006/04/27 23:56:09 lu_zero Exp $ +# $Header: /var/cvsroot/gentoo-x86/app-emulation/qemu-user/ChangeLog,v 1.14 2006/05/06 08:52:33 lu_zero Exp $ + +*qemu-user-0.8.1 (06 May 2006) + + 06 May 2006; Luca Barbato <lu_zero@gentoo.org> + +files/qemu-0.8.0-gcc4-hacks.patch, qemu-user-0.8.0.ebuild, + qemu-user-0.8.0.20060329.ebuild, +qemu-user-0.8.1.ebuild: + New version and added Mandrake patch for gcc4 on x86 27 Apr 2006; Luca Barbato <lu_zero@gentoo.org> qemu-user-0.8.0.ebuild, qemu-user-0.8.0.20060329.ebuild: diff --git a/app-emulation/qemu-user/files/digest-qemu-user-0.8.1 b/app-emulation/qemu-user/files/digest-qemu-user-0.8.1 new file mode 100644 index 000000000000..27ca8ef85175 --- /dev/null +++ b/app-emulation/qemu-user/files/digest-qemu-user-0.8.1 @@ -0,0 +1,3 @@ +MD5 67d924324a5ab79d017bd97a1e767285 qemu-0.8.1.tar.gz 1623264 +RMD160 04d163d4792bbea39fc0b1e52af124cdb7e907dc qemu-0.8.1.tar.gz 1623264 +SHA256 a1f83666f5c05eaee9bfc608a3a5034ad95d0fd3c99937bb399bf9235a6aa0c9 qemu-0.8.1.tar.gz 1623264 diff --git a/app-emulation/qemu-user/files/qemu-0.8.0-gcc4-hacks.patch b/app-emulation/qemu-user/files/qemu-0.8.0-gcc4-hacks.patch new file mode 100644 index 000000000000..f7cbdcfe1951 --- /dev/null +++ b/app-emulation/qemu-user/files/qemu-0.8.0-gcc4-hacks.patch @@ -0,0 +1,118 @@ +2005-10-28 Gwenole Beauchesne <gbeauchesne@mandriva.com> + + * Various additional hacks for GCC4. + +--- qemu-0.7.2/target-i386/ops_sse.h.gcc4-hacks 2005-09-04 19:11:31.000000000 +0200 ++++ qemu-0.7.2/target-i386/ops_sse.h 2005-10-28 10:09:21.000000000 +0200 +@@ -34,6 +34,12 @@ + #define Q(n) XMM_Q(n) + #define SUFFIX _xmm + #endif ++#if defined(__i386__) && __GNUC__ >= 4 ++#define RegCopy(d, s) __builtin_memcpy(&(d), &(s), sizeof(d)) ++#endif ++#ifndef RegCopy ++#define RegCopy(d, s) d = s ++#endif + + void OPPROTO glue(op_psrlw, SUFFIX)(void) + { +@@ -570,7 +576,7 @@ void OPPROTO glue(op_pshufw, SUFFIX) (vo + r.W(1) = s->W((order >> 2) & 3); + r.W(2) = s->W((order >> 4) & 3); + r.W(3) = s->W((order >> 6) & 3); +- *d = r; ++ RegCopy(*d, r); + } + #else + void OPPROTO op_shufps(void) +--- qemu-0.7.2/target-i386/helper.c.gcc4-hacks 2005-09-04 19:11:31.000000000 +0200 ++++ qemu-0.7.2/target-i386/helper.c 2005-10-28 10:09:21.000000000 +0200 +@@ -3130,8 +3130,15 @@ void helper_fxrstor(target_ulong ptr, in + nb_xmm_regs = 8 << data64; + addr = ptr + 0xa0; + for(i = 0; i < nb_xmm_regs; i++) { ++#if defined(__i386__) && __GNUC__ >= 4 ++ env->xmm_regs[i].XMM_L(0) = ldl(addr); ++ env->xmm_regs[i].XMM_L(1) = ldl(addr + 4); ++ env->xmm_regs[i].XMM_L(2) = ldl(addr + 8); ++ env->xmm_regs[i].XMM_L(3) = ldl(addr + 12); ++#else + env->xmm_regs[i].XMM_Q(0) = ldq(addr); + env->xmm_regs[i].XMM_Q(1) = ldq(addr + 8); ++#endif + addr += 16; + } + } +--- qemu-0.7.2/cpu-all.h.gcc4-hacks 2005-09-04 19:11:31.000000000 +0200 ++++ qemu-0.7.2/cpu-all.h 2005-10-28 10:09:21.000000000 +0200 +@@ -339,7 +339,13 @@ + + static inline void stq_le_p(void *ptr, uint64_t v) + { ++#if defined(__i386__) && __GNUC__ >= 4 ++ const union { uint64_t v; uint32_t p[2]; } x = { .v = v }; ++ ((uint32_t *)ptr)[0] = x.p[0]; ++ ((uint32_t *)ptr)[1] = x.p[1]; ++#else + *(uint64_t *)ptr = v; ++#endif + } + + /* float access */ +--- qemu-0.7.2/softmmu_header.h.gcc4-hacks 2005-10-28 10:08:08.000000000 +0200 ++++ qemu-0.7.2/softmmu_header.h 2005-10-28 10:09:21.000000000 +0200 +@@ -104,7 +104,7 @@ + void REGPARM(2) glue(glue(__st, SUFFIX), MMUSUFFIX)(target_ulong addr, DATA_TYPE v, int is_user); + + #if (DATA_SIZE <= 4) && (TARGET_LONG_BITS == 32) && defined(__i386__) && \ +- (ACCESS_TYPE <= 1) && defined(ASM_SOFTMMU) ++ (ACCESS_TYPE <= 1) && defined(ASM_SOFTMMU) && (__GNUC__ < 4) + + #define CPU_TLB_ENTRY_BITS 4 + +@@ -131,7 +131,7 @@ static inline RES_TYPE glue(glue(ld, USU + "m" (*(uint32_t *)offsetof(CPUState, tlb_read[CPU_MEM_INDEX][0].address)), + "i" (CPU_MEM_INDEX), + "m" (*(uint8_t *)&glue(glue(__ld, SUFFIX), MMUSUFFIX)) +- : "%eax", "%ecx", "%edx", "memory", "cc"); ++ : "%eax", "%edx", "memory", "cc"); + return res; + } + +@@ -178,13 +178,14 @@ static inline int glue(glue(lds, SUFFIX) + "m" (*(uint32_t *)offsetof(CPUState, tlb_read[CPU_MEM_INDEX][0].address)), + "i" (CPU_MEM_INDEX), + "m" (*(uint8_t *)&glue(glue(__ld, SUFFIX), MMUSUFFIX)) +- : "%eax", "%ecx", "%edx", "memory", "cc"); ++ : "%eax", "%edx", "memory", "cc"); + return res; + } + #endif + +-static inline void glue(glue(st, SUFFIX), MEMSUFFIX)(target_ulong ptr, RES_TYPE v) ++static inline void glue(glue(st, SUFFIX), MEMSUFFIX)(target_ulong ptr, RES_TYPE val) + { ++ RES_TYPE v = val; + asm volatile ("movl %0, %%edx\n" + "movl %0, %%eax\n" + "shrl %3, %%edx\n" +@@ -236,16 +237,14 @@ + "2:\n" + : + : "r" (ptr), +-/* NOTE: 'q' would be needed as constraint, but we could not use it +- with T1 ! */ +- "r" (v), ++ "q" (v), + "i" ((CPU_TLB_SIZE - 1) << CPU_TLB_ENTRY_BITS), + "i" (TARGET_PAGE_BITS - CPU_TLB_ENTRY_BITS), + "i" (TARGET_PAGE_MASK | (DATA_SIZE - 1)), + "m" (*(uint32_t *)offsetof(CPUState, tlb_table[CPU_MEM_INDEX][0].addr_write)), + "i" (CPU_MEM_INDEX), + "m" (*(uint8_t *)&glue(glue(__st, SUFFIX), MMUSUFFIX)) +- : "%eax", "%ecx", "%edx", "memory", "cc"); ++ : "%eax", "%edx", "memory", "cc"); + } + + /* TODO: handle 64-bit access sizes and addresses */ diff --git a/app-emulation/qemu-user/qemu-user-0.8.0.20060329.ebuild b/app-emulation/qemu-user/qemu-user-0.8.0.20060329.ebuild index 1189d8b18a36..b7eadd7af22f 100644 --- a/app-emulation/qemu-user/qemu-user-0.8.0.20060329.ebuild +++ b/app-emulation/qemu-user/qemu-user-0.8.0.20060329.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2006 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/app-emulation/qemu-user/qemu-user-0.8.0.20060329.ebuild,v 1.3 2006/04/27 23:56:09 lu_zero Exp $ +# $Header: /var/cvsroot/gentoo-x86/app-emulation/qemu-user/qemu-user-0.8.0.20060329.ebuild,v 1.4 2006/05/06 08:52:33 lu_zero Exp $ inherit eutils flag-o-matic @@ -37,7 +37,9 @@ src_unpack() { cd ${S} epatch ${FILESDIR}/qemu-ppc-dirty-hack.patch + epatch ${FILESDIR}/qemu-0.8.0-gcc4-hacks.patch epatch ${FILESDIR}/qemu-0.8.0-stwbrx.patch + # Alter target makefiles to accept CFLAGS set via flag-o. sed -i 's/^\(C\|OP_C\|HELPER_C\)FLAGS=/\1FLAGS+=/' \ Makefile Makefile.target tests/Makefile diff --git a/app-emulation/qemu-user/qemu-user-0.8.0.ebuild b/app-emulation/qemu-user/qemu-user-0.8.0.ebuild index 0d6387fbb0ea..f50f7e739eaa 100644 --- a/app-emulation/qemu-user/qemu-user-0.8.0.ebuild +++ b/app-emulation/qemu-user/qemu-user-0.8.0.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2006 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/app-emulation/qemu-user/qemu-user-0.8.0.ebuild,v 1.8 2006/04/27 23:56:09 lu_zero Exp $ +# $Header: /var/cvsroot/gentoo-x86/app-emulation/qemu-user/qemu-user-0.8.0.ebuild,v 1.9 2006/05/06 08:52:33 lu_zero Exp $ inherit eutils flag-o-matic @@ -39,6 +39,8 @@ src_unpack() { cd ${S} epatch ${FILESDIR}/qemu-ppc-dirty-hack.patch epatch ${FILESDIR}/qemu-0.8.0-stwbrx.patch + epatch ${FILESDIR}/qemu-0.8.0-gcc4-hacks.patch + # Alter target makefiles to accept CFLAGS set via flag-o. sed -i 's/^\(C\|OP_C\|HELPER_C\)FLAGS=/\1FLAGS+=/' \ Makefile Makefile.target tests/Makefile diff --git a/app-emulation/qemu-user/qemu-user-0.8.1.ebuild b/app-emulation/qemu-user/qemu-user-0.8.1.ebuild new file mode 100644 index 000000000000..5687fa0acb32 --- /dev/null +++ b/app-emulation/qemu-user/qemu-user-0.8.1.ebuild @@ -0,0 +1,85 @@ +# Copyright 1999-2006 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/app-emulation/qemu-user/qemu-user-0.8.1.ebuild,v 1.1 2006/05/06 08:52:33 lu_zero Exp $ + +inherit eutils flag-o-matic + +DESCRIPTION="Multi-platform & multi-targets cpu emulator and dynamic translator" +HOMEPAGE="http://fabrice.bellard.free.fr/qemu/" +SRC_URI="http://fabrice.bellard.free.fr/qemu/${P/-user/}.tar.gz" + +LICENSE="GPL-2 LGPL-2.1" +SLOT="0" +KEYWORDS="-alpha ~amd64 ~ppc -sparc ~x86" +IUSE="" #qvm86 debug nptl qemu-fast nptlonly" +RESTRICT="nostrip test" + +DEPEND="virtual/libc + app-text/texi2html + !<=app-emulation/qemu-0.7.0" +RDEPEND="" + +S="${WORKDIR}/${P/-user/}" + +set_target_list() { + TARGET_LIST="arm-user armeb-user i386-user ppc-user sparc-user mips-user" + export TARGET_LIST +} + +pkg_setup() { + if [ "$(gcc-major-version)" == "4" ]; then + ewarn "Qemu could not build with GCC 4" + fi +} + +#RUNTIME_PATH="/emul/gnemul/" +src_unpack() { + unpack ${A} + + cd ${S} + epatch ${FILESDIR}/qemu-ppc-dirty-hack.patch + epatch ${FILESDIR}/qemu-0.8.0-gcc4-hacks.patch + epatch ${FILESDIR}/qemu-0.8.0-stwbrx.patch + # Alter target makefiles to accept CFLAGS set via flag-o. + sed -i 's/^\(C\|OP_C\|HELPER_C\)FLAGS=/\1FLAGS+=/' \ + Makefile Makefile.target tests/Makefile + # Ensure mprotect restrictions are relaxed for emulator binaries + [[ -x /sbin/paxctl ]] && \ + sed -i 's/^VL_LDFLAGS=$/VL_LDFLAGS=-Wl,-z,execheap/' \ + Makefile.target + # Prevent install of kernel module by qemu's makefile + sed -i 's/\(.\/install.sh\)/#\1/' Makefile +} + +src_compile() { + #Let the application set its cflags + unset CFLAGS + + # Switch off hardened tech + filter-flags -fpie -fstack-protector + + myconf="--disable-gcc-check" + set_target_list +# --interp-prefix=${RUNTIME_PATH}/qemu-%M + ./configure \ + --prefix=/usr \ + --target-list="${TARGET_LIST}" \ + --enable-slirp \ + --kernel-path=${KV_DIR} \ + ${myconf} \ + || die "could not configure" + + emake || die "make failed" +} + +src_install() { + make install \ + prefix=${D}/usr \ + bindir=${D}/usr/bin \ + datadir=${D}/usr/share/qemu \ + docdir=${D}/usr/share/doc/${P} \ + mandir=${D}/usr/share/man || die + + rm -fR ${D}/usr/share/{man,qemu} + rm -fR ${D}/usr/bin/qemu-img +} |