From 81a3da8be996b8878b59677614f9374f5010f558 Mon Sep 17 00:00:00 2001 From: Cole Robinson Date: Jun 19 2013 14:35:19 +0000 Subject: Don't install conflicting binfmt handler on arm (bz #974804) Use upstream patch for libfdt build fix --- diff --git a/0007-configure-dtc-Probe-for-libfdt_env.h.patch b/0007-configure-dtc-Probe-for-libfdt_env.h.patch new file mode 100644 index 0000000..dc48971 --- /dev/null +++ b/0007-configure-dtc-Probe-for-libfdt_env.h.patch @@ -0,0 +1,85 @@ +From 7e72644adb7ed1092a90cf26c4edbba4b3f2b11b Mon Sep 17 00:00:00 2001 +From: Peter Crosthwaite +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 +Reviewed-by: Peter Maydell +Acked-by: David Gibson +Signed-off-by: Kim Phillips +Acked-by: Paolo Bonzini +Message-id: 9b6a3a52e3f46cfbc1ded9ab56385ec045e46705.1369628289.git.peter.crosthwaite@xilinx.com +Signed-off-by: Peter Maydell +(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 fb41cb6..7e07cb7 100755 +--- a/configure ++++ b/configure +@@ -2526,7 +2526,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 + 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 . +- * +- * Copyright IBM Corp. 2008 +- * Authors: Hollis Blanchard +- * +- */ +- +-#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/0007-fdt-update-embedded-header-file-from-upstream-to-fix.patch b/0007-fdt-update-embedded-header-file-from-upstream-to-fix.patch deleted file mode 100644 index bf86b54..0000000 --- a/0007-fdt-update-embedded-header-file-from-upstream-to-fix.patch +++ /dev/null @@ -1,80 +0,0 @@ -From 53800f1a71cdbc9e0deadd00e77d5d60a45ab999 Mon Sep 17 00:00:00 2001 -From: Andre Przywara -Date: Tue, 7 May 2013 14:36:59 +0200 -Subject: [PATCH] fdt: update embedded header file from upstream to fix - compilation - -Upstream dtc.git introduced a change in libfdt_env.h, which breaks -compilation with QEMU's version of it: - - CC arm-softmmu/device_tree.o -In file included from /usr/include/libfdt.h:55:0, - from /src/qemu.git/device_tree.c:28: -/usr/include/fdt.h:7:2: error: unknown type name 'fdt32_t' - ... - -The culprit is: -commit feafcd972cb744750a65728440c99526e6199a6d -Author: Kim Phillips -Date: Wed Nov 28 17:33:01 2012 -0600 - - dtc/libfdt: introduce fdt types for annotation by endian checkers - ... - -Pull the new definitions into QEMU's version of the file. This change -also works with older installed versions of dtc. -The upstream version got a "GPL or BSD" dual license header meanwhile. -I retained the original GPL license header from QEMU, only added -the original copyrights. - -Signed-off-by: Andre Przywara ---- - include/libfdt_env.h | 25 ++++++++++++++++++++----- - 1 file changed, 20 insertions(+), 5 deletions(-) - -diff --git a/include/libfdt_env.h b/include/libfdt_env.h -index 3667d4c..aad54bb 100644 ---- a/include/libfdt_env.h -+++ b/include/libfdt_env.h -@@ -1,4 +1,12 @@ -+#ifndef _LIBFDT_ENV_H -+#define _LIBFDT_ENV_H - /* -+ * libfdt - Flat Device Tree manipulation -+ * Copyright (C) 2006 David Gibson, IBM Corporation. -+ * Copyright 2012 Kim Phillips, Freescale Semiconductor. -+ * Adaptation to QEMU: Copyright IBM Corp. 2008 -+ * by Hollis Blanchard -+ * - * 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. -@@ -11,16 +19,23 @@ - * You should have received a copy of the GNU General Public License - * along with this program; if not, see . - * -- * Copyright IBM Corp. 2008 -- * Authors: Hollis Blanchard - * - */ - --#ifndef _LIBFDT_ENV_H --#define _LIBFDT_ENV_H -- - #include "qemu/bswap.h" - -+#ifdef __CHECKER__ -+#define __force __attribute__((force)) -+#define __bitwise __attribute__((bitwise)) -+#else -+#define __force -+#define __bitwise -+#endif -+ -+typedef uint16_t __bitwise fdt16_t; -+typedef uint32_t __bitwise fdt32_t; -+typedef uint64_t __bitwise fdt64_t; -+ - #ifdef HOST_WORDS_BIGENDIAN - #define fdt32_to_cpu(x) (x) - #define cpu_to_fdt32(x) (x) diff --git a/qemu.spec b/qemu.spec index b8b1558..04f29f2 100644 --- a/qemu.spec +++ b/qemu.spec @@ -140,7 +140,7 @@ Summary: QEMU is a FAST! processor emulator Name: qemu Version: 1.5.0 -Release: 8%{?dist} +Release: 9%{?dist} Epoch: 2 License: GPLv2+ and LGPLv2+ and BSD Group: Development/Tools @@ -191,7 +191,7 @@ Patch0005: 0005-qxl-Add-rom_size-compat-property-fix-migration-from-.patch # Fix rtl8139 + windows 7 + large transfers (bz #970240) Patch0006: 0006-rtl8139-flush-queued-packets-when-RxBufPtr-is-writte.patch # Fix build with rawhide libfdt -Patch0007: 0007-fdt-update-embedded-header-file-from-upstream-to-fix.patch +Patch0007: 0007-configure-dtc-Probe-for-libfdt_env.h.patch BuildRequires: SDL-devel BuildRequires: zlib-devel @@ -901,7 +901,7 @@ for i in dummy \ %ifnarch alpha qemu-alpha \ %endif -%ifnarch arm +%ifnarch %{arm} qemu-arm \ %endif qemu-armeb \ @@ -1378,6 +1378,10 @@ getent passwd qemu >/dev/null || \ %endif %changelog +* Wed Jun 19 2013 Cole Robinson - 2:1.5.0-9 +- Don't install conflicting binfmt handler on arm (bz #974804) +- Use upstream patch for libfdt build fix + * Fri Jun 14 2013 Peter Robinson 2:1.5.0-8 - Put ARM kvm bits in right sub package