Skip to contentSkip to conversation

configure: re-add current options in config-host.mak

PATCH In review Michael S. Tsirkin 6 participants 8 messages Nov 24, 2013 – Nov 26, 2013

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 configure: re-add current options in config-host.mak

commit bdf523e6923f1e667055e947e71fc600549cefae
"configure: Add config.status to recreate the current configuration"
moved current configure flags to config.status

This makes sense, but this makes it harder to bisect problems that trigger with a specific set of flags only, since old configure is not smart enough to find them there.

Simply add the options as a comment in the format
old configure expected - they are then ignored by the new configure.

---
 configure | 1 +
 1 file changed, 1 insertion(+)
configure +1 -0
index 508f6a5..f6d5ccd 100755
@@ -3797,6 +3797,7 @@ config_host_mak="config-host.mak"
 echo "# Automatically generated by configure - do not modify" >config-all-disas.mak
 
 echo "# Automatically generated by configure - do not modify" > $config_host_mak
+sed -n -e 's/exec/# Configured with:/p' config.status >> $config_host_mak
 echo >> $config_host_mak
 
 echo all: >> $config_host_mak
Signature · 1 line
MST
#1 lore raw

Am 24.11.2013 10:37, schrieb Michael S. Tsirkin:

Quoted 23 lines

commit bdf523e6923f1e667055e947e71fc600549cefae
"configure: Add config.status to recreate the current configuration"
moved current configure flags to config.status

This makes sense, but this makes it harder to bisect problems that trigger with a specific set of flags only, since old configure is not smart enough to find them there.

Simply add the options as a comment in the format
old configure expected - they are then ignored by the new configure.

---
 configure | 1 +
 1 file changed, 1 insertion(+)
configure +0 -0
index 508f6a5..f6d5ccd 100755

configure config_host_mak="config-host.mak" · line 3803

Quoted 7 lines
configure +1 -0
@@ -3797,6 +3797,7 @@ config_host_mak="config-host.mak"
 echo "# Automatically generated by configure - do not modify" >config-all-disas.mak
 
 echo "# Automatically generated by configure - do not modify" > $config_host_mak
+sed -n -e 's/exec/# Configured with:/p' config.status >> $config_host_mak
 echo >> $config_host_mak
 
 echo all: >> $config_host_mak

Do we really need this? It only makes git bisect iterations from versions after 2013-11-19 to versions before that date easier. If a typical git bisect needs 10 steps, then in the worst cast 5 of them won't automatically run configure. This is normally not a big problem because there is already a configuration, and many changes of file configure don't change that configuration.

It's always possible to run configure explicitly at each step of the bisection process, so in case of doubt there is an easy fall-back solution. Before I introduced automatic reconfiguration, calling configure + make was normal for git bisect.

I'd prefer to avoid code like this patch which is only marginally useful in a very specific development use case. People who can run git bisect will be able to help themselves if they really get a problem without the patch.

Regards,
Stefan

Acked-by
#2 lore raw

Il 24/11/2013 12:04, Stefan Weil ha scritto:

Quoted 12 lines

Do we really need this? It only makes git bisect iterations from versions after 2013-11-19 to versions before that date easier. If a typical git bisect needs 10 steps, then in the worst cast 5 of them won't automatically run configure. This is normally not a big problem because there is already a configuration, and many changes of file configure don't change that configuration.

It's always possible to run configure explicitly at each step of the bisection process, so in case of doubt there is an easy fall-back solution. Before I introduced automatic reconfiguration, calling configure + make was normal for git bisect.

Quoted 4 lines

I'd prefer to avoid code like this patch which is only marginally useful in a very specific development use case. People who can run git bisect will be able to help themselves if they really get a problem without the patch.

I think anything that makes it easier for users to do bisections instead of us, and anything that makes it easier to script bisections ("git bisect run"), is valuable.

Thanks Michael, patch

for 1.7 too.

Paolo

#3 lore raw
Quoted 3 lines · Paolo Bonzini

I think anything that makes it easier for users to do bisections instead of us, and anything that makes it easier to script bisections ("git bisect run"), is valuable.

Personally I've taken to doing bisections with a complete "blow away build tree and start from scratch" process because it's more reliable...

