qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Stefan Hajnoczi <stefanha@gmail.com>
To: Paolo Bonzini <pbonzini@redhat.com>
Cc: qemu-trivial@nongnu.org, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [Qemu-trivial] [PATCH 4/4] fix compilation when reconfiguring without dtrace backend
Date: Mon, 9 May 2011 09:34:29 +0100	[thread overview]
Message-ID: <BANLkTinvh3YJMqJJG9mm27MSYShyBDeZtg@mail.gmail.com> (raw)
In-Reply-To: <4DC78F5D.7080505@redhat.com>

On Mon, May 9, 2011 at 7:53 AM, Paolo Bonzini <pbonzini@redhat.com> wrote:
> On 05/08/2011 01:15 PM, Stefan Hajnoczi wrote:
>>
>> I think the real problem is that dependencies need to be regenerated
>> after ./configure?
>
> There are three ways to do that, the trivial but wrong one, and the correct
> but overzealous one:
>
> - delete .d files.  This forces regeneration of dependencies, but if you do
> not correspondingly delete .o files, you will likely have an incomplete
> build (possibly _nothing_ will be built).
>
> - delete .d and .o files.  This forces regeneration of dependencies and
> recompilation.  True, a lot of distros are using ccache nowadays, but still
> this will cause a complete walk of all directories to pass those files to
> ccache and relink the executables.  It will likely take a minute or three.

The .o files should depend on GENERATED_HEADERS (especially
config-host.h) and therefore be rebuilt by make when ./configure
outputs a new configuration.  If the configuration is identical an
unnecessary rebuild is triggered but this can be mitigated using
ccache like you say.

So I think just deleting .d files is enough.  BTW the Makefiles don't
seem to have a step before compilation to generate all the
dependencies, instead dependencies only kick in after the first build
has completed?

> - detect changes in the configuration and, if those happen, delete .d and .o
> files.  This is the correct one, and for one what the Linux kernel makefiles
> do, but also the biggest effort to implement.

Is there some smart change detection you are thinking about or just
something like keeping the old copy of config-host.h and friends to
see if they have changed?

Stefan

  reply	other threads:[~2011-05-09  8:34 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-05-02  7:54 [Qemu-devel] [PATCH 4/4] fix compilation when reconfiguring without dtrace backend Paolo Bonzini
2011-05-08 11:15 ` [Qemu-devel] [Qemu-trivial] " Stefan Hajnoczi
2011-05-09  6:53   ` Paolo Bonzini
2011-05-09  8:34     ` Stefan Hajnoczi [this message]
2011-05-09  8:42       ` Paolo Bonzini
2011-05-09  9:06         ` Stefan Hajnoczi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=BANLkTinvh3YJMqJJG9mm27MSYShyBDeZtg@mail.gmail.com \
    --to=stefanha@gmail.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-trivial@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).