Skip to contentSkip to conversation

configure: linux-user doesn't need neither fdt nor slirp

PATCH In review Laurent Vivier 4 participants 4 messages Jun 21, 2019 – Feb 18, 2020

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 configure: linux-user doesn't need neither fdt nor slirp

if softmmu is not enabled, we disable by default fdt and slirp as they are only used by -softmmu targets.

A side effect is the git submodules are not cloned if they are not needed.

Clone and build can be forced with --enable-fdt and --enable-slirp.

---
 configure | 10 ++++++++++
 1 file changed, 10 insertions(+)
configure +10 -0
index b091b82cb371..4b3853298c79 100755
@@ -4066,6 +4066,11 @@ if test "$fdt_required" = "yes"; then
   fdt=yes
 fi
 
+# linux-user doesn't need fdt
+if test -z "$fdt" -a "$softmmu" != "yes" ; then
+    fdt="no"
+fi
+
 if test "$fdt" != "no" ; then
   fdt_libs="-lfdt"
   # explicitly check for libfdt_env.h as it is missing in some stable installs
@@ -5923,6 +5928,11 @@ fi
 ##########################################
 # check for slirp
 
+# linux-user doesn't need slirp
+if test -z "$slirp" -a "$softmmu" != "yes" ; then
+    slirp="no"
+fi
+
 case "$slirp" in
   "" | yes)
     if $pkg_config slirp; then
Signature · 1 line
2.21.0
Reviewed-by on v1 1/1
#1 lore raw

Hi

Quoted 11 lines · Laurent Vivier

if softmmu is not enabled, we disable by default fdt and slirp as they are only used by -softmmu targets.

A side effect is the git submodules are not cloned if they are not needed.

Clone and build can be forced with --enable-fdt and --enable-slirp.

lgtm

Quoted 35 lines
---
 configure | 10 ++++++++++
 1 file changed, 10 insertions(+)
configure +10 -1
index b091b82cb371..4b3853298c79 100755
@@ -4066,6 +4066,11 @@ if test "$fdt_required" = "yes"; then
   fdt=yes
 fi
 
+# linux-user doesn't need fdt
+if test -z "$fdt" -a "$softmmu" != "yes" ; then
+    fdt="no"
+fi
+
 if test "$fdt" != "no" ; then
   fdt_libs="-lfdt"
   # explicitly check for libfdt_env.h as it is missing in some stable installs
@@ -5923,6 +5928,11 @@ fi
 ##########################################
 # check for slirp
 
+# linux-user doesn't need slirp
+if test -z "$slirp" -a "$softmmu" != "yes" ; then
+    slirp="no"
+fi
+
 case "$slirp" in
   "" | yes)
     if $pkg_config slirp; then
--

2.21.0

Reviewed-by Tested-by on v1 1/1
#2 lore raw
In reply to Laurent Vivier
Quoted 19 lines · Laurent Vivier

if softmmu is not enabled, we disable by default fdt and slirp as they are only used by -softmmu targets.

A side effect is the git submodules are not cloned if they are not needed.

Clone and build can be forced with --enable-fdt and --enable-slirp.

---
 configure | 10 ++++++++++
 1 file changed, 10 insertions(+)
configure +0 -0
index b091b82cb371..4b3853298c79 100755

configure if test "$fdt_required" = "yes"; then · line 4069

Quoted 4 lines
configure +1 -0
@@ -4066,6 +4066,11 @@ if test "$fdt_required" = "yes"; then
   fdt=yes
 fi
 
+# linux-user doesn't need fdt

"fdt is only required when building softmmu targets"

(we don't need it to build tools such qemu-img)

configure fi · line 5931

Quoted 12 lines
configure +5 -0
+if test -z "$fdt" -a "$softmmu" != "yes" ; then
+    fdt="no"
+fi
+
 if test "$fdt" != "no" ; then
   fdt_libs="-lfdt"
   # explicitly check for libfdt_env.h as it is missing in some stable installs
@@ -5923,6 +5928,11 @@ fi
 ##########################################
 # check for slirp
 
+# linux-user doesn't need slirp

"slirp is only required when building softmmu targets"

configure fi · line 5938

Quoted 8 lines
configure +4 -0
+if test -z "$slirp" -a "$softmmu" != "yes" ; then
+    slirp="no"
+fi
+
 case "$slirp" in
   "" | yes)
     if $pkg_config slirp; then
#3 lore raw
In reply to Laurent Vivier

Le 21/06/2019 à 15:05, Laurent Vivier a écrit :

Quoted 33 lines

if softmmu is not enabled, we disable by default fdt and slirp as they are only used by -softmmu targets.

A side effect is the git submodules are not cloned if they are not needed.

Clone and build can be forced with --enable-fdt and --enable-slirp.

---
 configure | 10 ++++++++++
 1 file changed, 10 insertions(+)
configure +5 -0
index b091b82cb371..4b3853298c79 100755
@@ -4066,6 +4066,11 @@ if test "$fdt_required" = "yes"; then
   fdt=yes
 fi
 
+# linux-user doesn't need fdt
+if test -z "$fdt" -a "$softmmu" != "yes" ; then
+    fdt="no"
+fi
+
 if test "$fdt" != "no" ; then
   fdt_libs="-lfdt"
   # explicitly check for libfdt_env.h as it is missing in some stable installs
@@ -5923,6 +5928,11 @@ fi
 ##########################################

configure fi · line 5938

Quoted 10 lines
configure +5 -0
 # check for slirp
 
+# linux-user doesn't need slirp
+if test -z "$slirp" -a "$softmmu" != "yes" ; then
+    slirp="no"
+fi
+
 case "$slirp" in
   "" | yes)
     if $pkg_config slirp; then

I've updated the comments according to Philippe's comments and applied it to my linux-user branch.

Thanks,
Laurent