400 lines
12 KiB
RPMSpec
400 lines
12 KiB
RPMSpec
#
|
|
# spec file for package qemu (Version 0.9.0)
|
|
#
|
|
# Copyright (c) 2007 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
|
# This file and all modifications and additions to the pristine
|
|
# package are under the same license as the package itself.
|
|
#
|
|
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
|
#
|
|
|
|
# norootforbuild
|
|
|
|
Name: qemu
|
|
BuildRequires: SDL-devel bison
|
|
URL: http://fabrice.bellard.free.fr/qemu/
|
|
License: BSD License and BSD-like, GNU General Public License (GPL)
|
|
Group: System/Emulators/Other
|
|
Summary: Universal CPU emulator
|
|
Version: 0.9.0
|
|
Release: 8
|
|
Source: %name-%version.tar.bz2
|
|
Patch1: qemu-0.7.0-binfmt.patch
|
|
Patch5: qemu-0.7.0-sigaltstackhack.patch
|
|
Patch6: qemu-0.7.0-amd64.patch
|
|
Patch8: qemu-0.9.0.patch
|
|
Patch10: linkerscripts.patch
|
|
Patch11: qemu-0.7.2-kqemu.patch
|
|
Patch14: qemu-0.7.1-jobsignals.patch
|
|
Patch15: qemu-0.9.0-syscalls.patch
|
|
Patch16: qemu-0.7.1-armfpaex.patch
|
|
Patch19: qemu-0.9.0-nousbdevfs.patch
|
|
Patch20: qemu-0.9.0-usbheaders.patch
|
|
Patch21: qemu-0.9.0-initrd.patch
|
|
# GCC 3 sources/patches
|
|
Source601: gcc-3.3.5.tar.bz2
|
|
Patch600: gcc-gcc-3.3.5-hammer.patch.bz2
|
|
Patch601: gcc-gcc-noalias-warn.diff
|
|
Patch602: gcc-configure.patch
|
|
Patch603: gcc-head-tail.patch
|
|
Patch604: gcc-bug-reporting.patch
|
|
Patch605: gcc-libgc.patch
|
|
Patch606: gcc-ia64intrin.patch
|
|
Patch607: gcc-ffi.patch
|
|
Patch608: gcc-fworking-directory.patch
|
|
Patch610: gcc-altivec.diff
|
|
Patch611: gcc-compact-dwarf2.patch
|
|
Patch616: gcc-c99-double-inline.diff
|
|
Patch617: gcc-c99numbers.diff
|
|
Patch621: gcc-gcse-volatile.patch
|
|
Patch622: gcc-swig-alias.patch
|
|
Patch632: gcc-aliasing.diff
|
|
Patch633: gcc-aliasing12.diff
|
|
Patch634: gcc-aliasing3.diff
|
|
Patch637: gcc-cse-mem-expr.patch
|
|
Patch642: gcc-emit-note.patch
|
|
Patch643: gcc-unwind-ia64.patch
|
|
Patch644: gcc-hppa.patch
|
|
Patch645: gcc-suse46595.diff
|
|
Patch646: gcc-stl-multiple-defs.diff
|
|
# Ada patches
|
|
Patch653: gcc-gcc32-ada-link.patch
|
|
Patch654: gcc-gcc32-ada-addr2line.patch
|
|
# c++ patches
|
|
# PPC specific
|
|
Patch661: gcc-gcc-3.3-ppc64.patch
|
|
# Do not merge this patch into the Alan M patch, it will just get lost later.
|
|
# If you think it is useless, try building "fam" and watch libtool break.
|
|
Patch663: gcc-ppc-nostartfileprefix.patch
|
|
Patch664: gcc-ppc-nof.patch
|
|
Patch700: gcc-abuildappease.patch
|
|
Patch701: gcc-3.3.5.dif
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
|
ExclusiveArch: %ix86 ppc sparc x86_64 ia64
|
|
|
|
%description
|
|
QEMU is an extremely well-performing CPU emulator that allows you to
|
|
choose between simulating an entire system and running userspace
|
|
binaries for different architectures under your native operating
|
|
system. It currently emulates x86, ARM, PowerPC and SPARC CPUs as well
|
|
as PC and PowerMac systems.
|
|
|
|
|
|
|
|
Authors:
|
|
--------
|
|
Fabrice Bellard <fabrice.bellard@free.fr>
|
|
|
|
%prep
|
|
%setup -q -a601
|
|
%patch1
|
|
%patch5
|
|
%patch6
|
|
%patch8
|
|
%patch10
|
|
%patch11
|
|
%patch14
|
|
%patch15
|
|
%patch16
|
|
%patch19
|
|
%patch20
|
|
%patch21 -p1
|
|
cd gcc-3.3.5
|
|
%patch600
|
|
%patch601
|
|
%patch602
|
|
%patch603
|
|
%patch604
|
|
%patch605
|
|
%patch606
|
|
%patch607
|
|
%patch608 -p1
|
|
%patch610
|
|
%patch611
|
|
%patch616
|
|
%patch617
|
|
%patch621
|
|
%patch622
|
|
%patch632
|
|
%patch633
|
|
%patch634
|
|
%patch637
|
|
%patch642
|
|
%patch643
|
|
%patch644
|
|
%patch645
|
|
%patch646
|
|
%patch653
|
|
%patch654
|
|
#%ifarch ppc ppc64
|
|
%patch661 -p1
|
|
#%patch6063 -p1
|
|
#%endif
|
|
%patch700 -p1
|
|
%patch701
|
|
cd ..
|
|
|
|
%build
|
|
QEMU_OPT_FLAGS="$RPM_OPT_FLAGS"
|
|
%define gcc33tmp /tmp/gcc33
|
|
%define qemucc %{gcc33tmp}/bin/gcc
|
|
%ifarch %ix86
|
|
QEMU_OPT_FLAGS="${RPM_OPT_FLAGS/-mtune=/-mcpu=}"
|
|
%endif
|
|
QEMU_OPT_FLAGS="${QEMU_OPT_FLAGS//-fstack-protector/}"
|
|
# build gcc 3.3
|
|
%define GCCDIST %{_target_cpu}-suse-linux
|
|
cd gcc-3.3.5
|
|
./configure --enable-threads=posix \
|
|
--prefix=%{gcc33tmp} --with-local-prefix=/usr/local \
|
|
--enable-languages=c \
|
|
--enable-shared --disable-biarch --disable-multilib \
|
|
%ifarch sparc
|
|
--with-cpu=v7 \
|
|
%endif
|
|
--host=%{GCCDIST}
|
|
make bootstrap-lean BOOT_CFLAGS="$QEMU_OPT_FLAGS" STAGE1_CFLAGS="$QEMU_OPT_FLAGS" CFLAGS="$QEMU_OPT_FLAGS" %{?jobs:-j%{jobs}}
|
|
make install
|
|
cd ..
|
|
# build QEMU
|
|
# kqemu target
|
|
%ifarch x86_64
|
|
target_list_kqemu="x86_64-softmmu"
|
|
%else
|
|
target_list_kqemu="i386-softmmu"
|
|
%endif
|
|
# targets for all platforms
|
|
target_list="ppc-softmmu sparc-softmmu mips-softmmu mipsel-softmmu arm-softmmu"
|
|
# AMD64 -> i386 without kqemu
|
|
# x86 -> AMD64 without kqemu
|
|
# others -> both without kqemu
|
|
%ifarch x86_64
|
|
target_list="$target_list i386-softmmu"
|
|
%else
|
|
%ifarch %ix86
|
|
target_list="$target_list x86_64-softmmu"
|
|
%else
|
|
target_list="$target_list i386-softmmu x86_64-softmmu"
|
|
%endif
|
|
%endif
|
|
# linux-user targets
|
|
target_list_user=""
|
|
%ifnarch %ix86 x86_64
|
|
target_list_user="$target_list_user i386-linux-user"
|
|
%endif
|
|
%ifnarch armv4l
|
|
target_list_user="$target_list_user arm-linux-user"
|
|
%endif
|
|
%ifnarch armv4b
|
|
target_list_user="$target_list_user armeb-linux-user"
|
|
%endif
|
|
%ifnarch sparc sparc64
|
|
target_list_user="$target_list_user sparc-linux-user"
|
|
%endif
|
|
%ifnarch ppc ppc64
|
|
target_list_user="$target_list_user ppc-linux-user"
|
|
%endif
|
|
%ifnarch mips
|
|
target_list_user="$target_list_user mips-linux-user"
|
|
%endif
|
|
%ifnarch mipsel
|
|
target_list_user="$target_list_user mipsel-linux-user"
|
|
%endif
|
|
%ifnarch m68k
|
|
target_list_user="$target_list_user m68k-linux-user"
|
|
%endif
|
|
QEMU_OPT_FLAGS="$QEMU_OPT_FLAGS -fno-strict-aliasing"
|
|
mkdir -p dynamic
|
|
%ifarch %ix86 x86_64
|
|
# build i386/x86_64 system with kqemu support
|
|
./configure --prefix=/usr \
|
|
--interp-prefix=/usr/share/qemu/qemu-i386 \
|
|
--target-list="$target_list_kqemu" --cc=%qemucc \
|
|
--enable-adlib --extra-cflags="$QEMU_OPT_FLAGS"
|
|
echo '#define USE_KQEMU 1' >>config-host.h
|
|
make #%{?jobs:-j%{jobs}}
|
|
mv */qemu */qemu-* dynamic || true
|
|
make clean
|
|
%endif
|
|
# build system emus without kqemu support
|
|
./configure --prefix=/usr \
|
|
--interp-prefix=/usr/share/qemu/qemu-i386 \
|
|
--target-list="$target_list" --cc=%qemucc \
|
|
--enable-adlib --extra-cflags="$QEMU_OPT_FLAGS"
|
|
make #%{?jobs:-j%{jobs}}
|
|
mv */qemu *-*/qemu-* dynamic || true
|
|
make clean
|
|
# build userland emus
|
|
./configure --prefix=/usr \
|
|
--interp-prefix=/usr/share/qemu/qemu-i386 \
|
|
--target-list="$target_list_user" --cc=%qemucc \
|
|
--static --extra-cflags="$QEMU_OPT_FLAGS"
|
|
make #%{?jobs:-j%{jobs}}
|
|
|
|
%install
|
|
install -d -m 755 $RPM_BUILD_ROOT/usr/bin
|
|
%ifnarch alpha
|
|
install -m 755 */qemu */qemu-* $RPM_BUILD_ROOT/usr/bin
|
|
ln -sf qemu $RPM_BUILD_ROOT/usr/bin/qemu-system-i386
|
|
%endif
|
|
install -m 755 */qemu-* $RPM_BUILD_ROOT/usr/bin
|
|
install -d -m 755 $RPM_BUILD_ROOT/%{_mandir}/man1
|
|
install -m 644 qemu.1 $RPM_BUILD_ROOT/%{_mandir}/man1
|
|
install -d -m 755 $RPM_BUILD_ROOT/usr/share/qemu
|
|
install -m 644 pc-bios/*.bin pc-bios/video.x pc-bios/openbios-sparc32 $RPM_BUILD_ROOT/usr/share/qemu
|
|
install -d -m 755 $RPM_BUILD_ROOT/usr/sbin
|
|
install -m 755 qemu-binfmt-conf.sh $RPM_BUILD_ROOT/usr/sbin
|
|
install -m 755 qemu-img $RPM_BUILD_ROOT/usr/bin
|
|
install -d -m 755 $RPM_BUILD_ROOT/usr/share/qemu/keymaps
|
|
install -m 644 keymaps/[a-z]* $RPM_BUILD_ROOT/usr/share/qemu/keymaps
|
|
%ifnarch %ix86 x86_64
|
|
ln -sf ../../../emul/ia32-linux $RPM_BUILD_ROOT/usr/share/qemu/qemu-i386
|
|
%endif
|
|
%ifnarch ia64
|
|
mkdir -p $RPM_BUILD_ROOT/emul/ia32-linux
|
|
%endif
|
|
|
|
%clean
|
|
rm -rf ${RPM_BUILD_ROOT}
|
|
rm -rf %{gcc33tmp}
|
|
|
|
%files
|
|
%defattr(-, root, root)
|
|
%doc COPYING COPYING.LIB Changelog README TODO VERSION qemu-doc.html
|
|
%ifnarch alpha
|
|
/usr/bin/qemu
|
|
%endif
|
|
/usr/bin/qemu-*
|
|
/usr/sbin/qemu*
|
|
%{_mandir}/man1/qemu*.1.gz
|
|
/usr/share/qemu
|
|
%ifnarch %ix86 x86_64 ia64
|
|
%dir /emul/ia32-linux
|
|
%endif
|
|
|
|
%changelog
|
|
* Wed Apr 04 2007 - agraf@suse.de
|
|
- fixed initrd loading on x86
|
|
* Thu Mar 29 2007 - ro@suse.de
|
|
- added bison to BuildRequires
|
|
* Tue Feb 20 2007 - uli@suse.de
|
|
- added better fix by Robert Schiele (bug #241950)
|
|
- update -> 0.9.0
|
|
- Support for relative paths in backing files for disk images
|
|
- Async file I/O API
|
|
- New qcow2 disk image format
|
|
- Support of multiple VM snapshots
|
|
- Linux: specific host CDROM and floppy support
|
|
- SMM support
|
|
- Moved PCI init, MP table init and ACPI table init to Bochs BIOS
|
|
- Support for MIPS32 Release 2 instruction set (Thiemo Seufer)
|
|
- MIPS Malta system emulation (Aurelien Jarno, Stefan Weil)
|
|
- Darwin userspace emulation (Pierre d'Herbemont)
|
|
- m68k user support (Paul Brook)
|
|
- several x86 and x86_64 emulation fixes
|
|
- Mouse relative offset VNC extension (Anthony Liguori)
|
|
- PXE boot support (Anthony Liguori)
|
|
- '-daemonize' option (Anthony Liguori)
|
|
* Tue Feb 06 2007 - uli@suse.de
|
|
- added fix by Robert Schiele to work without usbdevfs
|
|
(bug #241950)
|
|
* Fri Feb 02 2007 - ro@suse.de
|
|
- remove -fstack-protector from CFLAGS
|
|
* Fri Oct 27 2006 - schwab@suse.de
|
|
- Fix char signedness.
|
|
* Mon Sep 11 2006 - uli@suse.de
|
|
- re-added ARM FPE patch
|
|
- fixed SPARC on PPC
|
|
- install missing openbios-sparc32
|
|
* Sat Sep 09 2006 - dmueller@suse.de
|
|
- update to 0.8.2:
|
|
- ACPI support
|
|
- PC VGA BIOS fixes
|
|
- MIPS FPU support (Marius Groeger)
|
|
- PPC breakpoints and single stepping (Jason Wessel)
|
|
- USB updates (Paul Brook)
|
|
- UDP/TCP/telnet character devices (Jason Wessel)
|
|
- Windows sparse file support (Frediano Ziglio)
|
|
- RTL8139 NIC TCP segmentation offloading (Igor Kovalenko)
|
|
- PCNET NIC support (Antony T Curtis)
|
|
- Support for variable frequency host CPUs
|
|
- Workaround for win32 SMP hosts
|
|
- Support for AMD Flash memories (Jocelyn Mayer)
|
|
- Audio capture to WAV files support (malc)
|
|
* Tue May 30 2006 - uli@suse.de
|
|
- fixed to build on PPC with new glibc
|
|
* Mon May 29 2006 - uli@suse.de
|
|
- fixed to build with new kernel headers
|
|
* Wed Mar 08 2006 - uli@suse.de
|
|
- split giant patch
|
|
- added NWFPE glue code fix
|
|
* Tue Mar 07 2006 - schwab@suse.de
|
|
- More fixes for ia64 port.
|
|
* Mon Mar 06 2006 - schwab@suse.de
|
|
- Remove obsolete hunk from ia64 patch.
|
|
* Wed Jan 25 2006 - mls@suse.de
|
|
- converted neededforbuild to BuildRequires
|
|
* Tue Dec 20 2005 - uli@suse.de
|
|
- update -> 0.8.0
|
|
* Thu Dec 08 2005 - uli@suse.de
|
|
- update to current CVS (MIPS userspace, ARM system, SMP, USB,
|
|
NX, VLAN, serial, parallel, ES1370, ALSA backend)
|
|
- build i386 and AMD64 emus with kqemu support if possible
|
|
- install missing PPC video driver, SPARC boot ROM
|
|
- install missing keymaps
|
|
* Mon Nov 07 2005 - uli@suse.de
|
|
- updated linker scripts for new binutils release
|
|
* Sat Sep 17 2005 - dmueller@suse.de
|
|
- update to 0.7.2
|
|
* Mon Aug 15 2005 - schwab@suse.de
|
|
- Don't package /emul/ia32-linux on ia64.
|
|
* Mon Aug 15 2005 - schwab@suse.de
|
|
- Fix compilation on ia64.
|
|
* Mon Aug 01 2005 - uli@suse.de
|
|
- update -> 0.7.1
|
|
- enabled x86_64-system
|
|
* Mon Jul 11 2005 - uli@suse.de
|
|
- update -> CVS (MIPS emulation)
|
|
- build with throwaway GCC3 (still no GCC4-compatible QEMU in
|
|
sight)
|
|
- enabled armeb-user
|
|
- link *-user statically (necessary for chrooting into non-native
|
|
systems)
|
|
- disabled s390, alpha, armv4l build (broken and unmaintained)
|
|
- disabled qemu-fast (broken and deprecated)
|
|
- disabled i386-user on x86_64 (useless)
|
|
- build with %%jobs
|
|
* Wed Jun 01 2005 - ro@suse.de
|
|
- update to 0.7.0, still no success with gcc-4
|
|
* Thu Jan 27 2005 - uli@suse.de
|
|
- baselibs-x86 link is unnecessary on x86/AMD64
|
|
- two ARM emulation fixes (RRX operand fix by Paul Brook, shifter
|
|
carry fix by me)
|
|
- SDL 1.2.8 can be linked statically -> enabled qemu-fast
|
|
* Mon Nov 29 2004 - uli@suse.de
|
|
- update -> 0.6.1
|
|
- build softmmu binaries on s390 (still doesn't work though)
|
|
- pack /emul/ia32-linux directory and symlink from /usr/share/qemu
|
|
so it's possible to use the IA64 baselibs-x86 packages
|
|
* Wed Sep 15 2004 - uli@suse.de
|
|
- removed unnecessary dependency on private glibc symbol
|
|
(bug #44864)
|
|
* Fri Aug 06 2004 - uli@suse.de
|
|
- update -> 0.6.0 (fixes for several OSs, improvements in emulated
|
|
hardware (IDE, PCI, network, VGA, APM, PowerMac), minor fixes,
|
|
tool for conversion of VMware images)
|
|
* Tue May 11 2004 - uli@suse.de
|
|
- update -> 0.5.5 (contains ARM, utime() fixes and several others)
|
|
- make uname() return target machine name (fixes config.guess,
|
|
rpm etc.)
|
|
- fake sigaltstack() (fixes m4)
|
|
- enabled x86-64
|
|
* Wed May 05 2004 - uli@suse.de
|
|
- fixed ARM emulation bug
|
|
* Wed Apr 28 2004 - uli@suse.de
|
|
- build with -fno-unit-at-a-time (fixes PPC system emulator)
|
|
* Wed Apr 28 2004 - uli@suse.de
|
|
- update -> 0.5.4 (runs Linux/PPC, several fixes)
|
|
* Mon Apr 19 2004 - uli@suse.de
|
|
- initial package
|