]> ruderich.org/simon Gitweb - blhc/blhc.git/blobdiff - bin/blhc
Improve compiler regex to be more compatible.
[blhc/blhc.git] / bin / blhc
index 527a09866e59214cdb620e007c8f74796e94084b..a29313dfffb97dc2bee2b74f9c9f8e729f045ac6 100755 (executable)
--- a/bin/blhc
+++ b/bin/blhc
@@ -30,7 +30,9 @@ our $VERSION = '0.01';
 # CONSTANTS/VARIABLES
 
 # Regex to catch compiler commands.
-my $cc_regex = qr/(?:x86_64-linux-gnu-)?(?:(?<!\.)cc|gcc|g\+\+|c\+\+)(?:-[\d.]+)?/;
+my $cc_regex = qr/(?:[a-z0-9_]+-(?:linux|kfreebsd)-gnu(?:eabi|eabihf)?-)?
+                  (?:(?<!\.)cc|gcc|g\+\+|c\+\+)
+                  (?:-[\d.]+)?/x;
 # Regex to catch (GCC) compiler warnings.
 my $warning_regex = qr/^(.+?):([0-9]+):[0-9]+: warning: (.+?) \[(.+?)\]$/;