From 74d5ac15de0d25e1cef880e17c959c15902ea252 Mon Sep 17 00:00:00 2001 From: Dennis Gilmore Date: Jan 01 2009 15:36:40 +0000 Subject: enable sparc arches to build --- diff --git a/qemu-0.9.1-alpha-int.patch b/qemu-0.9.1-alpha-int.patch new file mode 100644 index 0000000..72de86d --- /dev/null +++ b/qemu-0.9.1-alpha-int.patch @@ -0,0 +1,10 @@ +--- qemu-0.9.1/target-alpha/exec.h.BAD 2008-12-31 23:17:10.000000000 -0600 ++++ qemu-0.9.1/target-alpha/exec.h 2008-12-31 23:17:48.000000000 -0600 +@@ -24,6 +24,7 @@ + #include "config.h" + + #include "dyngen-exec.h" ++#include + + #define TARGET_LONG_BITS 64 + diff --git a/qemu-0.9.1-dirent.patch b/qemu-0.9.1-dirent.patch new file mode 100644 index 0000000..3457176 --- /dev/null +++ b/qemu-0.9.1-dirent.patch @@ -0,0 +1,11 @@ +--- qemu-0.9.1/linux-user/syscall.c.BAD 2008-12-31 20:20:00.000000000 -0600 ++++ qemu-0.9.1/linux-user/syscall.c 2008-12-31 20:20:27.000000000 -0600 +@@ -66,7 +66,7 @@ + #include + #include + #include +-#include ++#include + #include + + #include "qemu.h" diff --git a/qemu-0.9.1-sparc-configure.patch b/qemu-0.9.1-sparc-configure.patch new file mode 100644 index 0000000..3ad019f --- /dev/null +++ b/qemu-0.9.1-sparc-configure.patch @@ -0,0 +1,25 @@ +--- qemu-0.9.1/configure.BAD 2008-12-31 20:49:19.000000000 -0600 ++++ qemu-0.9.1/configure 2008-12-31 20:51:45.000000000 -0600 +@@ -307,6 +307,8 @@ + target_cpu="sparc"; cpu="sparc" ;; + v8plus|v8plusa) SP_CFLAGS="-m32 -mcpu=ultrasparc -D__sparc_${sparc_cpu}__"; SP_LDFLAGS="-m32" + target_cpu="sparc"; cpu="sparc" ;; ++ v932) SP_CFLAGS="-m32 -mcpu=ultrasparc -D__sparc_v9__"; SP_LDFLAGS="-m32" ++ target_cpu="sparc"; cpu="sparc" ;; + v9) SP_CFLAGS="-m64 -mcpu=ultrasparc -D__sparc_${sparc_cpu}__"; SP_LDFLAGS="-m64" + target_cpu="sparc64"; cpu="sparc64" ;; + *) echo "undefined SPARC architecture. Exiting";exit 1;; +@@ -337,11 +339,11 @@ + + # + # If cpu ~= sparc and sparc_cpu hasn't been defined, plug in the right +-# ARCH_CFLAGS/ARCH_LDFLAGS (assume sparc_v8plus for 32-bit and sparc_v9 for 64-bit) ++# ARCH_CFLAGS/ARCH_LDFLAGS (assume sparc_v9 for 32-bit and sparc_v9 for 64-bit) + # + case $cpu in + sparc) if test -z "$sparc_cpu" ; then +- ARCH_CFLAGS="-m32 -mcpu=ultrasparc -D__sparc_v8plus__" ++ ARCH_CFLAGS="-m32 -mcpu=ultrasparc -D__sparc_v9__" + ARCH_LDFLAGS="-m32" + else + ARCH_CFLAGS="${SP_CFLAGS}" diff --git a/qemu.spec b/qemu.spec index 8c416c3..910ed62 100644 --- a/qemu.spec +++ b/qemu.spec @@ -8,7 +8,7 @@ Summary: QEMU is a FAST! processor emulator Name: qemu Version: 0.9.1 -Release: 6%{?dist} +Release: 7%{?dist} License: GPLv2+ and LGPLv2+ Group: Development/Tools URL: http://www.qemu.org/ @@ -20,13 +20,16 @@ Patch3: qemu-0.9.1-nic-defaults.patch Patch4: qemu-%{version}-block-rw-range-check.patch # Upstream SVN changeset #4338 Patch5: qemu-%{version}-pty-rawmode.patch +Patch6: qemu-0.9.1-alpha-int.patch +Patch7: qemu-0.9.1-dirent.patch +Patch8: qemu-0.9.1-sparc-configure.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: SDL-devel compat-gcc-%{gccver} zlib-devel which texi2html gnutls-devel Requires(post): /sbin/chkconfig Requires(preun): /sbin/service /sbin/chkconfig Requires(postun): /sbin/service Requires: %{name}-img = %{version}-%{release} -ExclusiveArch: %{ix86} x86_64 ppc alpha sparc armv4l +ExclusiveArch: %{ix86} x86_64 ppc alpha sparcv9 sparc64 armv4l %description QEMU is a generic and open source processor emulator which achieves a good @@ -57,13 +60,24 @@ This package provides the command line tool for manipulating disk images %patch3 -p1 %patch4 -p1 %patch5 -p1 +%patch6 -p1 +%patch7 -p1 +%patch8 -p1 %build ./configure \ --prefix=%{_prefix} \ --interp-prefix=%{_prefix}/qemu-%%M \ --cc=gcc%{gccver} \ +%ifnarch sparcv9 --enable-alsa \ +%endif +%ifarch sparcv9 + --sparc_cpu=v932 \ +%endif +%ifarch sparc64 + --sparc_cpu=v9 \ +%endif --extra-ldflags="-Wl,--build-id" make %{?_smp_mflags} VL_LDFLAGS="-Wl,--build-id" @@ -144,6 +158,9 @@ fi %{_mandir}/man1/qemu-img.1* %changelog +* Wed Dec 31 2008 Dennis Gilmore - 0.9.1-7 +- add sparcv9 and sparc64 support + * Wed Jun 11 2008 Daniel P. Berrange - 0.9.1-6.fc9 - Remove bogus wildcard from files list (rhbz #450701) - Fix text console PTYs to be in rawmode