diff options
author | Kirill Ponomarev <krion@FreeBSD.org> | 2004-06-25 07:37:31 +0000 |
---|---|---|
committer | Kirill Ponomarev <krion@FreeBSD.org> | 2004-06-25 07:37:31 +0000 |
commit | 897e5e8fb66c47ea0a3e83fcd955b2e61f3342f2 (patch) | |
tree | 9d4d59a731d92e5c9388585cd3c4ca828e4e469d /emulators | |
parent | 7dde05340b98917399304778b42259a3c98d0bd5 (diff) | |
download | ports-897e5e8fb66c47ea0a3e83fcd955b2e61f3342f2.tar.gz ports-897e5e8fb66c47ea0a3e83fcd955b2e61f3342f2.zip |
Update to version 20040624
Add ppc system emulation
PR: ports/68298
Submitted by: maintainer
Notes
Notes:
svn path=/head/; revision=112204
Diffstat (limited to 'emulators')
-rw-r--r-- | emulators/qemu-devel/Makefile | 4 | ||||
-rw-r--r-- | emulators/qemu-devel/distinfo | 4 | ||||
-rw-r--r-- | emulators/qemu-devel/files/patch-bg | 37 | ||||
-rw-r--r-- | emulators/qemu-devel/files/patch-bh | 115 | ||||
-rw-r--r-- | emulators/qemu-devel/pkg-plist | 1 | ||||
-rw-r--r-- | emulators/qemu/Makefile | 4 | ||||
-rw-r--r-- | emulators/qemu/distinfo | 4 | ||||
-rw-r--r-- | emulators/qemu/files/patch-bg | 37 | ||||
-rw-r--r-- | emulators/qemu/files/patch-bh | 115 | ||||
-rw-r--r-- | emulators/qemu/pkg-plist | 1 |
10 files changed, 314 insertions, 8 deletions
diff --git a/emulators/qemu-devel/Makefile b/emulators/qemu-devel/Makefile index f4f664765e1a..cc67f57ab826 100644 --- a/emulators/qemu-devel/Makefile +++ b/emulators/qemu-devel/Makefile @@ -6,10 +6,10 @@ # PORTNAME= qemu -PORTVERSION= 0.5.5.s.20040622 +PORTVERSION= 0.5.5.s.20040624 CATEGORIES= emulators MASTER_SITES= http://dad-answers.com/qemu/FreeBSD/ -DISTNAME= ${PORTNAME}-snapshot-2004-06-22_23 +DISTNAME= ${PORTNAME}-snapshot-2004-06-24_23 MAINTAINER= nox@jelal.kn-bremen.de COMMENT= QEMU CPU Emulator diff --git a/emulators/qemu-devel/distinfo b/emulators/qemu-devel/distinfo index 8027d2e58884..885497cfdace 100644 --- a/emulators/qemu-devel/distinfo +++ b/emulators/qemu-devel/distinfo @@ -1,2 +1,2 @@ -MD5 (qemu-snapshot-2004-06-22_23.tar.bz2) = 1ee0aa7cb03979d1696e6c2dd1115425 -SIZE (qemu-snapshot-2004-06-22_23.tar.bz2) = 711054 +MD5 (qemu-snapshot-2004-06-24_23.tar.bz2) = cc23ade5426a2caf2289999189c1e92c +SIZE (qemu-snapshot-2004-06-24_23.tar.bz2) = 711284 diff --git a/emulators/qemu-devel/files/patch-bg b/emulators/qemu-devel/files/patch-bg new file mode 100644 index 000000000000..26d0bf2833bc --- /dev/null +++ b/emulators/qemu-devel/files/patch-bg @@ -0,0 +1,37 @@ +Index: qemu/qemu-mkcow.c +@@ -21,6 +21,8 @@ + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ ++#include "config-host.h" ++ + #include <stdlib.h> + #include <stdio.h> + #include <stdarg.h> +@@ -36,6 +38,12 @@ + #include <sys/stat.h> + #include <netinet/in.h> + ++#ifdef _BSD ++#include <sys/types.h> ++#include <sys/ioctl.h> ++#include <sys/disk.h> ++#endif ++ + #include "cow.h" + + #include "bswap.h" +@@ -56,6 +64,13 @@ int cow_create(int cow_fd, const char *i + perror(image_filename); + exit(1); + } ++#ifdef _BSD ++ struct stat sb; ++ if (!fstat(fd,&sb) && (S_IFCHR & sb.st_mode)) { ++ if (ioctl(fd, DIOCGMEDIASIZE, (off_t *)&image_sectors)) ++ image_sectors = lseek(fd, 0LL, SEEK_END); ++ } else ++#endif + image_sectors = lseek64(fd, 0, SEEK_END); + if (fstat(fd, &st) != 0) { + close(fd); diff --git a/emulators/qemu-devel/files/patch-bh b/emulators/qemu-devel/files/patch-bh new file mode 100644 index 000000000000..ebb476a2ce9e --- /dev/null +++ b/emulators/qemu-devel/files/patch-bh @@ -0,0 +1,115 @@ +Index: qemu/configure +=================================================================== +RCS file: /cvsroot/qemu/qemu/configure,v +retrieving revision 1.39 +diff -w -u -d -r1.39 configure +--- configure 20 May 2004 13:23:39 -0000 1.39 ++++ configure 21 May 2004 15:00:41 -0000 +@@ -93,7 +93,7 @@ + + if [ "$bsd" = "yes" ] ; then + make="gmake" +- target_list="i386-softmmu" ++ target_list="i386-softmmu ppc-softmmu" + fi + + # find source path +Index: qemu/dyngen-exec.h +=================================================================== +RCS file: /cvsroot/qemu/qemu/dyngen-exec.h,v +retrieving revision 1.12 +diff -w -u -d -r1.12 dyngen-exec.h +--- dyngen-exec.h 12 May 2004 19:32:15 -0000 1.12 ++++ dyngen-exec.h 21 May 2004 15:00:41 -0000 +@@ -21,6 +21,8 @@ + #define __DYNGEN_EXEC_H__ + + #include <stddef.h> ++#include <stdio.h> ++#include "config.h" + + typedef unsigned char uint8_t; + typedef unsigned short uint16_t; +@@ -54,9 +56,6 @@ + #define UINT32_MAX (4294967295U) + #define UINT64_MAX ((uint64_t)(18446744073709551615)) + +-typedef struct FILE FILE; +-extern int fprintf(FILE *, const char *, ...); +-extern int printf(const char *, ...); + #undef NULL + #define NULL 0 + #ifdef _BSD +Index: qemu/target-ppc/op_helper.c +=================================================================== +RCS file: /cvsroot/qemu/qemu/target-ppc/op_helper.c,v +retrieving revision 1.6 +diff -w -u -d -r1.6 op_helper.c +--- target-ppc/op_helper.c 21 May 2004 12:59:31 -0000 1.6 ++++ target-ppc/op_helper.c 21 May 2004 15:00:49 -0000 +@@ -210,6 +210,22 @@ + } + /* TODO: update FEX & VX */ + /* Set rounding mode */ ++#ifdef _BSD ++ switch(env->fpscr[0] & 0x3) { ++ case 0: ++ fpsetround(FP_RN); ++ break; ++ case 1: ++ fpsetround(FP_RZ); ++ break; ++ case 2: ++ fpsetround(FP_RP); ++ break; ++ case 3: ++ fpsetround(FP_RM); ++ break; ++ } ++#else + switch (env->fpscr[0] & 0x3) { + case 0: + /* Best approximation (round to nearest) */ +@@ -228,6 +244,7 @@ + fesetround(FE_DOWNWARD); + break; + } ++#endif + } + + void do_fctiw (void) +@@ -253,9 +270,13 @@ + double d; + uint64_t i; + } *p = (void *)&FT1; ++#ifdef _BSD ++ int cround = fpgetround(); ++ fpsetround(FP_RZ); ++#else + int cround = fegetround(); +- + fesetround(FE_TOWARDZERO); ++#endif + if (FT0 > (double)0x7FFFFFFF) + p->i = 0x7FFFFFFFULL << 32; + else if (FT0 < -(double)0x80000000) +@@ -264,7 +285,11 @@ + p->i = 0; + p->i |= (uint32_t)FT0; + FT0 = p->d; ++#ifdef _BSD ++ fpsetround(cround); ++#else + fesetround(cround); ++#endif + } + + void do_fnmadds (void) +@@ -379,7 +404,6 @@ + + /*****************************************************************************/ + /* Special helpers for debug */ +-extern FILE *stdout; + + void dump_state (void) + { diff --git a/emulators/qemu-devel/pkg-plist b/emulators/qemu-devel/pkg-plist index 49537e8d4be1..3d091aff848f 100644 --- a/emulators/qemu-devel/pkg-plist +++ b/emulators/qemu-devel/pkg-plist @@ -1,5 +1,6 @@ bin/qemu bin/qemu-mkcow +bin/qemu-system-ppc bin/vmdk2raw %%PORTDOCS%%%%DOCSDIR%%/qemu-doc.html %%PORTDOCS%%%%DOCSDIR%%/qemu-tech.html diff --git a/emulators/qemu/Makefile b/emulators/qemu/Makefile index f4f664765e1a..cc67f57ab826 100644 --- a/emulators/qemu/Makefile +++ b/emulators/qemu/Makefile @@ -6,10 +6,10 @@ # PORTNAME= qemu -PORTVERSION= 0.5.5.s.20040622 +PORTVERSION= 0.5.5.s.20040624 CATEGORIES= emulators MASTER_SITES= http://dad-answers.com/qemu/FreeBSD/ -DISTNAME= ${PORTNAME}-snapshot-2004-06-22_23 +DISTNAME= ${PORTNAME}-snapshot-2004-06-24_23 MAINTAINER= nox@jelal.kn-bremen.de COMMENT= QEMU CPU Emulator diff --git a/emulators/qemu/distinfo b/emulators/qemu/distinfo index 8027d2e58884..885497cfdace 100644 --- a/emulators/qemu/distinfo +++ b/emulators/qemu/distinfo @@ -1,2 +1,2 @@ -MD5 (qemu-snapshot-2004-06-22_23.tar.bz2) = 1ee0aa7cb03979d1696e6c2dd1115425 -SIZE (qemu-snapshot-2004-06-22_23.tar.bz2) = 711054 +MD5 (qemu-snapshot-2004-06-24_23.tar.bz2) = cc23ade5426a2caf2289999189c1e92c +SIZE (qemu-snapshot-2004-06-24_23.tar.bz2) = 711284 diff --git a/emulators/qemu/files/patch-bg b/emulators/qemu/files/patch-bg new file mode 100644 index 000000000000..26d0bf2833bc --- /dev/null +++ b/emulators/qemu/files/patch-bg @@ -0,0 +1,37 @@ +Index: qemu/qemu-mkcow.c +@@ -21,6 +21,8 @@ + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ ++#include "config-host.h" ++ + #include <stdlib.h> + #include <stdio.h> + #include <stdarg.h> +@@ -36,6 +38,12 @@ + #include <sys/stat.h> + #include <netinet/in.h> + ++#ifdef _BSD ++#include <sys/types.h> ++#include <sys/ioctl.h> ++#include <sys/disk.h> ++#endif ++ + #include "cow.h" + + #include "bswap.h" +@@ -56,6 +64,13 @@ int cow_create(int cow_fd, const char *i + perror(image_filename); + exit(1); + } ++#ifdef _BSD ++ struct stat sb; ++ if (!fstat(fd,&sb) && (S_IFCHR & sb.st_mode)) { ++ if (ioctl(fd, DIOCGMEDIASIZE, (off_t *)&image_sectors)) ++ image_sectors = lseek(fd, 0LL, SEEK_END); ++ } else ++#endif + image_sectors = lseek64(fd, 0, SEEK_END); + if (fstat(fd, &st) != 0) { + close(fd); diff --git a/emulators/qemu/files/patch-bh b/emulators/qemu/files/patch-bh new file mode 100644 index 000000000000..ebb476a2ce9e --- /dev/null +++ b/emulators/qemu/files/patch-bh @@ -0,0 +1,115 @@ +Index: qemu/configure +=================================================================== +RCS file: /cvsroot/qemu/qemu/configure,v +retrieving revision 1.39 +diff -w -u -d -r1.39 configure +--- configure 20 May 2004 13:23:39 -0000 1.39 ++++ configure 21 May 2004 15:00:41 -0000 +@@ -93,7 +93,7 @@ + + if [ "$bsd" = "yes" ] ; then + make="gmake" +- target_list="i386-softmmu" ++ target_list="i386-softmmu ppc-softmmu" + fi + + # find source path +Index: qemu/dyngen-exec.h +=================================================================== +RCS file: /cvsroot/qemu/qemu/dyngen-exec.h,v +retrieving revision 1.12 +diff -w -u -d -r1.12 dyngen-exec.h +--- dyngen-exec.h 12 May 2004 19:32:15 -0000 1.12 ++++ dyngen-exec.h 21 May 2004 15:00:41 -0000 +@@ -21,6 +21,8 @@ + #define __DYNGEN_EXEC_H__ + + #include <stddef.h> ++#include <stdio.h> ++#include "config.h" + + typedef unsigned char uint8_t; + typedef unsigned short uint16_t; +@@ -54,9 +56,6 @@ + #define UINT32_MAX (4294967295U) + #define UINT64_MAX ((uint64_t)(18446744073709551615)) + +-typedef struct FILE FILE; +-extern int fprintf(FILE *, const char *, ...); +-extern int printf(const char *, ...); + #undef NULL + #define NULL 0 + #ifdef _BSD +Index: qemu/target-ppc/op_helper.c +=================================================================== +RCS file: /cvsroot/qemu/qemu/target-ppc/op_helper.c,v +retrieving revision 1.6 +diff -w -u -d -r1.6 op_helper.c +--- target-ppc/op_helper.c 21 May 2004 12:59:31 -0000 1.6 ++++ target-ppc/op_helper.c 21 May 2004 15:00:49 -0000 +@@ -210,6 +210,22 @@ + } + /* TODO: update FEX & VX */ + /* Set rounding mode */ ++#ifdef _BSD ++ switch(env->fpscr[0] & 0x3) { ++ case 0: ++ fpsetround(FP_RN); ++ break; ++ case 1: ++ fpsetround(FP_RZ); ++ break; ++ case 2: ++ fpsetround(FP_RP); ++ break; ++ case 3: ++ fpsetround(FP_RM); ++ break; ++ } ++#else + switch (env->fpscr[0] & 0x3) { + case 0: + /* Best approximation (round to nearest) */ +@@ -228,6 +244,7 @@ + fesetround(FE_DOWNWARD); + break; + } ++#endif + } + + void do_fctiw (void) +@@ -253,9 +270,13 @@ + double d; + uint64_t i; + } *p = (void *)&FT1; ++#ifdef _BSD ++ int cround = fpgetround(); ++ fpsetround(FP_RZ); ++#else + int cround = fegetround(); +- + fesetround(FE_TOWARDZERO); ++#endif + if (FT0 > (double)0x7FFFFFFF) + p->i = 0x7FFFFFFFULL << 32; + else if (FT0 < -(double)0x80000000) +@@ -264,7 +285,11 @@ + p->i = 0; + p->i |= (uint32_t)FT0; + FT0 = p->d; ++#ifdef _BSD ++ fpsetround(cround); ++#else + fesetround(cround); ++#endif + } + + void do_fnmadds (void) +@@ -379,7 +404,6 @@ + + /*****************************************************************************/ + /* Special helpers for debug */ +-extern FILE *stdout; + + void dump_state (void) + { diff --git a/emulators/qemu/pkg-plist b/emulators/qemu/pkg-plist index 49537e8d4be1..3d091aff848f 100644 --- a/emulators/qemu/pkg-plist +++ b/emulators/qemu/pkg-plist @@ -1,5 +1,6 @@ bin/qemu bin/qemu-mkcow +bin/qemu-system-ppc bin/vmdk2raw %%PORTDOCS%%%%DOCSDIR%%/qemu-doc.html %%PORTDOCS%%%%DOCSDIR%%/qemu-tech.html |