yeahuh / rpms / qemu-kvm

Forked from rpms/qemu-kvm 2 years ago
Clone
Blob Blame History Raw
From 72b1305cb8cbcd0847a435326c7fa90273ac9c56 Mon Sep 17 00:00:00 2001
From: Miroslav Rezanina <mrezanin@redhat.com>
Date: Tue, 2 Jun 2015 13:21:50 +0200
Subject: [PATCH 3/8] configure: Require libfdt for arm, ppc, microblaze
 softmmu targets

Message-id: <e24e27b010c3f7c0e6a087004f341ec9ffd73a2c.1433250807.git.mrezanin@redhat.com>
Patchwork-id: 65305
O-Subject: [RHEL-7.2 qemu-kvm PATCH 1/4] configure: Require libfdt for arm, ppc, microblaze softmmu targets
Bugzilla: 1217850
RH-Acked-by: Laszlo Ersek <lersek@redhat.com>
RH-Acked-by: Paolo Bonzini <pbonzini@redhat.com>
RH-Acked-by: Wei Huang <wei@redhat.com>
RH-Acked-by: Jeff Nelson <jenelson@redhat.com>

From: Peter Maydell <peter.maydell@linaro.org>

A number of our softmmu targets (PPC, ARM, Microblaze) now more or
less require flattened device tree support for various board models
to work correctly.  Make libfdt mandatory if the target list includes
these, rather than building unhelpful half-functional binaries.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
Reviewed-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>
Tested-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
Message-id: 1369409217-7553-2-git-send-email-peter.maydell@linaro.org
(cherry-picked from e169e1e1ae1e75c522f932554890fb0f2f3e9999)
Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>

Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
---
 configure | 20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)

diff --git a/configure b/configure
index 1583359..4f63345 100755
--- a/configure
+++ b/configure
@@ -2645,6 +2645,26 @@ fi
 
 ##########################################
 # fdt probe
+# fdt support is mandatory for at least some target architectures,
+# so insist on it if we're building those system emulators.
+fdt_required=no
+for target in $target_list; do
+  case $target in
+    arm*-softmmu|ppc*-softmmu|microblaze*-softmmu)
+      fdt_required=yes
+    ;;
+  esac
+done
+
+if test "$fdt_required" = "yes"; then
+  if test "$fdt" = "no"; then
+    error_exit "fdt disabled but some requested targets require it." \
+      "You can turn off fdt only if you also disable all the system emulation" \
+      "targets which need it (by specifying a cut down --target-list)."
+  fi
+  fdt=yes
+fi
+
 if test "$fdt" != "no" ; then
   fdt_libs="-lfdt"
   cat > $TMPC << EOF
-- 
1.8.3.1