From: Thomas Huth <thuth@redhat.com>
To: qemu-ppc@nongnu.org, Alexander Graf <agraf@suse.de>
Cc: mdroth@linux.vnet.ibm.com, aik@ozlabs.ru, qemu-devel@nongnu.org,
afaerber@suse.de, David Gibson <david@gibson.dropbear.id.au>
Subject: [Qemu-devel] [PATCH 2/2] configure: Check for libfdt version 1.4.0
Date: Mon, 18 May 2015 12:59:49 +0200 [thread overview]
Message-ID: <1431946789-5145-3-git-send-email-thuth@redhat.com> (raw)
In-Reply-To: <1431946789-5145-1-git-send-email-thuth@redhat.com>
Some recent patches require a function from libfdt version 1.4.0,
so we should check for this version during the configure step
already. Unfortunately, there does not seem to be a proper #define
for the version number in the libfdt headers. So alternatively,
we check for the availability of the required function
fdt_get_property_by_offset() instead instead.
Signed-off-by: Thomas Huth <thuth@redhat.com>
---
configure | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/configure b/configure
index 1f0f485..cee997f 100755
--- a/configure
+++ b/configure
@@ -3102,9 +3102,11 @@ fi
if test "$fdt" != "no" ; then
fdt_libs="-lfdt"
# explicitly check for libfdt_env.h as it is missing in some stable installs
+ # and test for required functions to make sure we are on a version >= 1.4.0
cat > $TMPC << EOF
+#include <libfdt.h>
#include <libfdt_env.h>
-int main(void) { return 0; }
+int main(void) { fdt_get_property_by_offset(0, 0, 0); return 0; }
EOF
if compile_prog "" "$fdt_libs" ; then
# system DTC is good - use it
@@ -3122,7 +3124,7 @@ EOF
fdt_libs="-L\$(BUILD_DIR)/dtc/libfdt $fdt_libs"
elif test "$fdt" = "yes" ; then
# have neither and want - prompt for system/submodule install
- error_exit "DTC (libfdt) not present. Your options:" \
+ error_exit "DTC (libfdt) version >= 1.4.0 not present. Your options:" \
" (1) Preferred: Install the DTC (libfdt) devel package" \
" (2) Fetch the DTC submodule, using:" \
" git submodule update --init dtc"
--
1.8.3.1
next prev parent reply other threads:[~2015-05-18 11:00 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-05-18 10:59 [Qemu-devel] [PATCH v2 0/2] ppc: Require libfdt 1.4.0 as minimum version Thomas Huth
2015-05-18 10:59 ` [Qemu-devel] [PATCH 1/2] dtc: Update dtc / libfdt submodule to version 1.4.0 Thomas Huth
2015-05-18 10:59 ` Thomas Huth [this message]
2015-05-18 13:09 ` [Qemu-devel] [PATCH v2 0/2] ppc: Require libfdt 1.4.0 as minimum version Alexander Graf
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1431946789-5145-3-git-send-email-thuth@redhat.com \
--to=thuth@redhat.com \
--cc=afaerber@suse.de \
--cc=agraf@suse.de \
--cc=aik@ozlabs.ru \
--cc=david@gibson.dropbear.id.au \
--cc=mdroth@linux.vnet.ibm.com \
--cc=qemu-devel@nongnu.org \
--cc=qemu-ppc@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.