From: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
To: Christopher Li <sparse@chrisli.org>
Cc: Sparse Mailing-list <linux-sparse@vger.kernel.org>
Subject: [PATCH 08/10] cgcc: use only the cc command to determine $gcc_base_dir
Date: Mon, 04 Aug 2014 19:39:55 +0100 [thread overview]
Message-ID: <53DFD37B.4010104@ramsay1.demon.co.uk> (raw)
Capture the c-compiler command, in the $ccom variable, in order to
later invoke the compiler without extraneous command-line options.
In particular, use the $ccom variable in order to cleanly invoke the
compiler when setting the $gcc_base_dir variable.
Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
---
cgcc | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/cgcc b/cgcc
index ed35e39..f330116 100755
--- a/cgcc
+++ b/cgcc
@@ -3,6 +3,7 @@
my $cc = $ENV{'REAL_CC'} || 'cc';
my $check = $ENV{'CHECK'} || 'sparse';
+my $ccom = $cc;
my $m32 = 0;
my $m64 = 0;
@@ -72,7 +73,7 @@ if ($do_check) {
$check .= &add_specs ('host_os_specs');
}
- $gcc_base_dir = qx($cc -print-file-name=) if !$gcc_base_dir;
+ $gcc_base_dir = qx($ccom -print-file-name=) if !$gcc_base_dir;
chomp($gcc_base_dir); # possibly remove '\n' from compiler
$check .= " -gcc-base-dir " . $gcc_base_dir if $gcc_base_dir;
--
2.0.0
reply other threads:[~2014-08-04 18:47 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=53DFD37B.4010104@ramsay1.demon.co.uk \
--to=ramsay@ramsay1.demon.co.uk \
--cc=linux-sparse@vger.kernel.org \
--cc=sparse@chrisli.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.