Enable riscv64 as host (incl. WIP riscv backend patch)

Signed-off-by: David Abdurachmanov <david.abdurachmanov@gmail.com>
This commit is contained in:
David Abdurachmanov 2018-05-09 18:06:22 +02:00
parent 97eed6b145
commit 2e42dab32b
2 changed files with 2209 additions and 3 deletions

File diff suppressed because it is too large Load Diff

View File

@ -33,7 +33,7 @@
# Matches numactl ExcludeArch
%global have_numactl 1
%ifarch s390 %{arm}
%ifarch s390 %{arm} riscv64
%global have_numactl 0
%endif
@ -104,7 +104,7 @@ Requires: %{name}-ui-sdl = %{epoch}:%{version}-%{release}
Summary: QEMU is a FAST! processor emulator
Name: qemu
Version: 2.12.0
Release: 1%{?rcrel}%{?dist}
Release: 1%{?rcrel}.0.riscv64%{?dist}
Epoch: 2
License: GPLv2 and BSD and MIT and CC-BY
URL: http://www.qemu.org/
@ -137,13 +137,20 @@ Source21: 50-kvm-s390x.conf
# /etc/security/limits.d/95-kvm-ppc64-memlock.conf
Source22: 95-kvm-ppc64-memlock.conf
# riscv backend
# Source: https://github.com/riscv/riscv-qemu/commit/0805ad337785f0cce29ecf162bad9e1c477051f3.patch
# Development: https://github.com/riscv/riscv-qemu/commits/wip-riscv-tcg-backend
Patch0: qemu-2.12.0-riscv64-backend.patch
# documentation deps
BuildRequires: texinfo
# For /usr/bin/pod2man
BuildRequires: perl-podlators
# For sanity test
BuildRequires: qemu-sanity-check-nodeps
%ifnarch riscv64
BuildRequires: kernel
%endif
%if %{have_iasl}
# For acpi compilation
BuildRequires: iasl
@ -191,15 +198,19 @@ BuildRequires: spice-protocol >= 0.12.2
BuildRequires: spice-server-devel >= 0.12.0
%endif
# seccomp containment support
%ifnarch riscv64
BuildRequires: libseccomp-devel >= 2.3.0
%endif
# For network block driver
BuildRequires: libcurl-devel
# For rbd block driver
BuildRequires: librados2-devel
BuildRequires: librbd1-devel
# We need both because the 'stap' binary is probed for by configure
%ifnarch riscv64
BuildRequires: systemtap
BuildRequires: systemtap-sdt-devel
%endif
# For VNC JPEG support
BuildRequires: libjpeg-devel
# For VNC PNG support
@ -247,7 +258,9 @@ BuildRequires: virglrenderer-devel
# qemu 2.6: Needed for gtk GL support
BuildRequires: mesa-libgbm-devel
# qemu 2.11: preferred disassembler for TCG
%ifnarch riscv64
BuildRequires: capstone-devel
%endif
# qemu 2.12: parallels disk images require libxml2 now
BuildRequires: libxml2-devel
# python scripts in the build process
@ -839,7 +852,7 @@ This package provides the QEMU system emulator for Xtensa boards.
%build
# drop -g flag to prevent memory exhaustion by linker
%ifarch s390
%ifarch s390 riscv64
%global optflags %(echo %{optflags} | sed 's/-g//')
sed -i.debug 's/"-g $CFLAGS"/"$CFLAGS"/g' configure
%endif
@ -875,12 +888,20 @@ run_configure() {
--with-pkgversion=%{name}-%{version}-%{release} \
--disable-strip \
--disable-werror \
%ifnarch riscv64
--enable-kvm \
%endif
--python=/usr/bin/python3 \
%ifarch s390 %{mips64}
--enable-tcg-interpreter \
%endif
%ifarch riscv64
--disable-capstone \
--disable-seccomp \
%endif
%ifnarch riscv64
--enable-trace-backend=$tracebackends \
%endif
--extra-ldflags="$extraldflags -Wl,-z,relro -Wl,-z,now" \
--extra-cflags="%{optflags}" \
"$@" || cat config.log
@ -1663,6 +1684,9 @@ getent passwd qemu >/dev/null || \
%changelog
* Wed May 09 2018 David Abdurachmanov <david.abdurachmanov@gmail.com> - 2:2.12.0-1.0.riscv64
- Enable riscv64 as host
* Mon Apr 30 2018 Cole Robinson <crobinso@redhat.com> - 2:2.12.0-1
- Update to qemu-2.12.0 GA