X-Git-Url: https://ruderich.org/simon/gitweb/?a=blobdiff_plain;f=bin%2Fblhc;h=6fb0f21b491ebbd7b4cb4592ea82416e60bcc64d;hb=b7365f756ee0d81d1d5b7286f09c9dfc5b6fe892;hp=aecc18052b83d5b06526bd492cada20739e07db6;hpb=26504b77eea8eab454c143f50c3a4da4ba63a178;p=blhc%2Fblhc.git diff --git a/bin/blhc b/bin/blhc index aecc180..6fb0f21 100755 --- a/bin/blhc +++ b/bin/blhc @@ -115,6 +115,9 @@ sub pic_pie_conflict { # CONSTANTS/VARIABLES +# Regex to catch compiler commands. +my $cc_regex = qr/((?) { } else { # Ignore lines with no compiler commands. - next if $line !~ /\b(cc|gcc|g\+\+|c\+\+)(\s|\\)/; + next if $line !~ /\b$cc_regex(\s|\\)/; # Ignore false positives. # @@ -286,7 +289,6 @@ foreach my $line (@input) { # Ignore false positives. # # ./configure summary. - my $cc_regex = qr/(cc|(x86_64-linux-gnu-)?gcc|g\+\+|c\+\+)/; next if $line =~ /^\s*(C|c)ompiler[\s.]*:\s+$cc_regex(\s-std=[a-z0-9:+]+)?\s*$/ or $line =~ /^\s*- (CC|CXX)\s*=\s*$cc_regex\s*$/ or $line =~ /^\s*-- Check for working (C|CXX) compiler: /;