[PATCH 08/10] cgcc: use only the cc command to determine $gcc_base_dir

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxxxxxxxx>
---
 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
--
To unsubscribe from this list: send the line "unsubscribe linux-sparse" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Newbies FAQ]     [LKML]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Trinity Fuzzer Tool]

  Powered by Linux