* [Qemu-devel] [PATCH] configure: Check for libfdt version 1.4.0
@ 2015-05-18 7:43 Thomas Huth
2015-05-25 1:35 ` David Gibson
0 siblings, 1 reply; 4+ messages in thread
From: Thomas Huth @ 2015-05-18 7:43 UTC (permalink / raw)
To: qemu-ppc, Alexander Graf; +Cc: mdroth, aik, qemu-devel, afaerber, David Gibson
Some recent patches require functions 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 fdtXX_t types instead which have
just been introduced with version 1.4.0.
Signed-off-by: Thomas Huth <thuth@redhat.com>
---
configure | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/configure b/configure
index b18aa9e..87a5bbc 100755
--- a/configure
+++ b/configure
@@ -3091,9 +3091,10 @@ fi
if test "$fdt" != "no" ; then
fdt_libs="-lfdt"
# explicitly check for libfdt_env.h as it is missing in some stable installs
+ # and also test for fdtXX_t to make sure we are on a version >= 1.4.0
cat > $TMPC << EOF
#include <libfdt_env.h>
-int main(void) { return 0; }
+int main(void) { fdt32_t x = 0; return x; }
EOF
if compile_prog "" "$fdt_libs" ; then
# system DTC is good - use it
@@ -3111,7 +3112,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
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [Qemu-devel] [PATCH] configure: Check for libfdt version 1.4.0
2015-05-18 7:43 [Qemu-devel] [PATCH] configure: Check for libfdt version 1.4.0 Thomas Huth
@ 2015-05-25 1:35 ` David Gibson
2015-05-25 12:30 ` Peter Maydell
0 siblings, 1 reply; 4+ messages in thread
From: David Gibson @ 2015-05-25 1:35 UTC (permalink / raw)
To: Thomas Huth; +Cc: qemu-devel, aik, mdroth, Alexander Graf, qemu-ppc, afaerber
[-- Attachment #1: Type: text/plain, Size: 2006 bytes --]
On Mon, May 18, 2015 at 09:43:21AM +0200, Thomas Huth wrote:
> Some recent patches require functions 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 fdtXX_t types instead which have
> just been introduced with version 1.4.0.
Um.. I'm confused by this. As far as I can recall the fdtXX_t types
have been in libfdt since.. well, forever, basically.
>
> Signed-off-by: Thomas Huth <thuth@redhat.com>
> ---
> configure | 5 +++--
> 1 file changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/configure b/configure
> index b18aa9e..87a5bbc 100755
> --- a/configure
> +++ b/configure
> @@ -3091,9 +3091,10 @@ fi
> if test "$fdt" != "no" ; then
> fdt_libs="-lfdt"
> # explicitly check for libfdt_env.h as it is missing in some stable installs
> + # and also test for fdtXX_t to make sure we are on a version >= 1.4.0
> cat > $TMPC << EOF
> #include <libfdt_env.h>
> -int main(void) { return 0; }
> +int main(void) { fdt32_t x = 0; return x; }
> EOF
> if compile_prog "" "$fdt_libs" ; then
> # system DTC is good - use it
> @@ -3111,7 +3112,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"
--
David Gibson | I'll have my music baroque, and my code
david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_
| _way_ _around_!
http://www.ozlabs.org/~dgibson
[-- Attachment #2: Type: application/pgp-signature, Size: 819 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Qemu-devel] [PATCH] configure: Check for libfdt version 1.4.0
2015-05-25 1:35 ` David Gibson
@ 2015-05-25 12:30 ` Peter Maydell
2015-05-26 2:57 ` David Gibson
0 siblings, 1 reply; 4+ messages in thread
From: Peter Maydell @ 2015-05-25 12:30 UTC (permalink / raw)
To: David Gibson
Cc: Thomas Huth, Michael Roth, Alexey Kardashevskiy, Alexander Graf,
QEMU Developers, qemu-ppc@nongnu.org, Andreas Färber
On 25 May 2015 at 02:35, David Gibson <david@gibson.dropbear.id.au> wrote:
> On Mon, May 18, 2015 at 09:43:21AM +0200, Thomas Huth wrote:
>> Some recent patches require functions 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 fdtXX_t types instead which have
>> just been introduced with version 1.4.0.
>
> Um.. I'm confused by this. As far as I can recall the fdtXX_t types
> have been in libfdt since.. well, forever, basically.
There's no such typedef in the libfdt that QEMU is currently
using (which I think is 1.3.0). It looks like they were added
in this commit:
https://git.kernel.org/cgit/utils/dtc/dtc.git/commit/libfdt/libfdt_env.h?id=feafcd972cb744750a65728440c99526e6199a6d
in early 2013.
QEMU took a copy of the dtc module in April 2013, at which
point we used 1.3.0 as the most recently tagged stable version.
thanks
-- PMM
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Qemu-devel] [PATCH] configure: Check for libfdt version 1.4.0
2015-05-25 12:30 ` Peter Maydell
@ 2015-05-26 2:57 ` David Gibson
0 siblings, 0 replies; 4+ messages in thread
From: David Gibson @ 2015-05-26 2:57 UTC (permalink / raw)
To: Peter Maydell
Cc: Thomas Huth, Michael Roth, Alexey Kardashevskiy, Alexander Graf,
QEMU Developers, qemu-ppc@nongnu.org, Andreas Färber
[-- Attachment #1: Type: text/plain, Size: 1572 bytes --]
On Mon, May 25, 2015 at 01:30:11PM +0100, Peter Maydell wrote:
> On 25 May 2015 at 02:35, David Gibson <david@gibson.dropbear.id.au> wrote:
> > On Mon, May 18, 2015 at 09:43:21AM +0200, Thomas Huth wrote:
> >> Some recent patches require functions 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 fdtXX_t types instead which have
> >> just been introduced with version 1.4.0.
> >
> > Um.. I'm confused by this. As far as I can recall the fdtXX_t types
> > have been in libfdt since.. well, forever, basically.
>
> There's no such typedef in the libfdt that QEMU is currently
> using (which I think is 1.3.0). It looks like they were added
> in this commit:
> https://git.kernel.org/cgit/utils/dtc/dtc.git/commit/libfdt/libfdt_env.h?id=feafcd972cb744750a65728440c99526e6199a6d
> in early 2013.
Ah, duh, I was mixing up the fdtXX_t _types_ which were introduced
with sparse annotations with the fdtXX_to_cpu functions/macros which
have been around since forever.
Still, I think looking at the actual exported functions is a better
idea than looking at the types - which I see Thomas has already done
in his latest spin.
--
David Gibson | I'll have my music baroque, and my code
david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_
| _way_ _around_!
http://www.ozlabs.org/~dgibson
[-- Attachment #2: Type: application/pgp-signature, Size: 819 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2015-05-26 2:57 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-05-18 7:43 [Qemu-devel] [PATCH] configure: Check for libfdt version 1.4.0 Thomas Huth
2015-05-25 1:35 ` David Gibson
2015-05-25 12:30 ` Peter Maydell
2015-05-26 2:57 ` David Gibson
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).