]> ruderich.org/simon Gitweb - blhc/blhc.git/blobdiff - bin/blhc
Support filenames which contain "~".
[blhc/blhc.git] / bin / blhc
index 20ccb5c9a9c0b423e9a638f205e20820625a13cf..03e8ebfb8b90da4f1472619c05ef7c756aa304be 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,10 +336,10 @@ 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