From: Simon Ruderich Date: Sat, 17 Mar 2012 16:43:48 +0000 (+0100) Subject: Also accept -O3, not only -O2. X-Git-Tag: 0.01~100 X-Git-Url: https://ruderich.org/simon/gitweb/?p=blhc%2Fblhc.git;a=commitdiff_plain;h=d7e5c1de20c3adb24676f405e8930a61c5746759 Also accept -O3, not only -O2. --- diff --git a/bin/blhc b/bin/blhc index d2e5df7..38ca653 100755 --- a/bin/blhc +++ b/bin/blhc @@ -37,7 +37,7 @@ my $warning_regex = qr/^(.+?):([0-9]+):[0-9]+: warning: (.+?) \[(.+?)\]$/; # Expected (hardening) flags. All flags are used as regexps. my @cflags = ( '-g', - '-O2', + '-O(?:2|3)', ); my @cflags_format = ( '-Wformat', @@ -71,6 +71,7 @@ my @ldflags_pie = ( ); # Renaming rules for the output so the regex parts are not visible. my %flag_renames = ( + '-O(?:2|3)' => '-O2', '-Wl,(-z,)?relro' => '-Wl,-z,relro', '-Wl,(-z,)?now' => '-Wl,-z,now', ); diff --git a/t/logs/good b/t/logs/good index 670766f..447ff17 100644 --- a/t/logs/good +++ b/t/logs/good @@ -9,6 +9,7 @@ checking dependency style of gcc... gcc3 gcc -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Wformat-security -Werror=format-security -D_FORTIFY_SOURCE=2 -c test-a.c gcc -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Wformat-security -Werror=format-security -D_FORTIFY_SOURCE=2 -c test-b.c gcc -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Wformat-security -Werror=format-security -D_FORTIFY_SOURCE=2 -c test-c.c +gcc -g -O3 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Wformat-security -Werror=format-security -D_FORTIFY_SOURCE=2 -c test-d.c gcc -Wl,-z,relro -o test test-a.o test-b.o test-c.o -ltest # Compiling and linking in one step must also check CFLAGS/CPPFLAGS.