[qemu/f19] Fix build with latest libfdt Don't install conflicting binfmt handler on arm (bz #974804)

Cole Robinson crobinso at fedoraproject.org
Wed Jun 19 14:32:15 UTC 2013


commit 09f167f66ef31820464c74f77e1a04c2626941cc
Author: Cole Robinson <crobinso at redhat.com>
Date:   Wed Jun 19 10:31:57 2013 -0400

    Fix build with latest libfdt
    Don't install conflicting binfmt handler on arm (bz #974804)

 0208-configure-dtc-Probe-for-libfdt_env.h.patch |   85 +++++++++++++++++++++++
 qemu.spec                                       |   12 +++-
 2 files changed, 95 insertions(+), 2 deletions(-)
---
diff --git a/0208-configure-dtc-Probe-for-libfdt_env.h.patch b/0208-configure-dtc-Probe-for-libfdt_env.h.patch
new file mode 100644
index 0000000..4812460
--- /dev/null
+++ b/0208-configure-dtc-Probe-for-libfdt_env.h.patch
@@ -0,0 +1,85 @@
+From 70ef52a74f40710757ade876f1ae9ebeb9d9094c Mon Sep 17 00:00:00 2001
+From: Peter Crosthwaite <peter.crosthwaite at xilinx.com>
+Date: Mon, 27 May 2013 14:20:57 +1000
+Subject: [PATCH] configure: dtc: Probe for libfdt_env.h
+
+Currently QEMU provides a local clone of the file libfdt_env.h in
+/include. This file is supposed to come with the libfdt package and is
+only needed for broken installs of libfdt. Now that we have submodule
+dtc, just ignore these broken installs and prompt for the dtc submodule
+install instead. QEMU's local libfdt_env.h is removed accordingly.
+
+Manifests as a bug when building QEMU with modern libfdt. The new
+version of libfdt does not compile when QEMUs libfdt_env.h takes
+precedence over the hosts.
+
+Signed-off-by: Peter Crosthwaite <peter.crosthwaite at xilinx.com>
+Reviewed-by: Peter Maydell <peter.maydell at linaro.org>
+Acked-by: David Gibson <david at gibson.dropbear.id.au>
+Signed-off-by: Kim Phillips <kim.phillips at freescale.com>
+Acked-by: Paolo Bonzini <pbonzini at redhat.com>
+Message-id: 9b6a3a52e3f46cfbc1ded9ab56385ec045e46705.1369628289.git.peter.crosthwaite at xilinx.com
+Signed-off-by: Peter Maydell <peter.maydell at linaro.org>
+(cherry picked from commit 96ce65457690561417ae8e6f0e85f3c6f135018b)
+---
+ configure            |  2 ++
+ include/libfdt_env.h | 36 ------------------------------------
+ 2 files changed, 2 insertions(+), 36 deletions(-)
+ delete mode 100644 include/libfdt_env.h
+
+diff --git a/configure b/configure
+index bc2870b..2996e1d 100755
+--- a/configure
++++ b/configure
+@@ -2378,7 +2378,9 @@ fi
+ # fdt probe
+ if test "$fdt" != "no" ; then
+   fdt_libs="-lfdt"
++  # explicitly check for libfdt_env.h as it is missing in some stable installs
+   cat > $TMPC << EOF
++#include <libfdt_env.h>
+ int main(void) { return 0; }
+ EOF
+   if compile_prog "" "$fdt_libs" ; then
+diff --git a/include/libfdt_env.h b/include/libfdt_env.h
+deleted file mode 100644
+index 3667d4c..0000000
+--- a/include/libfdt_env.h
++++ /dev/null
+@@ -1,36 +0,0 @@
+-/*
+- * This program is free software; you can redistribute it and/or modify
+- * it under the terms of the GNU General Public License, version 2, as
+- * published by the Free Software Foundation.
+- *
+- * This program is distributed in the hope that it will be useful,
+- * but WITHOUT ANY WARRANTY; without even the implied warranty of
+- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+- * GNU General Public License for more details.
+- *
+- * You should have received a copy of the GNU General Public License
+- * along with this program; if not, see <http://www.gnu.org/licenses/>.
+- *
+- * Copyright IBM Corp. 2008
+- * Authors: Hollis Blanchard <hollisb at us.ibm.com>
+- *
+- */
+-
+-#ifndef _LIBFDT_ENV_H
+-#define _LIBFDT_ENV_H
+-
+-#include "qemu/bswap.h"
+-
+-#ifdef HOST_WORDS_BIGENDIAN
+-#define fdt32_to_cpu(x)  (x)
+-#define cpu_to_fdt32(x)  (x)
+-#define fdt64_to_cpu(x)  (x)
+-#define cpu_to_fdt64(x)  (x)
+-#else
+-#define fdt32_to_cpu(x)  bswap32(x)
+-#define cpu_to_fdt32(x)  bswap32(x)
+-#define fdt64_to_cpu(x)  bswap64(x)
+-#define cpu_to_fdt64(x)  bswap64(x)
+-#endif
+-
+-#endif /* _LIBFDT_ENV_H */
diff --git a/qemu.spec b/qemu.spec
index e8cb640..b8322e8 100644
--- a/qemu.spec
+++ b/qemu.spec
@@ -131,7 +131,7 @@
 Summary: QEMU is a FAST! processor emulator
 Name: qemu
 Version: 1.4.2
-Release: 3%{?dist}
+Release: 4%{?dist}
 # Epoch because we pushed a qemu-1.0 package. AIUI this can't ever be dropped
 Epoch: 2
 License: GPLv2+ and LGPLv2+ and BSD
@@ -247,6 +247,8 @@ Patch0205: 0205-qxl-Add-rom_size-compat-property-fix-migration-from-.patch
 Patch0206: 0206-rtl8139-flush-queued-packets-when-RxBufPtr-is-writte.patch
 # Fix crash on large drag and drop file transfer w/ spice (bz #969109)
 Patch0207: 0207-spice-qemu-char-vmc_write-Don-t-write-more-bytes-the.patch
+# Fix build with latest libfdt
+Patch0208: 0208-configure-dtc-Probe-for-libfdt_env.h.patch
 
 BuildRequires: SDL-devel
 BuildRequires: zlib-devel
@@ -783,6 +785,8 @@ CAC emulation development files.
 %patch0206 -p1
 # Fix crash on large drag and drop file transfer w/ spice (bz #969109)
 %patch0207 -p1
+# Fix build with latest libfdt
+%patch0208 -p1
 
 %build
 %if %{with kvmonly}
@@ -980,7 +984,7 @@ for i in dummy \
 %ifnarch alpha
     qemu-alpha \
 %endif
-%ifnarch arm
+%ifnarch %{arm}
     qemu-arm \
 %endif
     qemu-armeb \
@@ -1429,6 +1433,10 @@ getent passwd qemu >/dev/null || \
 %endif
 
 %changelog
+* Wed Jun 19 2013 Cole Robinson <crobinso at redhat.com> - 2:1.4.2-4
+- Fix build with latest libfdt
+- Don't install conflicting binfmt handler on arm (bz #974804)
+
 * Tue Jun 11 2013 Cole Robinson <crobinso at redhat.com> - 2:1.4.2-3
 - Fix rtl8139 + windows 7 + large transfers (bz #970240)
 - Fix crash on large drag and drop file transfer w/ spice (bz #969109)


More information about the scm-commits mailing list