- Sync architecture specific hardening support with dpkg 1.18.10.
- Fix false positive in "gcc > file" (Debian Bug #828789), reported by Mathieu
Parent.
+- Fix another Ada false positive for format flags (Debian Bug #833939),
+ reported by Nicolas Boulenguez.
Version 0.06
qw( mii ),
);
my @source_no_preprocess_compile_ada = (
+ # Ada source
+ qw( ada ),
# Ada body
qw( adb ),
- # If you add another file, fix use of @source_no_preprocess_compile_ada
- # below (search for $compile_ada).
);
my @source_no_preprocess_compile = (
# C
# Ada
@source_no_preprocess_compile_ada,
);
+my @source_no_preprocess_no_compile_ada = (
+ # Ada specification
+ qw( ads ),
+);
my @source_no_preprocess_no_compile = (
# Assembly
qw( s ),
- # Ada specification
- qw( ads ),
+ # Ada
+ @source_no_preprocess_no_compile_ada,
);
my @source_no_preprocess = (
@source_no_preprocess_compile,
@source_preprocess_compile_cpp,
@source_no_preprocess_compile_cpp,
);
+my %extensions_ada = map { $_ => 1 } (
+ @source_no_preprocess_compile_ada,
+ @source_no_preprocess_no_compile_ada,
+);
my %extensions_object = map { $_ => 1 } (
@object,
);
$compile_cpp = 1;
# Ada needs special CFLAGS, use them if only ada files are compiled.
} elsif ($ada
- and $compile
- and array_equal(\@extensions,
- \@source_no_preprocess_compile_ada)) {
+ and extension_found(\%extensions_ada, @extensions)) {
$compile_ada = 1;
+ $preprocess = 0; # Ada uses no CPPFLAGS
@cflags_backup = @cflags;
@cflags = @cflags_ada;
}
gcc -c -g -O2 test.c
gcc -g -O2 test.c
+
+gcc-6 -c -I./ -I../progs -g -O2 -fPIE -fstack-protector-strong -gnat2005 -gnato -gnatVa -fstack-check -gnatw.I -I- -o /«PKGBUILDDIR»/build/objects/arm_frm.o /«PKGBUILDDIR»/progs/arm_frm.adb
+gcc-6 -c -I./ -I../progs -g -O2 -fPIE -fstack-protector-strong -gnat2005 -gnato -gnatVa -fstack-check -I- -x ada -o /«PKGBUILDDIR»/build/objects/arm_form.o /«PKGBUILDDIR»/progs/arm_form.ada
+
+gcc-6 -c -I./ -I../progs -g -O2 -fPIE -gnat2005 -gnato -gnatVa -fstack-check -gnatw.I -I- -o /«PKGBUILDDIR»/build/objects/arm_frm.o /«PKGBUILDDIR»/progs/arm_frm.adb
+gcc-6 -c -I./ -I../progs -g -O2 -fPIE -gnat2005 -gnato -gnatVa -fstack-check -I- -x ada -o /«PKGBUILDDIR»/build/objects/arm_form.o /«PKGBUILDDIR»/progs/arm_form.ada
gcc -c -g -O2 test.c
gcc -g -O2 test.c
+
+gcc-6 -c -I./ -I../progs -g -O2 -fPIE -fstack-protector-strong -gnat2005 -gnato -gnatVa -fstack-check -gnatw.I -I- -o /«PKGBUILDDIR»/build/objects/arm_frm.o /«PKGBUILDDIR»/progs/arm_frm.adb
+gcc-6 -c -I./ -I../progs -g -O2 -fPIE -fstack-protector-strong -gnat2005 -gnato -gnatVa -fstack-check -I- -x ada -o /«PKGBUILDDIR»/build/objects/arm_form.o /«PKGBUILDDIR»/progs/arm_form.ada
+
+gcc-6 -c -I./ -I../progs -g -O2 -fPIE -gnat2005 -gnato -gnatVa -fstack-check -gnatw.I -I- -o /«PKGBUILDDIR»/build/objects/arm_frm.o /«PKGBUILDDIR»/progs/arm_frm.adb
+gcc-6 -c -I./ -I../progs -g -O2 -fPIE -gnat2005 -gnato -gnatVa -fstack-check -I- -x ada -o /«PKGBUILDDIR»/build/objects/arm_form.o /«PKGBUILDDIR»/progs/arm_form.ada
my $ada = 'CPPFLAGS missing (-D_FORTIFY_SOURCE=2): gcc-4.6 -c -fPIC -g -O2 -fstack-protector-strong -Wformat -Wformat-security -Werror=format-security test.c
LDFLAGS missing (-Wl,-z,relro): /usr/bin/gcc-4.6 -shared -lgnat-4.6 -o libtest.so.2 test-a.o test-b.o test-c.o -Wl,--as-needed
-CFLAGS missing (-fstack-protector-strong -Wformat -Werror=format-security): gcc -c -g -O2 test.c
+CFLAGS missing (-fPIE -fstack-protector-strong -Wformat -Werror=format-security): gcc -c -g -O2 test.c
CPPFLAGS missing (-D_FORTIFY_SOURCE=2): gcc -c -g -O2 test.c
-CFLAGS missing (-fstack-protector-strong -Wformat -Werror=format-security): gcc -g -O2 test.c
+CFLAGS missing (-fPIE -fstack-protector-strong -Wformat -Werror=format-security): gcc -g -O2 test.c
CPPFLAGS missing (-D_FORTIFY_SOURCE=2): gcc -g -O2 test.c
-LDFLAGS missing (-Wl,-z,relro): gcc -g -O2 test.c
+LDFLAGS missing (-fPIE -pie -Wl,-z,relro): gcc -g -O2 test.c
+CFLAGS missing (-fstack-protector-strong): gcc-6 -c -I./ -I../progs -g -O2 -fPIE -gnat2005 -gnato -gnatVa -fstack-check -gnatw.I -I- -o /«PKGBUILDDIR»/build/objects/arm_frm.o /«PKGBUILDDIR»/progs/arm_frm.adb
+CFLAGS missing (-fstack-protector-strong): gcc-6 -c -I./ -I../progs -g -O2 -fPIE -gnat2005 -gnato -gnatVa -fstack-check -I- -x ada -o /«PKGBUILDDIR»/build/objects/arm_form.o /«PKGBUILDDIR»/progs/arm_form.ada
';
is_blhc 'ada', '', 8,
$ada;