]> ruderich.org/simon Gitweb - blhc/blhc.git/blobdiff - bin/blhc
Fix typo in linker command regex.
[blhc/blhc.git] / bin / blhc
index 65334db8de2643a61b40a7d4327f489b61ec4547..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: (.+?) \[(.+?)\]$/;
 
@@ -338,11 +338,11 @@ for (my $i = 0; $i < scalar @input; $i++) {
     # 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!)
+                   (?:[/.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}) {