Blame 0007-configure-dtc-Probe-for-libfdt_env.h.patch

81a3da
From 7e72644adb7ed1092a90cf26c4edbba4b3f2b11b Mon Sep 17 00:00:00 2001
81a3da
From: Peter Crosthwaite <peter.crosthwaite@xilinx.com>
81a3da
Date: Mon, 27 May 2013 14:20:57 +1000
81a3da
Subject: [PATCH] configure: dtc: Probe for libfdt_env.h
81a3da
81a3da
Currently QEMU provides a local clone of the file libfdt_env.h in
81a3da
/include. This file is supposed to come with the libfdt package and is
81a3da
only needed for broken installs of libfdt. Now that we have submodule
81a3da
dtc, just ignore these broken installs and prompt for the dtc submodule
81a3da
install instead. QEMU's local libfdt_env.h is removed accordingly.
81a3da
81a3da
Manifests as a bug when building QEMU with modern libfdt. The new
81a3da
version of libfdt does not compile when QEMUs libfdt_env.h takes
81a3da
precedence over the hosts.
81a3da
81a3da
Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>
81a3da
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
81a3da
Acked-by: David Gibson <david@gibson.dropbear.id.au>
81a3da
Signed-off-by: Kim Phillips <kim.phillips@freescale.com>
81a3da
Acked-by: Paolo Bonzini <pbonzini@redhat.com>
81a3da
Message-id: 9b6a3a52e3f46cfbc1ded9ab56385ec045e46705.1369628289.git.peter.crosthwaite@xilinx.com
81a3da
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
81a3da
(cherry picked from commit 96ce65457690561417ae8e6f0e85f3c6f135018b)
81a3da
---
81a3da
 configure            |  2 ++
81a3da
 include/libfdt_env.h | 36 ------------------------------------
81a3da
 2 files changed, 2 insertions(+), 36 deletions(-)
81a3da
 delete mode 100644 include/libfdt_env.h
81a3da
81a3da
diff --git a/configure b/configure
81a3da
index fb41cb6..7e07cb7 100755
81a3da
--- a/configure
81a3da
+++ b/configure
81a3da
@@ -2526,7 +2526,9 @@ fi
81a3da
 # fdt probe
81a3da
 if test "$fdt" != "no" ; then
81a3da
   fdt_libs="-lfdt"
81a3da
+  # explicitly check for libfdt_env.h as it is missing in some stable installs
81a3da
   cat > $TMPC << EOF
81a3da
+#include <libfdt_env.h>
81a3da
 int main(void) { return 0; }
81a3da
 EOF
81a3da
   if compile_prog "" "$fdt_libs" ; then
81a3da
diff --git a/include/libfdt_env.h b/include/libfdt_env.h
81a3da
deleted file mode 100644
81a3da
index 3667d4c..0000000
81a3da
--- a/include/libfdt_env.h
81a3da
+++ /dev/null
81a3da
@@ -1,36 +0,0 @@
81a3da
-/*
81a3da
- * This program is free software; you can redistribute it and/or modify
81a3da
- * it under the terms of the GNU General Public License, version 2, as
81a3da
- * published by the Free Software Foundation.
81a3da
- *
81a3da
- * This program is distributed in the hope that it will be useful,
81a3da
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
81a3da
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
81a3da
- * GNU General Public License for more details.
81a3da
- *
81a3da
- * You should have received a copy of the GNU General Public License
81a3da
- * along with this program; if not, see <http://www.gnu.org/licenses/>.
81a3da
- *
81a3da
- * Copyright IBM Corp. 2008
81a3da
- * Authors: Hollis Blanchard <hollisb@us.ibm.com>
81a3da
- *
81a3da
- */
81a3da
-
81a3da
-#ifndef _LIBFDT_ENV_H
81a3da
-#define _LIBFDT_ENV_H
81a3da
-
81a3da
-#include "qemu/bswap.h"
81a3da
-
81a3da
-#ifdef HOST_WORDS_BIGENDIAN
81a3da
-#define fdt32_to_cpu(x)  (x)
81a3da
-#define cpu_to_fdt32(x)  (x)
81a3da
-#define fdt64_to_cpu(x)  (x)
81a3da
-#define cpu_to_fdt64(x)  (x)
81a3da
-#else
81a3da
-#define fdt32_to_cpu(x)  bswap32(x)
81a3da
-#define cpu_to_fdt32(x)  bswap32(x)
81a3da
-#define fdt64_to_cpu(x)  bswap64(x)
81a3da
-#define cpu_to_fdt64(x)  bswap64(x)
81a3da
-#endif
81a3da
-
81a3da
-#endif /* _LIBFDT_ENV_H */