summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
0261fdd)
If there's no "normal" compiler command before or after CC=gcc, skip the
line.
(?:[a-z0-9_]+-(?:linux-|kfreebsd-)?gnu(?:eabi|eabihf)?-)?
$cc_regex
/x;
(?:[a-z0-9_]+-(?:linux-|kfreebsd-)?gnu(?:eabi|eabihf)?-)?
$cc_regex
/x;
+# Regex to check if a line contains a compiler command.
+my $cc_regex_normal = qr/
+ \b$cc_regex(?:\s|\\)
+ /x;
# Regex to catch (GCC) compiler warnings.
my $warning_regex = qr/^(.+?):(\d+):\d+: warning: (.+?) \[(.+?)\]$/;
# Regex to catch (GCC) compiler warnings.
my $warning_regex = qr/^(.+?):(\d+):\d+: warning: (.+?) \[(.+?)\]$/;
# Ignore lines with no compiler commands.
next if not $non_verbose
# Ignore lines with no compiler commands.
next if not $non_verbose
- and not $line =~ /\b$cc_regex(?:\s|\\)/o;
+ and not $line =~ /$cc_regex_normal/o;
# Ignore lines with no filenames with extensions. May miss some
# non-verbose builds (e.g. "gcc -o test" [sic!]), but shouldn't be
# a problem as the log will most likely contain other non-verbose
# Ignore lines with no filenames with extensions. May miss some
# non-verbose builds (e.g. "gcc -o test" [sic!]), but shouldn't be
# a problem as the log will most likely contain other non-verbose
\s.+\s
-I/usr/share/qt4/mkspecs/[a-z]+-g\++(?:-64)?
\s}x;
\s.+\s
-I/usr/share/qt4/mkspecs/[a-z]+-g\++(?:-64)?
\s}x;
+ # Ignore false positives when the line contains only CC=gcc but no
+ # other gcc command.
+ if ($line =~ /(.*)CC=$cc_regex_full(.*)/o) {
+ my $before = $1;
+ my $after = $2;
+ next if not $before =~ /$cc_regex_normal/o
+ and not $after =~ /$cc_regex_normal/o;
+ }
# Check if additional hardening options were used. Used to ensure
# they are used for the complete build.
# Check if additional hardening options were used. Used to ensure
# they are used for the complete build.
# Some false positives.
swig -Wall -c++ -python test.i
# Some false positives.
swig -Wall -c++ -python test.i
+
++ CC=gcc CFLAGS=-g -O2 ... sh ../../build.sh -r -c lto