# Expected (hardening) flags. All flags are used as regexps.
my @cflags = (
'-g',
- '-O2',
+ '-O(?:2|3)',
);
my @cflags_format = (
'-Wformat',
);
# 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',
);