Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Simon Marchi <simon.marchi@polymtl.ca>
To: Pedro Alves <palves@redhat.com>
Cc: Simon Marchi <simon.marchi@ericsson.com>, gdb-patches@sourceware.org
Subject: Re: [PATCH v2] gdbserver: Suffix generated C files with -generated
Date: Fri, 31 Mar 2017 19:39:00 -0000	[thread overview]
Message-ID: <4de294ed1d439274043f4fdb02689664@polymtl.ca> (raw)
In-Reply-To: <10b63a1c35681aac4f5683f16549ec60@polymtl.ca>

On 2017-03-31 14:46, Simon Marchi wrote:
> Note that when updating past this commit and rebuilding, or in general
> hopping back and forth between branches that have this commit and
> branches that don't and rebuilding, you may stumble on errors like:
> 
>   make: *** No rule to make target `version.c', needed by `version.o'.  
> Stop.
> 
> It's the same issue some people had when environ.c was moved to
> common/environ.c, and it will happen every time we move a source file.
>  The reason is the leftover dependency file in .deps, containing
> something like:
> 
>   version.o: version.c
> 
> These files are automatically generated by gcc and state all the files
> that went into creating version.o during the last build.  That rule
> states that version.c should exist when for version.o to be built, and
> that version.o should be rebuilt if version.c is more recent.  But
> version.c was moved and no longer exists, hence the error.
> 
> One thing I see we could do to mitigate the problem is clear the .deps
> directory when doing a "make clean".  After all, when doing a clean,
> all objects are deleted and are going to be rebuilt, so we don't care
> about the dependencies anymore.  So if somebody stumbles on that
> problem, there's a chance they'll try to clean and build again, which
> would fix the problem.
> 
> Do you have any better idea?
> 
> Simon

Huh, I've just noticed that gdb does this already:

   rm -f $(DEPDIR)/*

which translates to:

   rm -f .deps/*

So I guess it'd make sense to do it as well in gdbserver.


  reply	other threads:[~2017-03-31 19:39 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-30  3:14 [PATCH] " Simon Marchi
2017-03-30  3:31 ` Simon Marchi
2017-03-31 12:24   ` Pedro Alves
2017-03-31 13:35     ` Simon Marchi
2017-03-31 14:56     ` [PATCH v2] " Simon Marchi
2017-03-31 15:13       ` Pedro Alves
     [not found]         ` <3038cd35b397eeafa1f8f0447630fa8e@polymtl.ca>
2017-03-31 18:46           ` Simon Marchi
2017-03-31 19:39             ` Simon Marchi [this message]
2017-04-04 10:44               ` Pedro Alves
2017-04-04 14:52                 ` [PATCH pushed] gdbserver: Clear .deps on clean Simon Marchi

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=4de294ed1d439274043f4fdb02689664@polymtl.ca \
    --to=simon.marchi@polymtl.ca \
    --cc=gdb-patches@sourceware.org \
    --cc=palves@redhat.com \
    --cc=simon.marchi@ericsson.com \
    /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