Skip to contentSkip to conversation

configure: Disable slirp if --disable-system

PATCH In review Richard Henderson 4 participants 7 messages May 10, 2019 – May 15, 2019

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 configure: Disable slirp if --disable-system

For linux-user, there is no need to add slirp to the set of git modules checked out, nor build it.

This also avoids a makefile bug wrt insufficient dependencies on subdir-slirp. If slirp/ is not initially present, the dependencies that check it out are associated with softmmu, which then generates a build error on slirp/ not present.

---
 configure | 4 ++++
 1 file changed, 4 insertions(+)
configure +4 -0
index 63f312bd1f..9de7e43a80 100755
@@ -5878,6 +5878,10 @@ fi
 ##########################################
 # check for slirp
 
+if test "$softmmu" = "no"; then
+    slirp=no
+fi
+
 case "$slirp" in
   "" | yes)
     if $pkg_config slirp; then
Signature · 1 line
2.17.1
#1 lore raw
Quoted 18 lines · Richard Henderson

For linux-user, there is no need to add slirp to the set of git modules checked out, nor build it.

This also avoids a makefile bug wrt insufficient dependencies on subdir-slirp. If slirp/ is not initially present, the dependencies that check it out are associated with softmmu, which then generates a build error on slirp/ not present.

---
 configure | 4 ++++
 1 file changed, 4 insertions(+)
configure +0 -0
index 63f312bd1f..9de7e43a80 100755

configure fi · line 5883

Quoted 6 lines
configure +3 -0
@@ -5878,6 +5878,10 @@ fi
 ##########################################
 # check for slirp
 
+if test "$softmmu" = "no"; then
+    slirp=no
+fi

Maybe also check that the user did not try to run configure with both, --disable-system and --enable-slirp? I.e. that $slirp != "yes" ?

Thomas

#2 lore raw
In reply to Richard Henderson
Quoted 9 lines · Richard Henderson

For linux-user, there is no need to add slirp to the set of git modules checked out, nor build it.

This also avoids a makefile bug wrt insufficient dependencies on subdir-slirp. If slirp/ is not initially present, the dependencies that check it out are associated with softmmu, which then generates a build error on slirp/ not present.

Hi,

Does this work if only user mode targets are specified via ˊ--target-listˊ switch? If no, the patch shoud be amended. If yes, the commit message should be extended.

Thanks,
Aleksandar

Quoted 24 lines
---
 configure | 4 ++++
 1 file changed, 4 insertions(+)
configure +4 -1
index 63f312bd1f..9de7e43a80 100755
@@ -5878,6 +5878,10 @@ fi
 ##########################################
 # check for slirp
 
+if test "$softmmu" = "no"; then
+    slirp=no
+fi
+
 case "$slirp" in
   "" | yes)
     if $pkg_config slirp; then
--

2.17.1

#3 lore raw
Quoted 13 lines · Aleksandar Markovic
Quoted 9 lines · On May 10, 2019 10:36 PM, "Richard Henderson" <[email protected]…

For linux-user, there is no need to add slirp to the set of git modules checked out, nor build it.

This also avoids a makefile bug wrt insufficient dependencies on subdir-slirp.  If slirp/ is not initially present, the dependencies that check it out are associated with softmmu, which then generates a build error on slirp/ not present.

Quoted 4 lines

Hi,

Does this work if only user mode targets are specified via ˊ--target-listˊ switch?

Yes. There is a bit of code that converts such a target list to the same result as --disable-system, which is $softmmu = no.

Quoted 2 lines

If no, the patch shoud be amended. If yes, the commit message should be extended.

Like what? I think it's pretty clear as is.

r~

#4 lore raw
Quoted 4 lines · Richard Henderson
Quoted 2 lines · Aleksandar Markovic

On May 10, 2019 10:36 PM, "Richard Henderson" <

[email protected]

Quoted 11 lines
Quoted 11 lines
Quoted 9 lines · <mailto:[email protected]>> wrote:

For linux-user, there is no need to add slirp to the set of git modules checked out, nor build it.

This also avoids a makefile bug wrt insufficient dependencies on subdir-slirp. If slirp/ is not initially present, the dependencies that check it out are associated with softmmu, which then generates a build error on slirp/ not present.

Quoted 3 lines
Quoted 3 lines

Hi,

Does this work if only user mode targets are specified via

ˊ--target-listˊ

Quoted 10 lines
Quoted 1 line

switch?

Yes. There is a bit of code that converts such a target list to the same result as --disable-system, which is $softmmu = no.

Quoted 2 lines

If no, the patch shoud be amended. If yes, the commit message should be extended.

Like what? I think it's pretty clear as is.

Richard, no. In this case, there is a glaring discrepancy between the title and the functionality that the change provides. Much better title would be “configure: Disable slirp if no system mode target is selected”.

I leave it to you to find out what can be improved in the commit message.

How well did you test your change? Did you try some corner cases?

I don't have concerns about the wording of the commit message only. I agree with Thomas that combination of “no system mode target is selected” and “--enable-slirp is used” must have some special handing. We can't just leave the rest of the script to do whatever the current code happens to do. The patch code should be completed.

Thanks,
Aleksandar

Quoted 2 lines

r~

#5 lore raw
Quoted 8 lines · Aleksandar Markovic
Quoted 5 lines · Richard Henderson
Quoted 2 lines · Aleksandar Markovic

If no, the patch shoud be amended. If yes, the commit message should be extended.

Quoted 8 lines
Quoted 2 lines

Like what? I think it's pretty clear as is.

Richard, no. In this case, there is a glaring discrepancy between the title and the functionality that the change provides. Much better title would be “configure: Disable slirp if no system mode target is selected”.

I leave it to you to find out what can be improved in the commit message.

Aleksandar: I think this is not really a very productive stance to take. Richard thinks the commit message is reasonable. If you have something you would like him to change, I think we will reach a useful endpoint much more quickly and smoothly if you suggest some new text, rather than effectively saying "you need to think of something, and I'm going to keep making you rewrite it until you telepathically figure out what the text I wanted you to write is".

thanks
-- PMM

#6 lore raw
Quoted 5 lines · Peter Maydell
Quoted 2 lines · Aleksandar Markovic

On May 13, 2019 11:14 PM, "Richard Henderson" <

[email protected]>

Quoted 4 lines
Quoted 4 lines
Quoted 3 lines · wrote:
Quoted 1 line · Aleksandar Markovic

If no, the patch shoud be amended. If yes, the commit message

should be

Quoted 6 lines
Quoted 6 lines
Quoted 4 lines
Quoted 1 line

extended.

Like what? I think it's pretty clear as is.

Richard, no. In this case, there is a glaring discrepancy between the

title

Quoted 1 line
Quoted 1 line

and the functionality that the change provides. Much better title would

be

Quoted 3 lines
Quoted 3 lines

“configure: Disable slirp if no system mode target is selected”.

I leave it to you to find out what can be improved in the commit

message.

Quoted 9 lines

Aleksandar: I think this is not really a very productive stance to take. Richard thinks the commit message is reasonable. If you have something you would like him to change, I think we will reach a useful endpoint much more quickly and smoothly if you suggest some new text, rather than effectively saying "you need to think of something, and I'm going to keep making you rewrite it until you telepathically figure out what the text I wanted you to write is".

OK, Peter, no problem from my side. I was trying to make Richard think more about what he writes in his commit messages, and how he organizes his code. Sorry if this looked unproductive or even perhaps offensive.

Yours,
Aleksadar

Quoted 2 lines

thanks
-- PMM