diff mbox series

[v2,1/6] configure: Do not build libfdt if not required

Message ID 20200118140619.26333-2-philmd@redhat.com (mailing list archive)
State New, archived
Headers show
Series buildsys: Build faster (mostly tools and linux-user) | expand

Commit Message

Philippe Mathieu-Daudé Jan. 18, 2020, 2:06 p.m. UTC
We only require libfdt for system emulation, in a small set
of architecture:

4077  # fdt support is mandatory for at least some target architectures,
4078  # so insist on it if we're building those system emulators.
4079  fdt_required=no
4080  for target in $target_list; do
4081    case $target in
4082      aarch64*-softmmu|arm*-softmmu|ppc*-softmmu|microblaze*-softmmu|mips64el-softmmu|riscv*-softmmu)
4083        fdt_required=yes

Do not build libfdt if we did not manually specified --enable-fdt,
or have one of the platforms that require it in our target list.

Reviewed-by: Thomas Huth <thuth@redhat.com>
Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
---
v2: Improved description (thuth)
---
 configure | 2 ++
 1 file changed, 2 insertions(+)

Comments

Alex Bennée Jan. 20, 2020, 11:02 a.m. UTC | #1
Philippe Mathieu-Daudé <philmd@redhat.com> writes:

> We only require libfdt for system emulation, in a small set
> of architecture:
>
> 4077  # fdt support is mandatory for at least some target architectures,
> 4078  # so insist on it if we're building those system emulators.
> 4079  fdt_required=no
> 4080  for target in $target_list; do
> 4081    case $target in
> 4082      aarch64*-softmmu|arm*-softmmu|ppc*-softmmu|microblaze*-softmmu|mips64el-softmmu|riscv*-softmmu)
> 4083        fdt_required=yes
>
> Do not build libfdt if we did not manually specified --enable-fdt,
> or have one of the platforms that require it in our target list.
>
> Reviewed-by: Thomas Huth <thuth@redhat.com>
> Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>

Reviewed-by: Alex Bennée <alex.bennee@linaro.org>

> ---
> v2: Improved description (thuth)
> ---
>  configure | 2 ++
>  1 file changed, 2 insertions(+)
>
> diff --git a/configure b/configure
> index 557e4382ea..c67a7e73db 100755
> --- a/configure
> +++ b/configure
> @@ -4095,6 +4095,8 @@ if test "$fdt_required" = "yes"; then
>        "targets which need it (by specifying a cut down --target-list)."
>    fi
>    fdt=yes
> +elif test "$fdt" != "yes" ; then
> +  fdt=no
>  fi
>  
>  if test "$fdt" != "no" ; then
diff mbox series

Patch

diff --git a/configure b/configure
index 557e4382ea..c67a7e73db 100755
--- a/configure
+++ b/configure
@@ -4095,6 +4095,8 @@  if test "$fdt_required" = "yes"; then
       "targets which need it (by specifying a cut down --target-list)."
   fi
   fdt=yes
+elif test "$fdt" != "yes" ; then
+  fdt=no
 fi
 
 if test "$fdt" != "no" ; then