-- PMM

#6 lore raw
In reply to Paolo Bonzini
Quoted 22 lines · Paolo Bonzini

Il 24/11/2013 12:04, Stefan Weil ha scritto:

Quoted 12 lines

Do we really need this? It only makes git bisect iterations from versions after 2013-11-19 to versions before that date easier. If a typical git bisect needs 10 steps, then in the worst cast 5 of them won't automatically run configure. This is normally not a big problem because there is already a configuration, and many changes of file configure don't change that configuration.

It's always possible to run configure explicitly at each step of the bisection process, so in case of doubt there is an easy fall-back solution. Before I introduced automatic reconfiguration, calling configure + make was normal for git bisect.

Quoted 4 lines

I'd prefer to avoid code like this patch which is only marginally useful in a very specific development use case. People who can run git bisect will be able to help themselves if they really get a problem without the patch.

I think anything that makes it easier for users to do bisections instead of us, and anything that makes it easier to script bisections ("git bisect run"), is valuable.

Quoted 7 lines

Thanks Michael, patch

for 1.7 too.

Paolo

IMHO it's helpful but it's too late for controversial patches now. So I won't push this to Anthony unless Stefan reconsiders and acks.

Signature · 1 line
MST
#4 lore raw
In reply to Peter Maydell
Quoted 8 lines · Peter Maydell
Quoted 3 lines · Paolo Bonzini

I think anything that makes it easier for users to do bisections instead of us, and anything that makes it easier to script bisections ("git bisect run"), is valuable.

Personally I've taken to doing bisections with a complete "blow away build tree and start from scratch" process because it's more reliable...

ccache speeds that up quite nicely :)

Acked-by
#7 lore raw
In reply to Michael S. Tsirkin

Am 25.11.2013 12:37, schrieb Michael S. Tsirkin:

Quoted 24 lines · Paolo Bonzini
Quoted 23 lines

Il 24/11/2013 12:04, Stefan Weil ha scritto:

Quoted 12 lines

Do we really need this? It only makes git bisect iterations from versions after 2013-11-19 to versions before that date easier. If a typical git bisect needs 10 steps, then in the worst cast 5 of them won't automatically run configure. This is normally not a big problem because there is already a configuration, and many changes of file configure don't change that configuration.

It's always possible to run configure explicitly at each step of the bisection process, so in case of doubt there is an easy fall-back solution. Before I introduced automatic reconfiguration, calling configure + make was normal for git bisect.

Quoted 4 lines

I'd prefer to avoid code like this patch which is only marginally useful in a very specific development use case. People who can run git bisect will be able to help themselves if they really get a problem without the patch.

I think anything that makes it easier for users to do bisections instead of us, and anything that makes it easier to script bisections ("git bisect run"), is valuable.

Thanks Michael, patch

Quoted 7 lines
Quoted 5 lines

for 1.7 too.

Paolo

IMHO it's helpful but it's too late for controversial patches now. So I won't push this to Anthony unless Stefan reconsiders and acks.

If it helps you and Paolo (and maybe others), I don't mind if you push the patch. Technically it looks fine, therefore

Let me just add some information from my personal experience with git bisect.

I don't run "git bisect" on QEMU very often - maybe once per month. "git bisect run" was never a feasible option because in most cases I had to inspect the output on QEMU's framebuffer. Nearly all bisections needed manual intervention, either because the configure options changed (removal of audio options), code was broken or for other reasons. On each step I try an incremental build first, if that fails, a clean build follows (I build always out of tree, so it's easy to really clean everything).

Cheers,
Stefan

#5 lore raw
In reply to Markus Armbruster
Quoted 7 lines · Markus Armbruster
Quoted 5 lines · Peter Maydell
Quoted 3 lines · Paolo Bonzini

I think anything that makes it easier for users to do bisections instead of us, and anything that makes it easier to script bisections ("git bisect run"), is valuable.

Quoted 6 lines
Quoted 3 lines

Personally I've taken to doing bisections with a complete "blow away build tree and start from scratch" process because it's more reliable...

ccache speeds that up quite nicely :)

This is fantastic! Thanks for the tip.

Fam