* [PATCH 08/10] cgcc: use only the cc command to determine $gcc_base_dir
@ 2014-08-04 18:39 Ramsay Jones
0 siblings, 0 replies; only message in thread
From: Ramsay Jones @ 2014-08-04 18:39 UTC (permalink / raw)
To: Christopher Li; +Cc: Sparse Mailing-list
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
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2014-08-04 18:47 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-08-04 18:39 [PATCH 08/10] cgcc: use only the cc command to determine $gcc_base_dir Ramsay Jones
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.