@ldflags = (@ldflags, @def_ldflags_bindnow);
}
- # Stores normal CFLAGS when @cflags_ada are temporarily used.
- my @cflags_backup;
- # Ada CFLAGS, only set if ada is used.
- my @cflags_ada;
# Ada doesn't support format hardening flags, see #680117 for more
# information. Filter them out if ada is used.
+ my @cflags_backup;
+ my @cflags_noformat;
if ($ada and $harden_format) {
- @cflags_ada = grep {
+ @cflags_noformat = grep {
my $ok = 1;
foreach my $flag (@def_cflags_format) {
$ok = 0 if $_ eq $flag;
}
my $compile_cpp = 0;
- my $compile_ada = 0;
+ my $restore_cflags = 0;
# Assume CXXFLAGS are required when a C++ file is specified in the
# compiler line.
if ($compile
# Ada needs special CFLAGS, use them if only ada files are compiled.
} elsif ($ada
and extension_found(\%extensions_ada, @extensions)) {
- $compile_ada = 1;
+ $restore_cflags = 1;
$preprocess = 0; # Ada uses no CPPFLAGS
@cflags_backup = @cflags;
- @cflags = @cflags_ada;
+ @cflags = @cflags_noformat;
}
if ($option_buildd) {
}
# Restore normal CFLAGS.
- if ($compile_ada) {
+ if ($restore_cflags) {
@cflags = @cflags_backup;
}
}