Updated CROSS_SUFFIX regex to work with CC containing arguments
authorPaul MUSTIÈRE <paul.mustiere@gmail.com>
Wed, 14 Sep 2016 18:42:22 +0000 (11:42 -0700)
committerPaul MUSTIÈRE <paul.mustiere@gmail.com>
Wed, 14 Sep 2016 18:42:22 +0000 (11:42 -0700)
c_check

diff --git a/c_check b/c_check
index 2ec9fc4..371dbf6 100644 (file)
--- a/c_check
+++ b/c_check
@@ -34,7 +34,7 @@ if (dirname($compiler_name) ne ".") {
     $cross_suffix .= dirname($compiler_name) . "/";
 }
 
-if (basename($compiler_name) =~ /(.*-)(.*)/) {
+if (basename($compiler_name) =~ /([^\s]*-)(.*)/) {
     $cross_suffix .= $1;
 }