linux-sparse.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Alexander Shishkin <alexander.shishckin@gmail.com>
To: sparse development list <linux-sparse@vger.kernel.org>
Cc: Alexander Shishkin <alexander.shishckin@gmail.com>
Subject: [PATCH] don't call sparse when called to generate dependencies
Date: Tue, 26 Aug 2008 00:33:39 +0300	[thread overview]
Message-ID: <1219700019-19627-1-git-send-email-alexander.shishckin@gmail.com> (raw)

I have a situation here when $(CC) is called with -M options with
slighly different set of -I/-D/etc arguments, which causes all sorts of
funny reports from sparse. Also, this increases the overall build time
because every compilation unit if sparsed twice.

Signed-off-by: Alexander Shishkin <alexander.shishckin@gmail.com>
---
 cgcc |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/cgcc b/cgcc
index 4fab530..89adbed 100755
--- a/cgcc
+++ b/cgcc
@@ -7,6 +7,7 @@ my $check = $ENV{'CHECK'} || 'sparse';
 my $m32 = 0;
 my $m64 = 0;
 my $has_specs = 0;
+my $gendeps = 0;
 my $do_check = 0;
 my $do_compile = 1;
 my $verbose = 0;
@@ -22,6 +23,7 @@ foreach (@ARGV) {
 
     $m32 = 1 if /^-m32$/;
     $m64 = 1 if /^-m64$/;
+    $gendeps = 1 if /^-M$/;
 
     if (/^-specs=(.*)$/) {
 	$check .= &add_specs ($1);
@@ -44,6 +46,11 @@ foreach (@ARGV) {
     $check .= $this_arg unless &cc_only_option ($_);
 }
 
+if ($gendeps) {
+    $do_compile = 1;
+    $do_check = 0;
+}
+
 if ($do_check) {
     if (!$has_specs) {
 	$check .= &add_specs ('host_arch_specs');
-- 
1.5.6.3


             reply	other threads:[~2008-08-25 21:33 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-08-25 21:33 Alexander Shishkin [this message]
2008-08-26  7:44 ` [PATCH] don't call sparse when called to generate dependencies Bernd Petrovitsch
2008-08-26  9:19   ` Alexander Shishkin
2008-08-26 10:00     ` Bernd Petrovitsch
2008-08-27  0:43 ` Josh Triplett

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=1219700019-19627-1-git-send-email-alexander.shishckin@gmail.com \
    --to=alexander.shishckin@gmail.com \
    --cc=linux-sparse@vger.kernel.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).