]> ruderich.org/simon Gitweb - blhc/blhc.git/blobdiff - bin/blhc
Fix typo in linker command regex.
[blhc/blhc.git] / bin / blhc
index 20ccb5c9a9c0b423e9a638f205e20820625a13cf..ea8291fe7caad3221b33d791e37d1fb807d40e3f 100755 (executable)
--- a/bin/blhc
+++ b/bin/blhc
@@ -153,7 +153,7 @@ sub is_non_verbose_build {
 # CONSTANTS/VARIABLES
 
 # Regex to catch compiler commands.
-my $cc_regex = qr/(?:(?<!\.)cc|(?:x86_64-linux-gnu-)?gcc|g\+\+|c\+\+)/;
+my $cc_regex = qr/(?:x86_64-linux-gnu-)?(?:(?<!\.)cc|gcc|g\+\+|c\+\+)(?:-[\d.]+)?/;
 # Regex to catch (GCC) compiler warnings.
 my $warning_regex = qr/^(.+?):([0-9]+):[0-9]+: warning: (.+?) \[(.+?)\]$/;
 
@@ -336,13 +336,13 @@ for (my $i = 0; $i < scalar @input; $i++) {
     my $linker   = 0;
 
     # Linker commands.
-    if ($line =~ m{\s-o                      # -o
-                   [\s\\]*\s+                # possible line continuation
-                   (?:[A-Za-z0-9_/.-]+/)?      # path to file
-                   [A-Za-z0-9_-]+            # binary name (no dots!)
+    if ($line =~ m{\s-o                        # -o
+                   [\s\\]*\s+                  # possible line continuation
+                   (?:[/.A-Za-z0-9~_-]+/)?     # path to file
+                        [A-Za-z0-9~_-]+        # binary name (no dots!)
                    (?:[0-9.]*\.so[0-9.]*[a-z]? # library (including version)
                     |\.la)?
-                   (?:\s|\\|\$)                # end of file name
+                   (?:\s|\\|$)                 # end of file name
                   }x
             or $line =~ /^libtool: link: /
             or $line =~ m{\s*/bin/bash .+?libtool\s+(.+?\s+)?--mode=(re)?link}) {