3 # Copyright (C) 2012-2022 Simon Ruderich
5 # This program is free software: you can redistribute it and/or modify
6 # it under the terms of the GNU General Public License as published by
7 # the Free Software Foundation, either version 3 of the License, or
8 # (at your option) any later version.
10 # This program is distributed in the hope that it will be useful,
11 # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 # GNU General Public License for more details.
15 # You should have received a copy of the GNU General Public License
16 # along with this program. If not, see <http://www.gnu.org/licenses/>.
22 use Test::More tests => 246;
26 my ($file, $options, $exit, $expected) = @_;
28 # Multiple files as array references.
29 if (ref $file eq 'ARRAY') {
30 local $" = ' ./t/logs/';
34 $file = "./t/logs/$file" if $file;
35 my $output = `./bin/blhc $options $file 2>&1`;
38 $options = ' '. $options;
40 is $? >> 8, $exit, "$file$options (exit code)";
41 # Perform regex or string match.
42 my $cmd = (ref $expected eq 'Regexp')
45 &$cmd($output, $expected, "$file$options (output)");
49 # Usage, invalid arguments.
52 my $usage = ( $Pod::Usage::VERSION < 1.65 ?
54 blhc [*options*] *<dpkg-buildpackage build log file>..*
59 blhc [options] <dpkg-buildpackage build log file>..
62 is_blhc '', '--invalid', 2,
63 "Unknown option: invalid\n"
69 is_blhc '', '--version', 0,
70 'blhc 0.13 Copyright (C) 2012-2022 Simon Ruderich
72 This program is free software: you can redistribute it and/or modify
73 it under the terms of the GNU General Public License as published by
74 the Free Software Foundation, either version 3 of the License, or
75 (at your option) any later version.
77 This program is distributed in the hope that it will be useful,
78 but WITHOUT ANY WARRANTY; without even the implied warranty of
79 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
80 GNU General Public License for more details.
82 You should have received a copy of the GNU General Public License
83 along with this program. If not, see <http://www.gnu.org/licenses/>.
86 is_blhc '', '--help', 1,
88 blhc \[\*?options\*?\] \*?<dpkg-buildpackage build log file>\.\.\*?
93 is_blhc 'doesnt-exist', '', 2,
94 qr{^No such file: \./t/logs/doesnt-exist at \./bin/blhc line \d+\.$};
97 # No compiler commands found.
99 my $empty = "No compiler commands!\n";
100 is_blhc 'empty', '', 1,
104 # ANSI colored output.
106 is_blhc 'arch-avr32', '--color', 8,
107 "\033[31mCFLAGS missing\033[0m (-fstack-protector-strong)\033[33m:\033[0m gcc -D_FORTIFY_SOURCE=2 -g -O2 -Wformat -Wformat-security -Werror=format-security -Wall -c test.c
111 # Ignore missing compiler flags.
113 is_blhc 'ignore-flag', '--ignore-flag -g', 8,
114 'CFLAGS missing (-O2): gcc -g -fstack-protector-strong -Wformat -Wformat-security -Werror=format-security -D_FORTIFY_SOURCE=2 -c test-c.c
117 is_blhc 'ignore-flag', '--ignore-flag -g --ignore-flag -O2', 0,
120 is_blhc 'ignore-flag-ldflags', '--ignore-flag -fPIE', 0,
123 # Ignore missing compiler flags for specific architectures.
126 is_blhc 'ignore-flag', '--ignore-arch-flag -g', 2,
127 'Value "-g" invalid for option ignore-arch-flag ("arch:flag" expected)'
129 is_blhc 'ignore-flag', '--ignore-arch-flag -g:', 2,
130 'Value "-g:" invalid for option ignore-arch-flag ("arch:flag" expected)'
132 is_blhc 'ignore-flag', '--ignore-arch-flag :amd64', 2,
133 'Value ":amd64" invalid for option ignore-arch-flag ("arch:flag" expected)'
136 # Wrong architecture.
137 is_blhc 'ignore-flag', '--ignore-arch-flag amd64:-g', 8,
138 'CFLAGS missing (-g): gcc -O2 -fstack-protector-strong -Wformat -Wformat-security -Werror=format-security -D_FORTIFY_SOURCE=2 -c test-b.c
139 CFLAGS missing (-O2): gcc -g -fstack-protector-strong -Wformat -Wformat-security -Werror=format-security -D_FORTIFY_SOURCE=2 -c test-c.c
142 is_blhc 'arch-i386', '--ignore-arch-flag i386:-fstack-protector-strong', 8,
143 'LDFLAGS missing (-pie): gcc -fPIE -Wl,-z,relro -Wl,-z,now -o test test.o
145 is_blhc 'arch-i386', '--ignore-arch-flag i386:-pie', 8,
146 'CFLAGS missing (-fstack-protector-strong): gcc -D_FORTIFY_SOURCE=2 -g -O2 -fPIE -Wformat -Wformat-security -Werror=format-security -Wall -c test.c
148 is_blhc 'arch-i386', '--ignore-arch-flag i386:-fstack-protector-strong --ignore-arch-flag i386:-pie', 0,
151 # Wrong architecture.
152 is_blhc 'arch-i386', '--ignore-arch-flag amd64:-fstack-protector-strong', 8,
153 'CFLAGS missing (-fstack-protector-strong): gcc -D_FORTIFY_SOURCE=2 -g -O2 -fPIE -Wformat -Wformat-security -Werror=format-security -Wall -c test.c
154 LDFLAGS missing (-pie): gcc -fPIE -Wl,-z,relro -Wl,-z,now -o test test.o
156 is_blhc 'arch-i386', '--ignore-arch-flag amd64:-pie', 8,
157 'CFLAGS missing (-fstack-protector-strong): gcc -D_FORTIFY_SOURCE=2 -g -O2 -fPIE -Wformat -Wformat-security -Werror=format-security -Wall -c test.c
158 LDFLAGS missing (-pie): gcc -fPIE -Wl,-z,relro -Wl,-z,now -o test test.o
160 is_blhc 'arch-i386', '--ignore-arch-flag amd64:-fstack-protector-strong --ignore-arch-flag amd64:-pie', 8,
161 'CFLAGS missing (-fstack-protector-strong): gcc -D_FORTIFY_SOURCE=2 -g -O2 -fPIE -Wformat -Wformat-security -Werror=format-security -Wall -c test.c
162 LDFLAGS missing (-pie): gcc -fPIE -Wl,-z,relro -Wl,-z,now -o test test.o
165 # Ignore certain lines (through inline command).
167 is_blhc 'ignore-line-inline', '', 8,
168 'CFLAGS missing (-g -O2 -fstack-protector-strong -Wformat -Werror=format-security): ./prepare-script gcc test-a.c test-b.c test-c.c
169 CPPFLAGS missing (-D_FORTIFY_SOURCE=2): ./prepare-script gcc test-a.c test-b.c test-c.c
170 LDFLAGS missing (-Wl,-z,relro): ./prepare-script gcc test-a.c test-b.c test-c.c
173 is_blhc 'ignore-line-inline2', '', 0,
177 # Ignore certain lines.
179 is_blhc 'ignore-line', '--ignore-line "\./prepare-script gcc test-[a-z]\.c"', 8,
180 'CFLAGS missing (-g -O2 -fstack-protector-strong -Wformat -Werror=format-security): ./prepare-script gcc test-a.c test-b.c test-c.c
181 CPPFLAGS missing (-D_FORTIFY_SOURCE=2): ./prepare-script gcc test-a.c test-b.c test-c.c
182 LDFLAGS missing (-Wl,-z,relro): ./prepare-script gcc test-a.c test-b.c test-c.c
185 is_blhc 'ignore-line', '--ignore-line "\./prepare-script gcc test-[a-z]\.c" --ignore-line "\s*\./prepare-script gcc test-[a-z]\.c .+"', 0,
188 # Ignore certain lines for specific architectures.
191 is_blhc 'ignore-line', '--ignore-arch-line .+', 2,
192 'Value ".+" invalid for option ignore-arch-line ("arch:line" expected)'
194 is_blhc 'ignore-line', '--ignore-arch-line .+:', 2,
195 'Value ".+:" invalid for option ignore-arch-line ("arch:line" expected)'
197 is_blhc 'ignore-line', '--ignore-arch-line :amd64', 2,
198 'Value ":amd64" invalid for option ignore-arch-line ("arch:line" expected)'
201 # Wrong architecture.
202 is_blhc 'ignore-line', '--ignore-arch-line "amd64:.+"', 8,
203 'CFLAGS missing (-g -O2 -fstack-protector-strong -Wformat -Werror=format-security): ./prepare-script gcc test-a.c test-b.c test-c.c
204 CPPFLAGS missing (-D_FORTIFY_SOURCE=2): ./prepare-script gcc test-a.c test-b.c test-c.c
205 LDFLAGS missing (-Wl,-z,relro): ./prepare-script gcc test-a.c test-b.c test-c.c
206 CFLAGS missing (-g -O2 -fstack-protector-strong -Wformat -Werror=format-security): ./prepare-script gcc test-a.c
207 CPPFLAGS missing (-D_FORTIFY_SOURCE=2): ./prepare-script gcc test-a.c
208 LDFLAGS missing (-Wl,-z,relro): ./prepare-script gcc test-a.c
209 CFLAGS missing (-g -O2 -fstack-protector-strong -Wformat -Werror=format-security): ./prepare-script gcc test-b.c
210 CPPFLAGS missing (-D_FORTIFY_SOURCE=2): ./prepare-script gcc test-b.c
211 LDFLAGS missing (-Wl,-z,relro): ./prepare-script gcc test-b.c
212 CFLAGS missing (-g -O2 -fstack-protector-strong -Wformat -Werror=format-security): ./prepare-script gcc test-c.c
213 CPPFLAGS missing (-D_FORTIFY_SOURCE=2): ./prepare-script gcc test-c.c
214 LDFLAGS missing (-Wl,-z,relro): ./prepare-script gcc test-c.c
217 # Line regex anchored at beginning/end of the line.
218 is_blhc 'arch-i386', '--ignore-arch-line "i386:-fPIE"', 8,
219 'CFLAGS missing (-fstack-protector-strong): gcc -D_FORTIFY_SOURCE=2 -g -O2 -fPIE -Wformat -Wformat-security -Werror=format-security -Wall -c test.c
220 LDFLAGS missing (-pie): gcc -fPIE -Wl,-z,relro -Wl,-z,now -o test test.o
223 is_blhc 'arch-i386', '--ignore-arch-line "i386:gcc .+ -fPIE .+ test\.c"', 8,
224 'LDFLAGS missing (-pie): gcc -fPIE -Wl,-z,relro -Wl,-z,now -o test test.o
226 is_blhc 'arch-i386', '--ignore-arch-line "i386:gcc .+ -Wl,-z,relro -Wl,-z,now .+"', 8,
227 'CFLAGS missing (-fstack-protector-strong): gcc -D_FORTIFY_SOURCE=2 -g -O2 -fPIE -Wformat -Wformat-security -Werror=format-security -Wall -c test.c
229 is_blhc 'arch-i386', '--ignore-arch-line "i386:gcc .+ -fPIE .+ test\.c" --ignore-arch-line "i386:gcc .+ -Wl,-z,relro -Wl,-z,now .+"', 0,
232 # Wrong architecture.
233 is_blhc 'arch-i386', '--ignore-arch-line "amd64:gcc .+ -fPIE .+ test\.c"', 8,
234 'CFLAGS missing (-fstack-protector-strong): gcc -D_FORTIFY_SOURCE=2 -g -O2 -fPIE -Wformat -Wformat-security -Werror=format-security -Wall -c test.c
235 LDFLAGS missing (-pie): gcc -fPIE -Wl,-z,relro -Wl,-z,now -o test test.o
237 is_blhc 'arch-i386', '--ignore-arch-line "amd64:gcc .+ -Wl,-z,relro -Wl,-z,now .+"', 8,
238 'CFLAGS missing (-fstack-protector-strong): gcc -D_FORTIFY_SOURCE=2 -g -O2 -fPIE -Wformat -Wformat-security -Werror=format-security -Wall -c test.c
239 LDFLAGS missing (-pie): gcc -fPIE -Wl,-z,relro -Wl,-z,now -o test test.o
241 is_blhc 'arch-i386', '--ignore-arch-line "amd64:gcc .+ -fPIE .+ test\.c" --ignore-arch-line "amd64:gcc .+ -Wl,-z,relro -Wl,-z,now .+"', 8,
242 'CFLAGS missing (-fstack-protector-strong): gcc -D_FORTIFY_SOURCE=2 -g -O2 -fPIE -Wformat -Wformat-security -Werror=format-security -Wall -c test.c
243 LDFLAGS missing (-pie): gcc -fPIE -Wl,-z,relro -Wl,-z,now -o test test.o
247 # Correct build logs.
249 is_blhc 'good', '', 0,
251 is_blhc 'good-pie', '', 0,
253 is_blhc 'good-pie', '--pie', 0,
255 is_blhc 'good-bindnow', '', 0,
257 is_blhc 'good-bindnow', '--bindnow', 0,
259 is_blhc 'good-all', '', 0,
261 is_blhc 'good-all', '--all', 0,
263 is_blhc 'good-all', '--pie --bindnow', 0,
266 is_blhc 'good-multiline', '', 0,
268 is_blhc 'good-library', '--all', 0,
272 # Build logs with missing flags.
274 is_blhc 'bad', '', 8,
275 'CFLAGS missing (-fstack-protector-strong -Wformat -Werror=format-security): gcc -g -O2 -c test-a.c
276 CPPFLAGS missing (-D_FORTIFY_SOURCE=2): gcc -g -O2 -c test-a.c
277 CFLAGS missing (-fstack-protector-strong -Wformat -Werror=format-security): gcc -g -O2 -c test-b.c
278 CPPFLAGS missing (-D_FORTIFY_SOURCE=2): gcc -g -O2 -c test-b.c
279 CFLAGS missing (-fstack-protector-strong -Wformat -Werror=format-security): gcc -g -O2 -c test-c.c
280 CPPFLAGS missing (-D_FORTIFY_SOURCE=2): gcc -g -O2 -c test-c.c
281 LDFLAGS missing (-Wl,-z,relro): gcc -o test test-a.o test-b.o test-c.o -ltest
282 CFLAGS missing (-fstack-protector-strong -Wformat -Werror=format-security): x86_64-linux-gnu-gcc -g -O2 -c test-a.c
283 CPPFLAGS missing (-D_FORTIFY_SOURCE=2): x86_64-linux-gnu-gcc -g -O2 -c test-a.c
284 CFLAGS missing (-fstack-protector-strong -Wformat -Werror=format-security): x86_64-linux-gnu-gcc -g -O2 -c test-b.c
285 CPPFLAGS missing (-D_FORTIFY_SOURCE=2): x86_64-linux-gnu-gcc -g -O2 -c test-b.c
286 CFLAGS missing (-fstack-protector-strong -Wformat -Werror=format-security): x86_64-linux-gnu-gcc -g -O2 -c test-c.c
287 CPPFLAGS missing (-D_FORTIFY_SOURCE=2): x86_64-linux-gnu-gcc -g -O2 -c test-c.c
288 LDFLAGS missing (-Wl,-z,relro): x86_64-linux-gnu-gcc -o test test-a.o test-b.o test-c.o -ltest
289 CPPFLAGS missing (-D_FORTIFY_SOURCE=2): g++ -g -O2 -fstack-protector-strong -Wformat -Wformat-security -Werror=format-security -pthread -o ./testProgram ../src/test/testProgram.cpp
290 LDFLAGS missing (-Wl,-z,relro): g++ -g -O2 -fstack-protector-strong -Wformat -Wformat-security -Werror=format-security -pthread -o ./testProgram ../src/test/testProgram.cpp
291 LDFLAGS missing (-Wl,-z,relro): gcc -o test test-a.o test-b.o test-c.a
292 LDFLAGS missing (-Wl,-z,relro): g++ -g -O2 -fstack-protector-strong -Wformat -Werror=format-security ../src/test/objs/test.o -o ../src/test/bin/test
293 CPPFLAGS missing (-D_FORTIFY_SOURCE=2): gcc -c -o test test.S
294 CPPFLAGS missing (-D_FORTIFY_SOURCE=2): gcc -E test.c
295 CFLAGS missing (-g -O2 -fstack-protector-strong -Wformat -Werror=format-security): gcc -S test.c
296 CPPFLAGS missing (-D_FORTIFY_SOURCE=2): gcc -S test.c
297 CFLAGS missing (-g -O2 -fstack-protector-strong -Wformat -Werror=format-security): gcc test.c
298 CPPFLAGS missing (-D_FORTIFY_SOURCE=2): gcc test.c
299 LDFLAGS missing (-Wl,-z,relro): gcc test.c
300 CXXFLAGS missing (-g -O2 -fstack-protector-strong -Wformat -Werror=format-security): gcc -Wl,-z,relro -o test test-.cpp test-b.cpp.o
301 CPPFLAGS missing (-D_FORTIFY_SOURCE=2): gcc -Wl,-z,relro -o test test-.cpp test-b.cpp.o
302 CFLAGS missing (-g -O2 -fstack-protector-strong -Wformat -Werror=format-security): gcc -MD -c test.c
303 CPPFLAGS missing (-D_FORTIFY_SOURCE=2): gcc -MD -c test.c
304 CFLAGS missing (-g -O2 -fstack-protector-strong -Wformat -Werror=format-security): gcc -MT -MD -MF test.d -c test.c
305 CPPFLAGS missing (-D_FORTIFY_SOURCE=2): gcc -MT -MD -MF test.d -c test.c
306 CFLAGS missing (-g -O2 -fstack-protector-strong -Wformat -Werror=format-security): gcc -MMD -c test.c
307 CPPFLAGS missing (-D_FORTIFY_SOURCE=2): gcc -MMD -c test.c
308 CFLAGS missing (-g -O2 -fstack-protector-strong -Wformat -Werror=format-security): gcc -MT -MMD -MF test.d -c test.c
309 CPPFLAGS missing (-D_FORTIFY_SOURCE=2): gcc -MT -MMD -MF test.d -c test.c
311 is_blhc 'bad', '--pie', 8,
312 'CFLAGS missing (-fPIE -fstack-protector-strong -Wformat -Werror=format-security): gcc -g -O2 -c test-a.c
313 CPPFLAGS missing (-D_FORTIFY_SOURCE=2): gcc -g -O2 -c test-a.c
314 CFLAGS missing (-fPIE -fstack-protector-strong -Wformat -Werror=format-security): gcc -g -O2 -c test-b.c
315 CPPFLAGS missing (-D_FORTIFY_SOURCE=2): gcc -g -O2 -c test-b.c
316 CFLAGS missing (-fPIE -fstack-protector-strong -Wformat -Werror=format-security): gcc -g -O2 -c test-c.c
317 CPPFLAGS missing (-D_FORTIFY_SOURCE=2): gcc -g -O2 -c test-c.c
318 LDFLAGS missing (-fPIE -pie -Wl,-z,relro): gcc -o test test-a.o test-b.o test-c.o -ltest
319 CFLAGS missing (-fPIE -fstack-protector-strong -Wformat -Werror=format-security): x86_64-linux-gnu-gcc -g -O2 -c test-a.c
320 CPPFLAGS missing (-D_FORTIFY_SOURCE=2): x86_64-linux-gnu-gcc -g -O2 -c test-a.c
321 CFLAGS missing (-fPIE -fstack-protector-strong -Wformat -Werror=format-security): x86_64-linux-gnu-gcc -g -O2 -c test-b.c
322 CPPFLAGS missing (-D_FORTIFY_SOURCE=2): x86_64-linux-gnu-gcc -g -O2 -c test-b.c
323 CFLAGS missing (-fPIE -fstack-protector-strong -Wformat -Werror=format-security): x86_64-linux-gnu-gcc -g -O2 -c test-c.c
324 CPPFLAGS missing (-D_FORTIFY_SOURCE=2): x86_64-linux-gnu-gcc -g -O2 -c test-c.c
325 LDFLAGS missing (-fPIE -pie -Wl,-z,relro): x86_64-linux-gnu-gcc -o test test-a.o test-b.o test-c.o -ltest
326 CXXFLAGS missing (-fPIE): g++ -g -O2 -fstack-protector-strong -Wformat -Wformat-security -Werror=format-security -pthread -o ./testProgram ../src/test/testProgram.cpp
327 CPPFLAGS missing (-D_FORTIFY_SOURCE=2): g++ -g -O2 -fstack-protector-strong -Wformat -Wformat-security -Werror=format-security -pthread -o ./testProgram ../src/test/testProgram.cpp
328 LDFLAGS missing (-fPIE -pie -Wl,-z,relro): g++ -g -O2 -fstack-protector-strong -Wformat -Wformat-security -Werror=format-security -pthread -o ./testProgram ../src/test/testProgram.cpp
329 LDFLAGS missing (-fPIE -pie): g++ -g -O2 -fstack-protector-strong -Wformat -Wformat-security -Werror=format-security -pthread -Wl,-z,relro -o ../src/test/bin/test ../src/test/objs/test.o
330 LDFLAGS missing (-fPIE -pie -Wl,-z,relro): gcc -o test test-a.o test-b.o test-c.a
331 LDFLAGS missing (-fPIE -pie -Wl,-z,relro): g++ -g -O2 -fstack-protector-strong -Wformat -Werror=format-security ../src/test/objs/test.o -o ../src/test/bin/test
332 CPPFLAGS missing (-D_FORTIFY_SOURCE=2): gcc -c -o test test.S
333 CPPFLAGS missing (-D_FORTIFY_SOURCE=2): gcc -E test.c
334 CFLAGS missing (-g -O2 -fPIE -fstack-protector-strong -Wformat -Werror=format-security): gcc -S test.c
335 CPPFLAGS missing (-D_FORTIFY_SOURCE=2): gcc -S test.c
336 CFLAGS missing (-g -O2 -fPIE -fstack-protector-strong -Wformat -Werror=format-security): gcc test.c
337 CPPFLAGS missing (-D_FORTIFY_SOURCE=2): gcc test.c
338 LDFLAGS missing (-fPIE -pie -Wl,-z,relro): gcc test.c
339 CXXFLAGS missing (-g -O2 -fPIE -fstack-protector-strong -Wformat -Werror=format-security): gcc -Wl,-z,relro -o test test-.cpp test-b.cpp.o
340 CPPFLAGS missing (-D_FORTIFY_SOURCE=2): gcc -Wl,-z,relro -o test test-.cpp test-b.cpp.o
341 LDFLAGS missing (-fPIE -pie): gcc -Wl,-z,relro -o test test-.cpp test-b.cpp.o
342 CFLAGS missing (-g -O2 -fPIE -fstack-protector-strong -Wformat -Werror=format-security): gcc -MD -c test.c
343 CPPFLAGS missing (-D_FORTIFY_SOURCE=2): gcc -MD -c test.c
344 CFLAGS missing (-g -O2 -fPIE -fstack-protector-strong -Wformat -Werror=format-security): gcc -MT -MD -MF test.d -c test.c
345 CPPFLAGS missing (-D_FORTIFY_SOURCE=2): gcc -MT -MD -MF test.d -c test.c
346 CFLAGS missing (-g -O2 -fPIE -fstack-protector-strong -Wformat -Werror=format-security): gcc -MMD -c test.c
347 CPPFLAGS missing (-D_FORTIFY_SOURCE=2): gcc -MMD -c test.c
348 CFLAGS missing (-g -O2 -fPIE -fstack-protector-strong -Wformat -Werror=format-security): gcc -MT -MMD -MF test.d -c test.c
349 CPPFLAGS missing (-D_FORTIFY_SOURCE=2): gcc -MT -MMD -MF test.d -c test.c
351 is_blhc 'bad', '--bindnow', 8,
352 'CFLAGS missing (-fstack-protector-strong -Wformat -Werror=format-security): gcc -g -O2 -c test-a.c
353 CPPFLAGS missing (-D_FORTIFY_SOURCE=2): gcc -g -O2 -c test-a.c
354 CFLAGS missing (-fstack-protector-strong -Wformat -Werror=format-security): gcc -g -O2 -c test-b.c
355 CPPFLAGS missing (-D_FORTIFY_SOURCE=2): gcc -g -O2 -c test-b.c
356 CFLAGS missing (-fstack-protector-strong -Wformat -Werror=format-security): gcc -g -O2 -c test-c.c
357 CPPFLAGS missing (-D_FORTIFY_SOURCE=2): gcc -g -O2 -c test-c.c
358 LDFLAGS missing (-Wl,-z,relro -Wl,-z,now): gcc -o test test-a.o test-b.o test-c.o -ltest
359 CFLAGS missing (-fstack-protector-strong -Wformat -Werror=format-security): x86_64-linux-gnu-gcc -g -O2 -c test-a.c
360 CPPFLAGS missing (-D_FORTIFY_SOURCE=2): x86_64-linux-gnu-gcc -g -O2 -c test-a.c
361 CFLAGS missing (-fstack-protector-strong -Wformat -Werror=format-security): x86_64-linux-gnu-gcc -g -O2 -c test-b.c
362 CPPFLAGS missing (-D_FORTIFY_SOURCE=2): x86_64-linux-gnu-gcc -g -O2 -c test-b.c
363 CFLAGS missing (-fstack-protector-strong -Wformat -Werror=format-security): x86_64-linux-gnu-gcc -g -O2 -c test-c.c
364 CPPFLAGS missing (-D_FORTIFY_SOURCE=2): x86_64-linux-gnu-gcc -g -O2 -c test-c.c
365 LDFLAGS missing (-Wl,-z,relro -Wl,-z,now): x86_64-linux-gnu-gcc -o test test-a.o test-b.o test-c.o -ltest
366 CPPFLAGS missing (-D_FORTIFY_SOURCE=2): g++ -g -O2 -fstack-protector-strong -Wformat -Wformat-security -Werror=format-security -pthread -o ./testProgram ../src/test/testProgram.cpp
367 LDFLAGS missing (-Wl,-z,relro -Wl,-z,now): g++ -g -O2 -fstack-protector-strong -Wformat -Wformat-security -Werror=format-security -pthread -o ./testProgram ../src/test/testProgram.cpp
368 LDFLAGS missing (-Wl,-z,now): g++ -g -O2 -fstack-protector-strong -Wformat -Wformat-security -Werror=format-security -pthread -Wl,-z,relro -o ../src/test/bin/test ../src/test/objs/test.o
369 LDFLAGS missing (-Wl,-z,relro -Wl,-z,now): gcc -o test test-a.o test-b.o test-c.a
370 LDFLAGS missing (-Wl,-z,relro -Wl,-z,now): g++ -g -O2 -fstack-protector-strong -Wformat -Werror=format-security ../src/test/objs/test.o -o ../src/test/bin/test
371 CPPFLAGS missing (-D_FORTIFY_SOURCE=2): gcc -c -o test test.S
372 CPPFLAGS missing (-D_FORTIFY_SOURCE=2): gcc -E test.c
373 CFLAGS missing (-g -O2 -fstack-protector-strong -Wformat -Werror=format-security): gcc -S test.c
374 CPPFLAGS missing (-D_FORTIFY_SOURCE=2): gcc -S test.c
375 CFLAGS missing (-g -O2 -fstack-protector-strong -Wformat -Werror=format-security): gcc test.c
376 CPPFLAGS missing (-D_FORTIFY_SOURCE=2): gcc test.c
377 LDFLAGS missing (-Wl,-z,relro -Wl,-z,now): gcc test.c
378 CXXFLAGS missing (-g -O2 -fstack-protector-strong -Wformat -Werror=format-security): gcc -Wl,-z,relro -o test test-.cpp test-b.cpp.o
379 CPPFLAGS missing (-D_FORTIFY_SOURCE=2): gcc -Wl,-z,relro -o test test-.cpp test-b.cpp.o
380 LDFLAGS missing (-Wl,-z,now): gcc -Wl,-z,relro -o test test-.cpp test-b.cpp.o
381 CFLAGS missing (-g -O2 -fstack-protector-strong -Wformat -Werror=format-security): gcc -MD -c test.c
382 CPPFLAGS missing (-D_FORTIFY_SOURCE=2): gcc -MD -c test.c
383 CFLAGS missing (-g -O2 -fstack-protector-strong -Wformat -Werror=format-security): gcc -MT -MD -MF test.d -c test.c
384 CPPFLAGS missing (-D_FORTIFY_SOURCE=2): gcc -MT -MD -MF test.d -c test.c
385 CFLAGS missing (-g -O2 -fstack-protector-strong -Wformat -Werror=format-security): gcc -MMD -c test.c
386 CPPFLAGS missing (-D_FORTIFY_SOURCE=2): gcc -MMD -c test.c
387 CFLAGS missing (-g -O2 -fstack-protector-strong -Wformat -Werror=format-security): gcc -MT -MMD -MF test.d -c test.c
388 CPPFLAGS missing (-D_FORTIFY_SOURCE=2): gcc -MT -MMD -MF test.d -c test.c
390 my $bad_pie_bindnow =
391 'CFLAGS missing (-fPIE -fstack-protector-strong -Wformat -Werror=format-security): gcc -g -O2 -c test-a.c
392 CPPFLAGS missing (-D_FORTIFY_SOURCE=2): gcc -g -O2 -c test-a.c
393 CFLAGS missing (-fPIE -fstack-protector-strong -Wformat -Werror=format-security): gcc -g -O2 -c test-b.c
394 CPPFLAGS missing (-D_FORTIFY_SOURCE=2): gcc -g -O2 -c test-b.c
395 CFLAGS missing (-fPIE -fstack-protector-strong -Wformat -Werror=format-security): gcc -g -O2 -c test-c.c
396 CPPFLAGS missing (-D_FORTIFY_SOURCE=2): gcc -g -O2 -c test-c.c
397 LDFLAGS missing (-fPIE -pie -Wl,-z,relro -Wl,-z,now): gcc -o test test-a.o test-b.o test-c.o -ltest
398 CFLAGS missing (-fPIE -fstack-protector-strong -Wformat -Werror=format-security): x86_64-linux-gnu-gcc -g -O2 -c test-a.c
399 CPPFLAGS missing (-D_FORTIFY_SOURCE=2): x86_64-linux-gnu-gcc -g -O2 -c test-a.c
400 CFLAGS missing (-fPIE -fstack-protector-strong -Wformat -Werror=format-security): x86_64-linux-gnu-gcc -g -O2 -c test-b.c
401 CPPFLAGS missing (-D_FORTIFY_SOURCE=2): x86_64-linux-gnu-gcc -g -O2 -c test-b.c
402 CFLAGS missing (-fPIE -fstack-protector-strong -Wformat -Werror=format-security): x86_64-linux-gnu-gcc -g -O2 -c test-c.c
403 CPPFLAGS missing (-D_FORTIFY_SOURCE=2): x86_64-linux-gnu-gcc -g -O2 -c test-c.c
404 LDFLAGS missing (-fPIE -pie -Wl,-z,relro -Wl,-z,now): x86_64-linux-gnu-gcc -o test test-a.o test-b.o test-c.o -ltest
405 CXXFLAGS missing (-fPIE): g++ -g -O2 -fstack-protector-strong -Wformat -Wformat-security -Werror=format-security -pthread -o ./testProgram ../src/test/testProgram.cpp
406 CPPFLAGS missing (-D_FORTIFY_SOURCE=2): g++ -g -O2 -fstack-protector-strong -Wformat -Wformat-security -Werror=format-security -pthread -o ./testProgram ../src/test/testProgram.cpp
407 LDFLAGS missing (-fPIE -pie -Wl,-z,relro -Wl,-z,now): g++ -g -O2 -fstack-protector-strong -Wformat -Wformat-security -Werror=format-security -pthread -o ./testProgram ../src/test/testProgram.cpp
408 LDFLAGS missing (-fPIE -pie -Wl,-z,now): g++ -g -O2 -fstack-protector-strong -Wformat -Wformat-security -Werror=format-security -pthread -Wl,-z,relro -o ../src/test/bin/test ../src/test/objs/test.o
409 LDFLAGS missing (-fPIE -pie -Wl,-z,relro -Wl,-z,now): gcc -o test test-a.o test-b.o test-c.a
410 LDFLAGS missing (-fPIE -pie -Wl,-z,relro -Wl,-z,now): g++ -g -O2 -fstack-protector-strong -Wformat -Werror=format-security ../src/test/objs/test.o -o ../src/test/bin/test
411 CPPFLAGS missing (-D_FORTIFY_SOURCE=2): gcc -c -o test test.S
412 CPPFLAGS missing (-D_FORTIFY_SOURCE=2): gcc -E test.c
413 CFLAGS missing (-g -O2 -fPIE -fstack-protector-strong -Wformat -Werror=format-security): gcc -S test.c
414 CPPFLAGS missing (-D_FORTIFY_SOURCE=2): gcc -S test.c
415 CFLAGS missing (-g -O2 -fPIE -fstack-protector-strong -Wformat -Werror=format-security): gcc test.c
416 CPPFLAGS missing (-D_FORTIFY_SOURCE=2): gcc test.c
417 LDFLAGS missing (-fPIE -pie -Wl,-z,relro -Wl,-z,now): gcc test.c
418 CXXFLAGS missing (-g -O2 -fPIE -fstack-protector-strong -Wformat -Werror=format-security): gcc -Wl,-z,relro -o test test-.cpp test-b.cpp.o
419 CPPFLAGS missing (-D_FORTIFY_SOURCE=2): gcc -Wl,-z,relro -o test test-.cpp test-b.cpp.o
420 LDFLAGS missing (-fPIE -pie -Wl,-z,now): gcc -Wl,-z,relro -o test test-.cpp test-b.cpp.o
421 CFLAGS missing (-g -O2 -fPIE -fstack-protector-strong -Wformat -Werror=format-security): gcc -MD -c test.c
422 CPPFLAGS missing (-D_FORTIFY_SOURCE=2): gcc -MD -c test.c
423 CFLAGS missing (-g -O2 -fPIE -fstack-protector-strong -Wformat -Werror=format-security): gcc -MT -MD -MF test.d -c test.c
424 CPPFLAGS missing (-D_FORTIFY_SOURCE=2): gcc -MT -MD -MF test.d -c test.c
425 CFLAGS missing (-g -O2 -fPIE -fstack-protector-strong -Wformat -Werror=format-security): gcc -MMD -c test.c
426 CPPFLAGS missing (-D_FORTIFY_SOURCE=2): gcc -MMD -c test.c
427 CFLAGS missing (-g -O2 -fPIE -fstack-protector-strong -Wformat -Werror=format-security): gcc -MT -MMD -MF test.d -c test.c
428 CPPFLAGS missing (-D_FORTIFY_SOURCE=2): gcc -MT -MMD -MF test.d -c test.c
430 is_blhc 'bad', '--pie --bindnow', 8,
432 is_blhc 'bad', '--all', 8,
435 is_blhc 'bad-cflags', '', 8,
436 'CFLAGS missing (-Wformat): gcc -g -O2 -fstack-protector-strong -Wformat-security -Werror=format-security -D_FORTIFY_SOURCE=2 -c test-a.c
437 CFLAGS missing (-fstack-protector-strong): gcc -g -O2 -Wformat -Wformat-security -Werror=format-security -D_FORTIFY_SOURCE=2 -c test-b.c
438 CFLAGS missing (-Werror=format-security): gcc -g -O2 -fstack-protector-strong -Wformat -Wformat-security -D_FORTIFY_SOURCE=2 -c test-c.c
439 CFLAGS missing (-g -O2 -fstack-protector-strong -Wformat -Werror=format-security): gcc -Wl,-z,relro -o test test.c -ltest
440 CPPFLAGS missing (-D_FORTIFY_SOURCE=2): gcc -Wl,-z,relro -o test test.c -ltest
441 CFLAGS missing (-g -O2 -fstack-protector-strong -Wformat -Werror=format-security): gcc -shared -fPIC -Wl,-z,relro -o test.so test.c -ltest
442 CPPFLAGS missing (-D_FORTIFY_SOURCE=2): gcc -shared -fPIC -Wl,-z,relro -o test.so test.c -ltest
443 CFLAGS missing (-Wformat): gcc -fPIC -g -O2 -fstack-protector-strong -Wformat-security -Werror=format-security -c -D_FORTIFY_SOURCE=2 ../../../../src/test/test.c -o test.so.o
444 CFLAGS missing (-g -O2 -fstack-protector-strong -Wformat -Werror=format-security): gcc test.c -o test.output
445 CPPFLAGS missing (-D_FORTIFY_SOURCE=2): gcc test.c -o test.output
446 LDFLAGS missing (-Wl,-z,relro): gcc test.c -o test.output
447 CFLAGS missing (-g -O2 -fstack-protector-strong -Wformat -Werror=format-security): (gcc -Wl,-z,relro -o test.output test.c)
448 CPPFLAGS missing (-D_FORTIFY_SOURCE=2): (gcc -Wl,-z,relro -o test.output test.c)
449 CFLAGS missing (-g -O2 -fstack-protector-strong -Wformat -Werror=format-security): gcc test-comma.c
450 CPPFLAGS missing (-D_FORTIFY_SOURCE=2): gcc test-comma.c
451 LDFLAGS missing (-Wl,-z,relro): gcc test-comma.c
452 CFLAGS missing (-g -O2 -fstack-protector-strong -Wformat -Werror=format-security): gcc test-and.c
453 CPPFLAGS missing (-D_FORTIFY_SOURCE=2): gcc test-and.c
454 LDFLAGS missing (-Wl,-z,relro): gcc test-and.c
455 CFLAGS missing (-g -O2 -fstack-protector-strong -Wformat -Werror=format-security): gcc test-or.c
456 CPPFLAGS missing (-D_FORTIFY_SOURCE=2): gcc test-or.c
457 LDFLAGS missing (-Wl,-z,relro): gcc test-or.c
459 is_blhc 'bad-cflags', '--pie', 8,
460 'CFLAGS missing (-fPIE -Wformat): gcc -g -O2 -fstack-protector-strong -Wformat-security -Werror=format-security -D_FORTIFY_SOURCE=2 -c test-a.c
461 CFLAGS missing (-fPIE -fstack-protector-strong): gcc -g -O2 -Wformat -Wformat-security -Werror=format-security -D_FORTIFY_SOURCE=2 -c test-b.c
462 CFLAGS missing (-fPIE -Werror=format-security): gcc -g -O2 -fstack-protector-strong -Wformat -Wformat-security -D_FORTIFY_SOURCE=2 -c test-c.c
463 LDFLAGS missing (-fPIE -pie): gcc -Wl,-z,relro -o test test-a.o test-b.o test-c.o -ltest
464 CFLAGS missing (-g -O2 -fPIE -fstack-protector-strong -Wformat -Werror=format-security): gcc -Wl,-z,relro -o test test.c -ltest
465 CPPFLAGS missing (-D_FORTIFY_SOURCE=2): gcc -Wl,-z,relro -o test test.c -ltest
466 LDFLAGS missing (-fPIE -pie): gcc -Wl,-z,relro -o test test.c -ltest
467 CFLAGS missing (-g -O2 -fstack-protector-strong -Wformat -Werror=format-security): gcc -shared -fPIC -Wl,-z,relro -o test.so test.c -ltest
468 CPPFLAGS missing (-D_FORTIFY_SOURCE=2): gcc -shared -fPIC -Wl,-z,relro -o test.so test.c -ltest
469 CFLAGS missing (-Wformat): gcc -fPIC -g -O2 -fstack-protector-strong -Wformat-security -Werror=format-security -c -D_FORTIFY_SOURCE=2 ../../../../src/test/test.c -o test.so.o
470 CFLAGS missing (-g -O2 -fPIE -fstack-protector-strong -Wformat -Werror=format-security): gcc test.c -o test.output
471 CPPFLAGS missing (-D_FORTIFY_SOURCE=2): gcc test.c -o test.output
472 LDFLAGS missing (-fPIE -pie -Wl,-z,relro): gcc test.c -o test.output
473 CFLAGS missing (-g -O2 -fPIE -fstack-protector-strong -Wformat -Werror=format-security): (gcc -Wl,-z,relro -o test.output test.c)
474 CPPFLAGS missing (-D_FORTIFY_SOURCE=2): (gcc -Wl,-z,relro -o test.output test.c)
475 LDFLAGS missing (-fPIE -pie): (gcc -Wl,-z,relro -o test.output test.c)
476 CFLAGS missing (-g -O2 -fPIE -fstack-protector-strong -Wformat -Werror=format-security): gcc test-comma.c
477 CPPFLAGS missing (-D_FORTIFY_SOURCE=2): gcc test-comma.c
478 LDFLAGS missing (-fPIE -pie -Wl,-z,relro): gcc test-comma.c
479 CFLAGS missing (-g -O2 -fPIE -fstack-protector-strong -Wformat -Werror=format-security): gcc test-and.c
480 CPPFLAGS missing (-D_FORTIFY_SOURCE=2): gcc test-and.c
481 LDFLAGS missing (-fPIE -pie -Wl,-z,relro): gcc test-and.c
482 CFLAGS missing (-g -O2 -fPIE -fstack-protector-strong -Wformat -Werror=format-security): gcc test-or.c
483 CPPFLAGS missing (-D_FORTIFY_SOURCE=2): gcc test-or.c
484 LDFLAGS missing (-fPIE -pie -Wl,-z,relro): gcc test-or.c
486 is_blhc 'bad-cflags', '--bindnow', 8,
487 'CFLAGS missing (-Wformat): gcc -g -O2 -fstack-protector-strong -Wformat-security -Werror=format-security -D_FORTIFY_SOURCE=2 -c test-a.c
488 CFLAGS missing (-fstack-protector-strong): gcc -g -O2 -Wformat -Wformat-security -Werror=format-security -D_FORTIFY_SOURCE=2 -c test-b.c
489 CFLAGS missing (-Werror=format-security): gcc -g -O2 -fstack-protector-strong -Wformat -Wformat-security -D_FORTIFY_SOURCE=2 -c test-c.c
490 LDFLAGS missing (-Wl,-z,now): gcc -Wl,-z,relro -o test test-a.o test-b.o test-c.o -ltest
491 CFLAGS missing (-g -O2 -fstack-protector-strong -Wformat -Werror=format-security): gcc -Wl,-z,relro -o test test.c -ltest
492 CPPFLAGS missing (-D_FORTIFY_SOURCE=2): gcc -Wl,-z,relro -o test test.c -ltest
493 LDFLAGS missing (-Wl,-z,now): gcc -Wl,-z,relro -o test test.c -ltest
494 CFLAGS missing (-g -O2 -fstack-protector-strong -Wformat -Werror=format-security): gcc -shared -fPIC -Wl,-z,relro -o test.so test.c -ltest
495 CPPFLAGS missing (-D_FORTIFY_SOURCE=2): gcc -shared -fPIC -Wl,-z,relro -o test.so test.c -ltest
496 LDFLAGS missing (-Wl,-z,now): gcc -shared -fPIC -Wl,-z,relro -o test.so test.c -ltest
497 CFLAGS missing (-Wformat): gcc -fPIC -g -O2 -fstack-protector-strong -Wformat-security -Werror=format-security -c -D_FORTIFY_SOURCE=2 ../../../../src/test/test.c -o test.so.o
498 CFLAGS missing (-g -O2 -fstack-protector-strong -Wformat -Werror=format-security): gcc test.c -o test.output
499 CPPFLAGS missing (-D_FORTIFY_SOURCE=2): gcc test.c -o test.output
500 LDFLAGS missing (-Wl,-z,relro -Wl,-z,now): gcc test.c -o test.output
501 CFLAGS missing (-g -O2 -fstack-protector-strong -Wformat -Werror=format-security): (gcc -Wl,-z,relro -o test.output test.c)
502 CPPFLAGS missing (-D_FORTIFY_SOURCE=2): (gcc -Wl,-z,relro -o test.output test.c)
503 LDFLAGS missing (-Wl,-z,now): (gcc -Wl,-z,relro -o test.output test.c)
504 CFLAGS missing (-g -O2 -fstack-protector-strong -Wformat -Werror=format-security): gcc test-comma.c
505 CPPFLAGS missing (-D_FORTIFY_SOURCE=2): gcc test-comma.c
506 LDFLAGS missing (-Wl,-z,relro -Wl,-z,now): gcc test-comma.c
507 CFLAGS missing (-g -O2 -fstack-protector-strong -Wformat -Werror=format-security): gcc test-and.c
508 CPPFLAGS missing (-D_FORTIFY_SOURCE=2): gcc test-and.c
509 LDFLAGS missing (-Wl,-z,relro -Wl,-z,now): gcc test-and.c
510 CFLAGS missing (-g -O2 -fstack-protector-strong -Wformat -Werror=format-security): gcc test-or.c
511 CPPFLAGS missing (-D_FORTIFY_SOURCE=2): gcc test-or.c
512 LDFLAGS missing (-Wl,-z,relro -Wl,-z,now): gcc test-or.c
514 is_blhc 'bad-cflags', '--pie --bindnow', 8,
515 'CFLAGS missing (-fPIE -Wformat): gcc -g -O2 -fstack-protector-strong -Wformat-security -Werror=format-security -D_FORTIFY_SOURCE=2 -c test-a.c
516 CFLAGS missing (-fPIE -fstack-protector-strong): gcc -g -O2 -Wformat -Wformat-security -Werror=format-security -D_FORTIFY_SOURCE=2 -c test-b.c
517 CFLAGS missing (-fPIE -Werror=format-security): gcc -g -O2 -fstack-protector-strong -Wformat -Wformat-security -D_FORTIFY_SOURCE=2 -c test-c.c
518 LDFLAGS missing (-fPIE -pie -Wl,-z,now): gcc -Wl,-z,relro -o test test-a.o test-b.o test-c.o -ltest
519 CFLAGS missing (-g -O2 -fPIE -fstack-protector-strong -Wformat -Werror=format-security): gcc -Wl,-z,relro -o test test.c -ltest
520 CPPFLAGS missing (-D_FORTIFY_SOURCE=2): gcc -Wl,-z,relro -o test test.c -ltest
521 LDFLAGS missing (-fPIE -pie -Wl,-z,now): gcc -Wl,-z,relro -o test test.c -ltest
522 CFLAGS missing (-g -O2 -fstack-protector-strong -Wformat -Werror=format-security): gcc -shared -fPIC -Wl,-z,relro -o test.so test.c -ltest
523 CPPFLAGS missing (-D_FORTIFY_SOURCE=2): gcc -shared -fPIC -Wl,-z,relro -o test.so test.c -ltest
524 LDFLAGS missing (-Wl,-z,now): gcc -shared -fPIC -Wl,-z,relro -o test.so test.c -ltest
525 CFLAGS missing (-Wformat): gcc -fPIC -g -O2 -fstack-protector-strong -Wformat-security -Werror=format-security -c -D_FORTIFY_SOURCE=2 ../../../../src/test/test.c -o test.so.o
526 CFLAGS missing (-g -O2 -fPIE -fstack-protector-strong -Wformat -Werror=format-security): gcc test.c -o test.output
527 CPPFLAGS missing (-D_FORTIFY_SOURCE=2): gcc test.c -o test.output
528 LDFLAGS missing (-fPIE -pie -Wl,-z,relro -Wl,-z,now): gcc test.c -o test.output
529 CFLAGS missing (-g -O2 -fPIE -fstack-protector-strong -Wformat -Werror=format-security): (gcc -Wl,-z,relro -o test.output test.c)
530 CPPFLAGS missing (-D_FORTIFY_SOURCE=2): (gcc -Wl,-z,relro -o test.output test.c)
531 LDFLAGS missing (-fPIE -pie -Wl,-z,now): (gcc -Wl,-z,relro -o test.output test.c)
532 CFLAGS missing (-g -O2 -fPIE -fstack-protector-strong -Wformat -Werror=format-security): gcc test-comma.c
533 CPPFLAGS missing (-D_FORTIFY_SOURCE=2): gcc test-comma.c
534 LDFLAGS missing (-fPIE -pie -Wl,-z,relro -Wl,-z,now): gcc test-comma.c
535 CFLAGS missing (-g -O2 -fPIE -fstack-protector-strong -Wformat -Werror=format-security): gcc test-and.c
536 CPPFLAGS missing (-D_FORTIFY_SOURCE=2): gcc test-and.c
537 LDFLAGS missing (-fPIE -pie -Wl,-z,relro -Wl,-z,now): gcc test-and.c
538 CFLAGS missing (-g -O2 -fPIE -fstack-protector-strong -Wformat -Werror=format-security): gcc test-or.c
539 CPPFLAGS missing (-D_FORTIFY_SOURCE=2): gcc test-or.c
540 LDFLAGS missing (-fPIE -pie -Wl,-z,relro -Wl,-z,now): gcc test-or.c
542 is_blhc 'bad-cflags-stackprotector', '', 8,
543 'CFLAGS missing (-fstack-protector-strong): gcc -g -O2 -fstack-protector-strong -Wformat -Wformat-security -Werror=format-security -D_FORTIFY_SOURCE=2 -c -fno-stack-protector test-a.c
544 CFLAGS missing (-fstack-protector-strong): gcc -g -O2 -fstack-protector-strong -Wformat -Wformat-security -Werror=format-security -D_FORTIFY_SOURCE=2 -c -fno-stack-protector-all test-a.c
545 CFLAGS missing (-fstack-protector-strong): gcc -g -O2 -fstack-protector-strong -Wformat -Wformat-security -Werror=format-security -D_FORTIFY_SOURCE=2 -c -fno-stack-protector-strong test-a.c
548 is_blhc 'bad-cppflags', '', 8,
549 'CPPFLAGS missing (-D_FORTIFY_SOURCE=2): gcc -g -O2 -fstack-protector-strong -Wformat -Wformat-security -Werror=format-security -c test-a.c
550 CPPFLAGS missing (-D_FORTIFY_SOURCE=2): gcc -g -O2 -fstack-protector-strong -Wformat -Wformat-security -Werror=format-security -c test-b.c
551 CPPFLAGS missing (-D_FORTIFY_SOURCE=2): gcc -g -O2 -fstack-protector-strong -Wformat -Wformat-security -Werror=format-security -c test-c.c
552 CPPFLAGS missing (-D_FORTIFY_SOURCE=2): gcc -fPIC -g -O2 -fstack-protector-strong -Wformat -Wformat-security -Werror=format-security -c ../../../../src/test/test.c -o test.so.o
553 CPPFLAGS missing (-D_FORTIFY_SOURCE=2): g++ -o test -g -O2 -fstack-protector-strong -Wformat -Wformat-security -Werror=format-security test-a.cxx test-b.o test-c.o -Wl,-z,relro
554 CPPFLAGS missing (-D_FORTIFY_SOURCE=2): gcc -D_FORTIFY_SOURCE=0 -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -c test-a.c
555 CPPFLAGS missing (-D_FORTIFY_SOURCE=2): gcc -D_FORTIFY_SOURCE=1 -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -c test-b.c
556 CPPFLAGS missing (-D_FORTIFY_SOURCE=2): gcc -D_FORTIFY_SOURCE=2 -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -D_FORTIFY_SOURCE=1 -c test-c.c
557 CPPFLAGS missing (-D_FORTIFY_SOURCE=2): gcc -D_FORTIFY_SOURCE=2 -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -D_FORTIFY_SOURCE=0 -c test-d.c
558 CPPFLAGS missing (-D_FORTIFY_SOURCE=2): gcc -U_FORTIFY_SOURCE -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -c test-g.c
559 CPPFLAGS missing (-D_FORTIFY_SOURCE=2): gcc -D_FORTIFY_SOURCE=2 -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -U_FORTIFY_SOURCE -c test-i.c
560 CPPFLAGS missing (-D_FORTIFY_SOURCE=2): gcc -D_FORTIFY_SOURCE=2 -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -U_FORTIFY_SOURCE -c test-i.c
561 CPPFLAGS missing (-D_FORTIFY_SOURCE=2): gcc -D_FORTIFY_SOURCE=2 -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -D_FORTIFY_SOURCE=1 -c test-i.c
564 is_blhc 'bad-cppflags', '--ignore-flag -D_FORTIFY_SOURCE=2', 0,
568 'LDFLAGS missing (-Wl,-z,relro): gcc -o test test-a.o test-b.o test-c.o -ltest
569 LDFLAGS missing (-Wl,-z,relro): gcc -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -o test test-a.o test-b.o test-c.o
570 LDFLAGS missing (-Wl,-z,relro): gcc -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -o test test-a.o test-b.o test-c.o test.h
572 is_blhc 'bad-ldflags', '', 8,
574 is_blhc 'bad-ldflags', '--pie', 8,
575 'CFLAGS missing (-fPIE): gcc -g -O2 -fstack-protector-strong -Wformat -Wformat-security -Werror=format-security -D_FORTIFY_SOURCE=2 -c test-a.c
576 CFLAGS missing (-fPIE): gcc -g -O2 -fstack-protector-strong -Wformat -Wformat-security -Werror=format-security -D_FORTIFY_SOURCE=2 -c test-b.c
577 CFLAGS missing (-fPIE): gcc -g -O2 -fstack-protector-strong -Wformat -Wformat-security -Werror=format-security -D_FORTIFY_SOURCE=2 -c test-c.c
578 LDFLAGS missing (-fPIE -pie -Wl,-z,relro): gcc -o test test-a.o test-b.o test-c.o -ltest
579 LDFLAGS missing (-fPIE -pie -Wl,-z,relro): gcc -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -o test test-a.o test-b.o test-c.o
580 LDFLAGS missing (-fPIE -pie -Wl,-z,relro): gcc -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -o test test-a.o test-b.o test-c.o test.h
582 is_blhc 'bad-ldflags', '--bindnow', 8,
583 'LDFLAGS missing (-Wl,-z,relro -Wl,-z,now): gcc -o test test-a.o test-b.o test-c.o -ltest
584 LDFLAGS missing (-Wl,-z,relro -Wl,-z,now): gcc -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -o test test-a.o test-b.o test-c.o
585 LDFLAGS missing (-Wl,-z,relro -Wl,-z,now): gcc -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -o test test-a.o test-b.o test-c.o test.h
587 is_blhc 'bad-ldflags', '--pie --bindnow', 8,
588 'CFLAGS missing (-fPIE): gcc -g -O2 -fstack-protector-strong -Wformat -Wformat-security -Werror=format-security -D_FORTIFY_SOURCE=2 -c test-a.c
589 CFLAGS missing (-fPIE): gcc -g -O2 -fstack-protector-strong -Wformat -Wformat-security -Werror=format-security -D_FORTIFY_SOURCE=2 -c test-b.c
590 CFLAGS missing (-fPIE): gcc -g -O2 -fstack-protector-strong -Wformat -Wformat-security -Werror=format-security -D_FORTIFY_SOURCE=2 -c test-c.c
591 LDFLAGS missing (-fPIE -pie -Wl,-z,relro -Wl,-z,now): gcc -o test test-a.o test-b.o test-c.o -ltest
592 LDFLAGS missing (-fPIE -pie -Wl,-z,relro -Wl,-z,now): gcc -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -o test test-a.o test-b.o test-c.o
593 LDFLAGS missing (-fPIE -pie -Wl,-z,relro -Wl,-z,now): gcc -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -o test test-a.o test-b.o test-c.o test.h
596 is_blhc 'bad-multiline', '', 8,
597 'CFLAGS missing (-Wformat): gcc \ -g -O2 -fstack-protector-strong\ -Wformat-security\ -Werror=format-security -D_FORTIFY_SOURCE=2 -c test-a.c
598 CFLAGS missing (-fstack-protector-strong): gcc -g -O2 -Wformat -Wformat-security -Werror=format-security\ -D_FORTIFY_SOURCE=2\ -c test-b.c
599 CFLAGS missing (-Werror=format-security): gcc -g -O2 -fstack-protector-strong -Wformat -Wformat-security -D_FORTIFY_SOURCE=2 -c test-c.c
600 LDFLAGS missing (-Wl,-z,relro): gcc -o\ test test-c.o test-a.o test-b.o\ -ltest
601 LDFLAGS missing (-Wl,-z,relro): gcc -o \ test test-c.o test-b.o test-a.o\
602 CFLAGS missing (-g -O2 -fstack-protector-strong -Wformat -Werror=format-security): gcc -o \ test test-b.o test-a.o test-c.c\
603 CPPFLAGS missing (-D_FORTIFY_SOURCE=2): gcc -o \ test test-b.o test-a.o test-c.c\
604 LDFLAGS missing (-Wl,-z,relro): gcc -o \ test test-b.o test-a.o test-c.c\
605 CPPFLAGS missing (-D_FORTIFY_SOURCE=2): gcc -g -O2 -fstack-protector-strong -Wformat -Wformat-security -Werror=format-security -c test-a.c
606 CFLAGS missing (-g -O2 -fstack-protector-strong -Wformat -Werror=format-security): gcc -D_FORTIFY_SOURCE=2 -c test-b.c
607 CFLAGS missing (-Werror=format-security): gcc -g -O2 -fstack-protector-strong -Wformat -D_FORTIFY_SOURCE=2 -c test-a.c
608 CFLAGS missing (-g -O2 -fstack-protector-strong -Wformat): gcc -Wformat-security -Werror=format-security -c test-b.c
609 CPPFLAGS missing (-D_FORTIFY_SOURCE=2): gcc -Wformat-security -Werror=format-security -c test-b.c
610 CFLAGS missing (-O2): gcc -g -fstack-protector-strong -Wformat -Wformat-security -Werror=format-security -c test-a.c
611 CPPFLAGS missing (-D_FORTIFY_SOURCE=2): gcc -g -fstack-protector-strong -Wformat -Wformat-security -Werror=format-security -c test-a.c
612 CFLAGS missing (-g -fstack-protector-strong -Wformat -Werror=format-security): \ gcc -O2 -D_FORTIFY_SOURCE=2 -c test-b.c
613 CFLAGS missing (-fstack-protector-strong): gcc -g -O2 -Wformat -Wformat-security -Werror=format-security -c test-a.c
614 CPPFLAGS missing (-D_FORTIFY_SOURCE=2): gcc -g -O2 -Wformat -Wformat-security -Werror=format-security -c test-a.c
615 CFLAGS missing (-g -O2 -fstack-protector-strong -Wformat -Werror=format-security): \ gcc -D_FORTIFY_SOURCE=2 -c test-b.c
616 CPPFLAGS missing (-D_FORTIFY_SOURCE=2): gcc -g -O2 -fstack-protector-strong -Wformat -Wformat-security \; -Werror=format-security -D_FORTIFY_SOURCE=1 -c test-a.c
617 CPPFLAGS missing (-D_FORTIFY_SOURCE=2): \ gcc -g -O2 -fstack-protector-strong -Wformat -Wformat-security -Werror=format-security -D_FORTIFY_SOURCE=1 -c test-b.c
618 CPPFLAGS missing (-D_FORTIFY_SOURCE=2): gcc -c test.c `echo -g -O2 -fstack-protector-strong echo -Wformat -Wformat-security -Werror=format-security | sed \'s/.../; s/.../\'` -o test.o
619 CPPFLAGS missing (-D_FORTIFY_SOURCE=2): gcc -c test.c `echo -g -O2 -fstack-protector-strong echo -Wformat -Wformat-security -Werror=format-security | sed "s/.../; s/.../"` -o test.o
622 is_blhc 'bad-library', '--all', 8,
623 'CFLAGS missing (-fstack-protector-strong): gcc -D_FORTIFY_SOURCE=2 -g -O2 -Wformat -Wformat-security -Werror=format-security test.c -fPIC -DPIC -o libtest.so
624 LDFLAGS missing (-Wl,-z,relro -Wl,-z,now): gcc -D_FORTIFY_SOURCE=2 -g -O2 -Wformat -Wformat-security -Werror=format-security test.c -fPIC -DPIC -o libtest.so
625 LDFLAGS missing (-Wl,-z,now): gcc -shared -fPIC -DPIC libtest.o -lpthread -O2 -Wl,relro -Wl,--as-needed -o libtest.so
626 LDFLAGS missing (-Wl,-z,relro -Wl,-z,now): gcc -shared -fPIC -DPIC libtest.o -lpthread -O2 -Wl,--as-needed -o libtest.so
627 LDFLAGS missing (-Wl,-z,now): gcc -shared -fPIC test.o -Wl,-z -Wl,relro -o .libs/libtest.so.1.0.0
628 LDFLAGS missing (-Wl,-z,relro): gcc -shared -o libtest.so.0d ./test-a.o test/./test-b.o -Wl,-z,now -lpthread -ldl
629 LDFLAGS missing (-Wl,-z,relro -Wl,-z,now): /usr/bin/g++ -shared -fpic -o libtest-6.1.so.0 test.o -ltiff -lz
630 LDFLAGS missing (-Wl,-z,relro -Wl,-z,now): gcc -Wl,--as-needed -fPIE -pie -o test.cgi test.o -lgcrypt
631 CFLAGS missing (-fPIE): gcc -g -O2 -fstack-protector-strong -Wformat -Wformat-security -Werror=format-security test.c -o lib`basename test/test`.so
632 CPPFLAGS missing (-D_FORTIFY_SOURCE=2): gcc -g -O2 -fstack-protector-strong -Wformat -Wformat-security -Werror=format-security test.c -o lib`basename test/test`.so
633 LDFLAGS missing (-fPIE -pie -Wl,-z,relro -Wl,-z,now): gcc -g -O2 -fstack-protector-strong -Wformat -Wformat-security -Werror=format-security test.c -o lib`basename test/test`.so
636 is_blhc 'env', '--all', 8,
637 'CPPFLAGS missing (-D_FORTIFY_SOURCE=2): VERSION="`echo hi`" CPP="gcc -x assembler-with-cpp -E -P -Wdate-time -D_FORTIFY_SOURCE=2" CPPFLAGS="-Wdate-time -D_FORTIFY_SOURCE=2" ../../config/gen-posix-names.sh _SC_ ml_sysconf.h
641 # check the build log is verbose
643 is_blhc 'verbose-build', '', 12,
644 'NONVERBOSE BUILD: checking if you want to see long compiling messages... no
645 NONVERBOSE BUILD: CC libtest-a.lo
646 NONVERBOSE BUILD: CC libtest-b.lo
647 NONVERBOSE BUILD: CC libtest_c.lo
648 NONVERBOSE BUILD: CC libtest-d.lo
649 NONVERBOSE BUILD: CCLD libtest.la
650 NONVERBOSE BUILD: LINK libtest.la
651 NONVERBOSE BUILD: CXX libtest-a.lo
652 NONVERBOSE BUILD: CXX libtest-b.lo
653 NONVERBOSE BUILD: CXX libtest_c.lo
654 NONVERBOSE BUILD: CXX libtest-d.lo
655 NONVERBOSE BUILD: CXXLD libtest.la
656 NONVERBOSE BUILD: [CC] src/test-a.o
657 NONVERBOSE BUILD: [CC] src/test-b.o
658 NONVERBOSE BUILD: [CC] src/test_c.o
659 NONVERBOSE BUILD: [CXX] src/test-d.o
660 NONVERBOSE BUILD: [LD] src/test.o
661 NONVERBOSE BUILD: [CC] src/test-a.o
662 NONVERBOSE BUILD: [CC] src/test-b.o
663 NONVERBOSE BUILD: [CC] src/test_c.o
664 NONVERBOSE BUILD: [LD] src/test.o
665 NONVERBOSE BUILD: [CC] src/test-a.o
666 NONVERBOSE BUILD: [CC] src/test-b.o
667 NONVERBOSE BUILD: [CC] src/test_c.o
668 NONVERBOSE BUILD: [LD] src/test.o
669 NONVERBOSE BUILD: CC modules/server/test.c
670 NONVERBOSE BUILD: C++ test/test.o
671 NONVERBOSE BUILD: C++ test.cpp
672 NONVERBOSE BUILD: Building program ../build/bin/test
673 NONVERBOSE BUILD: Compiling test/test.cc to ../build/test/test.o
674 NONVERBOSE BUILD: Compiling test/test.cc to ../build/test/test.o
675 NONVERBOSE BUILD: Building shared library ../build/test/libtest.so.1.2.3
676 NONVERBOSE BUILD: Compiling test.cc to ../build/test/test.o
677 NONVERBOSE BUILD: Building program ../build/bin/test
678 CPPFLAGS missing (-D_FORTIFY_SOURCE=2): g++ -c -g -O2 -fstack-protector-strong -Wformat -Wformat-security -Werror=format-security -o ../build/test/test.o test/test.cc
679 LDFLAGS missing (-Wl,-z,relro): g++ -fPIC -DPIC \ -o ../build/test/libtest.so.1.2.3 -shared \ ../build/obj/test/test-a.o ../build/obj/test/test-b.o ../build/obj/test/test-c.o
680 CXXFLAGS missing (-Wformat): g++ -c -g -O2 -fstack-protector-strong -Wformat-security -Werror=format-security -o ../build/test/test.o test.cc
681 CPPFLAGS missing (-D_FORTIFY_SOURCE=2): g++ -c -g -O2 -fstack-protector-strong -Wformat-security -Werror=format-security -o ../build/test/test.o test.cc
682 LDFLAGS missing (-Wl,-z,relro): g++ ../build/obj/test/test.o -o /../build/bin/test
683 NONVERBOSE BUILD: Compiling test_file.cxx...
684 CXXFLAGS missing (-fstack-protector-strong): g++ -g -O2 -fPIC -Wformat -Wformat-security -Werror=format-security -D_FORTIFY_SOURCE=2 -c test_file.cxx
685 NONVERBOSE BUILD: [ 22%] Building CXX object src/CMakeFiles/test/test.cpp.o
686 NONVERBOSE BUILD: [ 82%] Building C object src/CMakeFiles/test/test.c.o
687 CXXFLAGS missing (-Wformat): /usr/bin/c++ -g -O2 -fstack-protector-strong -Wformat-security -Werror=format-security -o CMakeFiles/test-verbose.dir/verbose.cpp.o -c -D_FORTIFY_SOURCE=2 /tmp/test/src/test-verbose/verbose.cpp
688 CFLAGS missing (-Werror=format-security): /usr/bin/gcc -g -O2 -fstack-protector-strong -Wformat -Wformat-security -o CMakeFiles/test-verbose-c.dir/verbose-c.c.o -c -D_FORTIFY_SOURCE=2 /tmp/test/src/test-verbose-c/verbose-c.c
689 NONVERBOSE BUILD: Compiling test.c \ gcc test.c
690 NONVERBOSE BUILD: [ 3%] Building CXX object scribus/text/CMakeFiles/scribus_text_lib.dir/frect.cpp.o
691 NONVERBOSE BUILD: [ 1/13] Compiling src/instance.c
692 NONVERBOSE BUILD: [11/13] Compiling suil.pc.in
695 is_blhc 'parallel', '', 0, '';
698 # handle debug builds
700 is_blhc 'debug-build', '', 0, '';
705 is_blhc 'configure', '', 1,
708 is_blhc 'configure-check', '', 4,
709 'NONVERBOSE BUILD: CC = gcc -std=gnu99 -std=gnu99 test.c
712 is_blhc 'configure-check', '--line-numbers', 4,
713 '5:NONVERBOSE BUILD: CC = gcc -std=gnu99 -std=gnu99 test.c
716 is_blhc 'make', '', 1,
722 is_blhc 'qt4', '', 1,
728 is_blhc 'cc', '--pie --bindnow', 8,
729 'CXXFLAGS missing (-fPIE -Wformat): cc -g -O2 -fstack-protector-strong -Wformat-security -Werror=format-security -D_FORTIFY_SOURCE=2 -c test-a.cc
730 CFLAGS missing (-fPIE -Wformat): cc -g -O2 -fstack-protector-strong -Wformat-security -Werror=format-security -D_FORTIFY_SOURCE=2 -c test-a.c
731 CFLAGS missing (-fPIE -fstack-protector-strong): cc -g -O2 -Wformat -Wformat-security -Werror=format-security -D_FORTIFY_SOURCE=2 -c test-b.c
732 CFLAGS missing (-fPIE -Werror=format-security): cc -g -O2 -fstack-protector-strong -Wformat -Wformat-security -D_FORTIFY_SOURCE=2 -c test-c.c
733 LDFLAGS missing (-fPIE -pie -Wl,-z,relro -Wl,-z,now): cc -Wl,-z,defs -o test test-a.o test-b.o test-c.o -ltest
734 CXXFLAGS missing (-g -O2 -fPIE -fstack-protector-strong -Wformat -Werror=format-security): cc\ test.cc
735 CPPFLAGS missing (-D_FORTIFY_SOURCE=2): cc\ test.cc
736 LDFLAGS missing (-fPIE -pie -Wl,-z,relro -Wl,-z,now): cc\ test.cc
737 CXXFLAGS missing (-g -O2 -fPIE -fstack-protector-strong -Wformat -Werror=format-security): cc\ test.cc
738 CPPFLAGS missing (-D_FORTIFY_SOURCE=2): cc\ test.cc
739 LDFLAGS missing (-fPIE -pie -Wl,-z,relro -Wl,-z,now): cc\ test.cc
740 LDFLAGS missing (-fPIE -pie -Wl,-z,now): cc -Wl,-z,defs test-a.o test-b.o test-c.o -ltest -Wl,-z,relro -o test/test-4.2~_4711/test.so test.o
746 is_blhc 'gcc', '--pie --bindnow', 8,
747 'CXXFLAGS missing (-fPIE -Wformat): gcc-4.6 -g -O2 -fstack-protector-strong -Wformat-security -Werror=format-security -D_FORTIFY_SOURCE=2 -c test-a.cc
748 CFLAGS missing (-fPIE -Wformat): gcc-4.6 -g -O2 -fstack-protector-strong -Wformat-security -Werror=format-security -D_FORTIFY_SOURCE=2 -c test-a.c
749 CFLAGS missing (-fPIE -fstack-protector-strong): gcc-4.6 -g -O2 -Wformat -Wformat-security -Werror=format-security -D_FORTIFY_SOURCE=2 -c test-b.c
750 CFLAGS missing (-fPIE -Werror=format-security): gcc-4.6 -g -O2 -fstack-protector-strong -Wformat -Wformat-security -D_FORTIFY_SOURCE=2 -c test-c.c
751 LDFLAGS missing (-fPIE -pie -Wl,-z,relro -Wl,-z,now): gcc-4.6 -Wl,-z,defs -o test test-a.o test-b.o test-c.o -ltest
752 CFLAGS missing (-g -O2 -fPIE -fstack-protector-strong -Wformat -Werror=format-security): gcc\ test.c
753 CPPFLAGS missing (-D_FORTIFY_SOURCE=2): gcc\ test.c
754 LDFLAGS missing (-fPIE -pie -Wl,-z,relro -Wl,-z,now): gcc\ test.c
755 CFLAGS missing (-g -O2 -fPIE -fstack-protector-strong -Wformat -Werror=format-security): gcc\ test.c
756 CPPFLAGS missing (-D_FORTIFY_SOURCE=2): gcc\ test.c
757 LDFLAGS missing (-fPIE -pie -Wl,-z,relro -Wl,-z,now): gcc\ test.c
758 LDFLAGS missing (-fPIE -pie -Wl,-z,now): gcc-4.6 -Wl,-z,defs test-a.o test-b.o test-c.o -ltest -Wl,-z,relro -o test/test-4.2~_4711/test.so test.o
764 is_blhc 'c++', '--pie --bindnow', 8,
765 'CXXFLAGS missing (-fPIE -Wformat): c++ -g -O2 -fstack-protector-strong -Wformat-security -Werror=format-security -D_FORTIFY_SOURCE=2 -c test-a.cpp
766 CXXFLAGS missing (-fPIE -fstack-protector-strong): c++ -g -O2 -Wformat -Wformat-security -Werror=format-security -D_FORTIFY_SOURCE=2 -c test-b.cpp
767 CXXFLAGS missing (-fPIE -Werror=format-security): c++ -g -O2 -fstack-protector-strong -Wformat -Wformat-security -D_FORTIFY_SOURCE=2 -c test-c.cpp
768 CXXFLAGS missing (-fPIE): c++ -g -O2 -fstack-protector-strong -Wformat -Wformat-security -Werror=format-security -D_FORTIFY_SOURCE=2 -c test-d.cc
769 LDFLAGS missing (-fPIE -pie -Wl,-z,relro -Wl,-z,now): c++ -Wl,-z,defs -o test test-a.o test-b.o test-c.o test-d.o -ltest
770 LDFLAGS missing (-fPIE -pie -Wl,-z,now): c++ -Wl,-z,defs test-a.o test-b.o test-c.o -ltest -Wl,-z,relro -o test/test-4.2~_4711/test.so test.o
771 CFLAGS missing (-g -O2 -fPIE -fstack-protector-strong -Wformat -Werror=format-security): c++\ test.c
772 CPPFLAGS missing (-D_FORTIFY_SOURCE=2): c++\ test.c
773 LDFLAGS missing (-fPIE -pie -Wl,-z,relro -Wl,-z,now): c++\ test.c
774 CXXFLAGS missing (-g -O2 -fPIE -fstack-protector-strong -Wformat -Werror=format-security): c++\ test.c++
775 CPPFLAGS missing (-D_FORTIFY_SOURCE=2): c++\ test.c++
776 LDFLAGS missing (-fPIE -pie -Wl,-z,relro -Wl,-z,now): c++\ test.c++
777 CXXFLAGS missing (-g -O2 -fPIE -fstack-protector-strong -Wformat -Werror=format-security): c++\ test.c++
778 CPPFLAGS missing (-D_FORTIFY_SOURCE=2): c++\ test.c++
779 LDFLAGS missing (-fPIE -pie -Wl,-z,relro -Wl,-z,now): c++\ test.c++
780 CXXFLAGS missing (-fPIE -Wformat): c++-4.6 -g -O2 -fstack-protector-strong -Wformat-security -Werror=format-security -D_FORTIFY_SOURCE=2 -c test-a.cpp
781 CXXFLAGS missing (-fPIE -fstack-protector-strong): c++-4.6 -g -O2 -Wformat -Wformat-security -Werror=format-security -D_FORTIFY_SOURCE=2 -c test-b.cpp
782 CXXFLAGS missing (-fPIE -Werror=format-security): c++-4.6 -g -O2 -fstack-protector-strong -Wformat -Wformat-security -D_FORTIFY_SOURCE=2 -c test-c.cpp
783 CXXFLAGS missing (-fPIE): c++-4.6 -g -O2 -fstack-protector-strong -Wformat -Wformat-security -Werror=format-security -D_FORTIFY_SOURCE=2 -c test-d.cc
784 LDFLAGS missing (-fPIE -pie -Wl,-z,relro -Wl,-z,now): c++-4.6 -Wl,-z,defs -o test test-a.o test-b.o test-c.o test-d.o -ltest
790 is_blhc 'g++', '--pie --bindnow', 8,
791 'CXXFLAGS missing (-fPIE -Wformat): g++ -g -O2 -fstack-protector-strong -Wformat-security -Werror=format-security -D_FORTIFY_SOURCE=2 -c test-a.cpp
792 CXXFLAGS missing (-fPIE -fstack-protector-strong): g++ -g -O2 -Wformat -Wformat-security -Werror=format-security -D_FORTIFY_SOURCE=2 -c test-b.cpp
793 CXXFLAGS missing (-fPIE -Werror=format-security): g++ -g -O2 -fstack-protector-strong -Wformat -Wformat-security -D_FORTIFY_SOURCE=2 -c test-c.cpp
794 CXXFLAGS missing (-fPIE): g++ -g -O2 -fstack-protector-strong -Wformat -Wformat-security -Werror=format-security -D_FORTIFY_SOURCE=2 -c test-d.cc
795 LDFLAGS missing (-fPIE -pie -Wl,-z,relro -Wl,-z,now): g++ -Wl,-z,defs -o test test-a.o test-b.o test-c.o test-d.o -ltest
796 CXXFLAGS missing (-fPIE -Wformat): x86_64-linux-gnu-g++ -g -O2 -fstack-protector-strong -Wformat-security -Werror=format-security -D_FORTIFY_SOURCE=2 -c test-a.cpp
797 CXXFLAGS missing (-fPIE -fstack-protector-strong): x86_64-linux-gnu-g++ -g -O2 -Wformat -Wformat-security -Werror=format-security -D_FORTIFY_SOURCE=2 -c test-b.cpp
798 CXXFLAGS missing (-fPIE -Werror=format-security): x86_64-linux-gnu-g++ -g -O2 -fstack-protector-strong -Wformat -Wformat-security -D_FORTIFY_SOURCE=2 -c test-c.cpp
799 CXXFLAGS missing (-fPIE): x86_64-linux-gnu-g++ -g -O2 -fstack-protector-strong -Wformat -Wformat-security -Werror=format-security -D_FORTIFY_SOURCE=2 -c test-d.cc
800 LDFLAGS missing (-fPIE -pie -Wl,-z,relro -Wl,-z,now): x86_64-linux-gnu-g++ -Wl,-z,defs -o test test-a.o test-b.o test-c.o test-d.o -ltest
801 LDFLAGS missing (-fPIE -pie -Wl,-z,now): g++ -Wl,-z,defs test-a.o test-b.o test-c.o -ltest -Wl,-z,relro -o test/test-4.2~_4711/test.so test.o
802 CFLAGS missing (-g -O2 -fPIE -fstack-protector-strong -Wformat -Werror=format-security): g++\ test.c
803 CPPFLAGS missing (-D_FORTIFY_SOURCE=2): g++\ test.c
804 LDFLAGS missing (-fPIE -pie -Wl,-z,relro -Wl,-z,now): g++\ test.c
805 CXXFLAGS missing (-fPIE -Wformat): g++-4.6 -g -O2 -fstack-protector-strong -Wformat-security -Werror=format-security -D_FORTIFY_SOURCE=2 -c test-a.cpp
806 CXXFLAGS missing (-fPIE -fstack-protector-strong): g++-4.6 -g -O2 -Wformat -Wformat-security -Werror=format-security -D_FORTIFY_SOURCE=2 -c test-b.cpp
807 CXXFLAGS missing (-fPIE -Werror=format-security): g++-4.6 -g -O2 -fstack-protector-strong -Wformat -Wformat-security -D_FORTIFY_SOURCE=2 -c test-c.cpp
808 CXXFLAGS missing (-fPIE): g++-4.6 -g -O2 -fstack-protector-strong -Wformat -Wformat-security -Werror=format-security -D_FORTIFY_SOURCE=2 -c test-d.cc
809 LDFLAGS missing (-fPIE -pie -Wl,-z,relro -Wl,-z,now): g++-4.6 -Wl,-z,defs -o test test-a.o test-b.o test-c.o test-d.o -ltest
815 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
816 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
817 CFLAGS missing (-fPIE -fstack-protector-strong -Wformat -Werror=format-security): gcc -c -g -O2 test.c
818 CPPFLAGS missing (-D_FORTIFY_SOURCE=2): gcc -c -g -O2 test.c
819 CFLAGS missing (-fPIE -fstack-protector-strong -Wformat -Werror=format-security): gcc -g -O2 test.c
820 CPPFLAGS missing (-D_FORTIFY_SOURCE=2): gcc -g -O2 test.c
821 LDFLAGS missing (-fPIE -pie -Wl,-z,relro): gcc -g -O2 test.c
822 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
823 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
825 is_blhc 'ada', '', 8,
827 is_blhc 'ada-pbuilder', '', 8,
833 is_blhc 'fortran', '', 8,
834 'CFLAGS missing (-fstack-protector-strong): gfortran -g -w -O2 -Wtabs -ffixed-line-length-132 -Wl,-z,relro -o balls balls.f
835 CFLAGS missing (-fstack-protector-strong): gfortran -g -w -O2 -Wtabs -ffixed-line-length-132 -c -o quadric.o quadric.f
836 CFLAGS missing (-fstack-protector-strong): gfortran -g -w -O2 -Wtabs -ffixed-line-length-132 -c -o suv.o suv.f
837 CFLAGS missing (-fstack-protector-strong): gfortran -g -w -O2 -Wtabs -ffixed-line-length-132 \ rastep.f quadric.o suv.o -Wl,-z,relro \ -o rastep
838 CFLAGS missing (-fstack-protector-strong): gfortran -g -w -O2 -Wtabs -ffixed-line-length-132 -c -o render.o render.f
839 LDFLAGS missing (-Wl,-z,relro): gfortran -g -w -O2 -Wtabs -ffixed-line-length-132 -fstack-protector-strong -o balls-without-ldflags balls.f
840 CFLAGS missing (-fstack-protector-strong): mpifort -cpp -DDOUB -g -O2 -fdebug-prefix-map=/«PKGBUILDDIR»=. -c -o transform.o transform.f90
843 is_blhc 'fortran-no-build-deps', '', 8,
844 'CFLAGS missing (-fstack-protector-strong): gfortran -g -w -O2 -Wtabs -ffixed-line-length-132 -Wl,-z,relro -o balls balls.f
845 CFLAGS missing (-fstack-protector-strong): gfortran -g -w -O2 -Wtabs -ffixed-line-length-132 -c -o quadric.o quadric.f
846 CFLAGS missing (-fstack-protector-strong): gfortran -g -w -O2 -Wtabs -ffixed-line-length-132 -c -o suv.o suv.f
847 CFLAGS missing (-fstack-protector-strong): gfortran -g -w -O2 -Wtabs -ffixed-line-length-132 \ rastep.f quadric.o suv.o -Wl,-z,relro \ -o rastep
848 CFLAGS missing (-fstack-protector-strong): gfortran -g -w -O2 -Wtabs -ffixed-line-length-132 -c -o render.o render.f
849 LDFLAGS missing (-Wl,-z,relro): gfortran -g -w -O2 -Wtabs -ffixed-line-length-132 -fstack-protector-strong -o balls-without-ldflags balls.f
850 CFLAGS missing (-fstack-protector-strong): mpifort -cpp -DDOUB -g -O2 -fdebug-prefix-map=/«PKGBUILDDIR»=. -c -o transform.o transform.f90
856 is_blhc 'libtool', '--bindnow', 12,
857 'CFLAGS missing (-fPIE -Wformat): libtool: compile: x86_64-linux-gnu-gcc -D_FORTIFY_SOURCE=2 -g -O2 -fstack-protector-strong -Wformat-security -Werror=format-security -c test.c
858 CXXFLAGS missing (-fPIE -Wformat): libtool: compile: x86_64-linux-gnu-g++ -D_FORTIFY_SOURCE=2 -g -O2 -fstack-protector-strong -Wformat-security -Werror=format-security -c test.cpp
859 CFLAGS missing (-fPIE -Wformat): libtool: compile: gcc-4.6 -D_FORTIFY_SOURCE=2 -g -O2 -fstack-protector-strong -Wformat-security -Werror=format-security -c test.c
860 CXXFLAGS missing (-fPIE -Wformat): libtool: compile: g++-4.6 -D_FORTIFY_SOURCE=2 -g -O2 -fstack-protector-strong -Wformat-security -Werror=format-security -c test.cc
861 LDFLAGS missing (-Wl,-z,now): libtool: link: g++ -shared test-a.o test-b.o test-b.o test-c.o -O2 -Wl,relro -o test.so
862 LDFLAGS missing (-fPIE -pie -Wl,-z,now): libtool: link: gcc -Wl,-z -Wl,relro -o test test.o
863 LDFLAGS missing (-fPIE -pie -Wl,-z,now): libtool: link: cc -Wl,-z,relro -o test.so test.o
864 LDFLAGS missing (-fPIE -pie -Wl,-z,now): libtool: link: gcc-4.6 -Wl,-z,relro -o test.so test.o
865 LDFLAGS missing (-fPIE -pie -Wl,-z,now): libtool: link: x86_64-linux-gnu-g++ -Wl,-z,relro -o test.so test.o
866 LDFLAGS missing (-fPIE -pie -Wl,-z,now): libtool: link: gcc -Wl,-z,relro -o test.so test.o
867 LDFLAGS missing (-fPIE -pie -Wl,-z,now): libtool: link: gcc -Wl,-z,relro -o test/test-4.2~_4711/test.so test.o
868 LDFLAGS missing (-fPIE -pie -Wl,-z,now): libtool: link: gcc -Wl,-z,relro -o test.so test.o
869 LDFLAGS missing (-fPIE -pie -Wl,-z,now): libtool: link: gcc -Wl,-z,relro -o test.so test.o
870 LDFLAGS missing (-fPIE -pie -Wl,-z,now): libtool: link: gcc -Wl,-z,relro -o test.so test.o
871 NONVERBOSE BUILD: /bin/bash /tmp/test/build/libtool --silent --tag CC --mode=relink gcc -Wl,-z,relro -o test.so test.o
872 LDFLAGS missing (-fPIE -pie -Wl,-z,now): libtool: relink: gcc -Wl,-z,relro -o test.so test.o
873 LDFLAGS missing (-fPIE -pie -Wl,-z,now): libtool: relink: g++ -Wl,-z,relro -o test.la test.o
874 LDFLAGS missing (-fPIE -pie -Wl,-z,now): libtool: link: gcc -g -O2 -fstack-protector-strong -Wformat -Wformat-security -Werror=format-security -Wl,-z,relro -o test test.o
875 LDFLAGS missing (-fPIE -pie -Wl,-z,now): gcc -g -O2 -fstack-protector-strong -Wformat -Wformat-security -Werror=format-security -Wl,-z -Wl,relro -o .libs/test test.o
876 LDFLAGS missing (-fPIE -pie -Wl,-z,now): libtool: link: g++ -include ./include/CppUTest/MemoryLeakDetectorNewMacros.h -Wall -Wextra -Wshadow -Wswitch-default -Wswitch-enum -Wconversion -pedantic -Wsign-conversion -Woverloaded-virtual -Wno-disabled-macro-expansion -Wno-padded -Wno-global-constructors -Wno-exit-time-destructors -Wno-weak-vtables -Wno-old-style-cast -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -Wl,-z -Wl,relro -o CppUTestTests CppUTestTests-AllocationInCFile.o CppUTestTests-AllocationInCppFile.o CppUTestTests-AllocLetTestFree.o CppUTestTests-AllocLetTestFreeTest.o CppUTestTests-AllTests.o CppUTestTests-CheatSheetTest.o CppUTestTests-CommandLineArgumentsTest.o CppUTestTests-CommandLineTestRunnerTest.o CppUTestTests-JUnitOutputTest.o CppUTestTests-MemoryLeakDetectorTest.o CppUTestTests-MemoryLeakOperatorOverloadsTest.o CppUTestTests-MemoryLeakWarningTest.o CppUTestTests-PluginTest.o CppUTestTests-PreprocessorTest.o CppUTestTests-SetPluginTest.o CppUTest Tests-SimpleStringTest.o CppUTestTests-SimpleMutexTest.o CppUTestTests-TestFailureNaNTest.o CppUTestTests-TestFailureTest.o CppUTestTests-TestFilterTest.o CppUTestTests-TestHarness_cTest.o CppUTestTests-TestHarness_cTestCFile.o CppUTestTests-TestInstallerTest.o CppUTestTests-TestMemoryAllocatorTest.o CppUTestTests-TestOutputTest.o CppUTestTests-TestRegistryTest.o CppUTestTests-TestResultTest.o CppUTestTests-TestUTestMacro.o CppUTestTests-UtestTest.o CppUTestTests-UtestPlatformTest.o lib/libCppUTest.a -lpthread
877 LDFLAGS missing (-fPIE -pie -Wl,-z,now): libtool: link: gcc -Wl,-z,relro -o libtest.la test.h test-a.lo test-b.lo test-c.lo test-d.la
878 LDFLAGS missing (-fPIE -pie -Wl,-z,relro -Wl,-z,now): libtool: link: gcc -o libtest.la test.h test-a.lo test-b.lo test-c.lo test-d.la
879 NONVERBOSE BUILD: /usr/share/apr-1.0/build/libtool --silent --mode=compile x86_64-linux-gnu-gcc -std=gnu99 -I/usr/include/libxml2 -pthread -pipe -g -O2 -fstack-protector-strong -Wformat -Werror=format-security ... -prefer-pic -c mod_buffer.c
880 NONVERBOSE BUILD: /usr/share/apr-1.0/build/libtool --silent --mode=link x86_64-linux-gnu-gcc -std=gnu99 -I/usr/include/libxml2 -pthread -pipe -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -Wl,--as-needed -Wl,-z,relro -o mod_buffer.la -rpath /usr/lib/apache2/modules -module -avoid-version mod_buffer.lo
881 NONVERBOSE BUILD: /usr/share/apr-1.0/build/libtool --silent --mode=link x86_64-linux-gnu-gcc -std=gnu99 -pthread -pipe -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -lssl -lcrypto -pie -Wl,--as-needed -Wl,-z,relro -o ab ab.lo -lcap /usr/lib/libaprutil-1.la /usr/lib/libapr-1.la -lm
882 NONVERBOSE BUILD: /usr/share/apr-1.0/build/libtool --silent --mode=link x86_64-linux-gnu-gcc -std=gnu99 -pthread -pipe -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -lssl -lcrypto -pie \ -Wl,--as-needed -Wl,-z,relro -o ab ab.lo -lcap /usr/lib/libaprutil-1.la /usr/lib/libapr-1.la -lm
883 NONVERBOSE BUILD: /bin/bash ../libtool --silent --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I.. -D_FORTIFY_SOURCE=2 -Wall -Wextra -Wconversion -g -O2 -fPIE -fstack-protector-strong -Wformat -Werror=format-security -MT coloredstderr.lo -MD -MP -MF .deps/coloredstderr.Tpo -c -o coloredstderr.lo coloredstderr.c
884 NONVERBOSE BUILD: /bin/bash ../libtool --silent --tag=CC --mode=link gcc -Wall -Wextra -Wconversion -g -O2 -fPIE -fstack-protector-strong -Wformat -Werror=format-security -fPIE -pie -Wl,-z,relro -Wl,-z,now -o libcoloredstderr.la -rpath /usr/local/lib coloredstderr.lo -ldl
888 # different architectures
891 'CFLAGS missing (-fstack-protector-strong): gcc -D_FORTIFY_SOURCE=2 -g -O2 -Wformat -Wformat-security -Werror=format-security -Wall -c test.c
893 is_blhc 'arch-avr32', '', 8,
897 'CFLAGS missing (-fstack-protector-strong): gcc -D_FORTIFY_SOURCE=2 -g -O2 -fPIE -Wformat -Wformat-security -Werror=format-security -Wall -c test.c
898 LDFLAGS missing (-pie): gcc -fPIE -Wl,-z,relro -Wl,-z,now -o test test.o
900 is_blhc 'arch-i386', '', 8,
904 'CFLAGS missing (-fPIE): gcc -D_FORTIFY_SOURCE=2 -g -O2 -Wformat -Wformat-security -Werror=format-security -Wall -c test.c
905 LDFLAGS missing (-pie): gcc -fPIE -o test test.o
907 is_blhc 'arch-ia64', '', 8,
910 is_blhc 'arch-ia64', '--arch i386', 8,
911 'CFLAGS missing (-fstack-protector-strong): gcc -D_FORTIFY_SOURCE=2 -g -O2 -fPIE -Wformat -Wformat-security -Werror=format-security -Wall -c test.c
912 LDFLAGS missing (-Wl,-z,relro): gcc -fPIE -pie -o test test.o
913 CFLAGS missing (-fPIE -fstack-protector-strong): gcc -D_FORTIFY_SOURCE=2 -g -O2 -Wformat -Wformat-security -Werror=format-security -Wall -c test.c
914 LDFLAGS missing (-pie -Wl,-z,relro): gcc -fPIE -o test test.o
918 # architecture in older buildd logs
920 is_blhc 'dpkg-buildpackage-architecture-old', '', 0,
923 # architecture in newer buildd logs
925 is_blhc 'dpkg-buildpackage-architecture-new', '', 0,
929 # correct architecture detection
931 is_blhc 'buildd-architecture', '', 0, '';
932 is_blhc 'buildd-architecture-old', '', 0, '';
935 # ignore architecture
937 is_blhc ['arch-avr32', 'arch-i386', 'empty', 'arch-mipsel'],
938 '--ignore-arch avr32 --ignore-arch mipsel',
940 "checking './t/logs/arch-avr32'...\n"
941 . "ignoring architecture 'avr32'\n"
942 . "checking './t/logs/arch-i386'...\n"
944 . "checking './t/logs/empty'...\n"
946 . "checking './t/logs/arch-mipsel'...\n"
947 . "ignoring architecture 'mipsel'\n"
950 is_blhc 'buildd-dpkg-dev', '--ignore-arch i386', 0,
951 "ignoring architecture 'i386'\n";
956 is_blhc 'debian', '', 8,
957 'CPPFLAGS missing (-D_FORTIFY_SOURCE=2): gcc -g -O2 -fstack-protector-strong -Wformat -Wformat-security -Werror=format-security -Wall -c test.c
958 CPPFLAGS missing (-D_FORTIFY_SOURCE=2): gcc -c `dpkg-buildflags --get CFLAGS` test.c
959 CPPFLAGS missing (-D_FORTIFY_SOURCE=2): g++ -c `dpkg-buildflags --get CXXFLAGS` test.cc
960 CFLAGS missing (-g -O2 -fstack-protector-strong -Wformat -Werror=format-security): gcc -c `dpkg-buildflags --get LDFLAGS` test.c
961 CPPFLAGS missing (-D_FORTIFY_SOURCE=2): gcc -c `dpkg-buildflags --get LDFLAGS` test.c
962 LDFLAGS missing (-Wl,-z,relro): gcc -o test test.o `dpkg-buildflags --get CFLAGS`
965 is_blhc 'debian', '--line-numbers', 8,
966 '9:CPPFLAGS missing (-D_FORTIFY_SOURCE=2): gcc -g -O2 -fstack-protector-strong -Wformat -Wformat-security -Werror=format-security -Wall -c test.c
967 13:CPPFLAGS missing (-D_FORTIFY_SOURCE=2): gcc -c `dpkg-buildflags --get CFLAGS` test.c
968 14:CPPFLAGS missing (-D_FORTIFY_SOURCE=2): g++ -c `dpkg-buildflags --get CXXFLAGS` test.cc
969 15:CFLAGS missing (-g -O2 -fstack-protector-strong -Wformat -Werror=format-security): gcc -c `dpkg-buildflags --get LDFLAGS` test.c
970 15:CPPFLAGS missing (-D_FORTIFY_SOURCE=2): gcc -c `dpkg-buildflags --get LDFLAGS` test.c
971 19:LDFLAGS missing (-Wl,-z,relro): gcc -o test test.o `dpkg-buildflags --get CFLAGS`
974 is_blhc 'debian-cmake', '', 32,
975 'INVALID CMAKE: 2.8.7-1
977 is_blhc 'debian-cmake-2', '', 32,
978 'INVALID CMAKE: 2.8.7-2
980 is_blhc 'debian-cmake-ok', '', 0,
983 my $debian_hardening_wrapper =
984 'HARDENING WRAPPER: no checks possible, aborting
986 is_blhc 'debian-hardening-wrapper', '', 16,
987 $debian_hardening_wrapper;
988 is_blhc 'debian-hardening-wrapper-old-build-depends', '', 16,
989 $debian_hardening_wrapper;
990 is_blhc 'debian-hardening-wrapper-pbuilder', '', 16,
991 $debian_hardening_wrapper;
996 is_blhc 'false-positives', '', 0,
1002 is_blhc 'empty', '--buildd', 0,
1003 'I-no-compiler-commands||
1006 is_blhc 'buildd-package-details', '--buildd', 0,
1009 is_blhc 'buildd-dpkg-dev', '--buildd', 0,
1010 'W-dpkg-buildflags-missing|CPPFLAGS 7 (of 7), CFLAGS 6 (of 6), CXXFLAGS 1 (of 1), LDFLAGS 2 (of 2) missing|
1013 is_blhc 'buildd-dpkg-dev-old', '--buildd', 0,
1014 'W-dpkg-buildflags-missing|CFLAGS 3 (of 6), CXXFLAGS 1 (of 1) missing|
1017 is_blhc 'buildd-dpkg-dev-missing', '--buildd', 0,
1018 'W-dpkg-buildflags-missing|CFLAGS 3 (of 6), CXXFLAGS 1 (of 1) missing|
1021 is_blhc 'buildd-gcc-pie', '--buildd --all', 0,
1022 'W-dpkg-buildflags-missing|CFLAGS 1 (of 1), LDFLAGS 1 (of 1) missing|
1024 is_blhc 'buildd-gcc-pie-builtin-wrong-arch', '--buildd --all', 0,
1025 'W-dpkg-buildflags-missing|CFLAGS 1 (of 1), LDFLAGS 1 (of 1) missing|
1027 is_blhc 'buildd-gcc-pie-builtin', '--buildd', 0, '';
1028 is_blhc 'buildd-gcc-pie-builtin', '--buildd --all', 0, '';
1030 # Older dpkg versions use -fstack-protector instead of -strong.
1031 is_blhc 'buildd-dpkg-fstack-protector', '--buildd', 0,
1033 is_blhc 'buildd-dpkg-fstack-protector-missing', '--buildd', 0,
1034 'W-dpkg-buildflags-missing|CFLAGS 5 (of 5) missing|
1037 is_blhc 'debian-hardening-wrapper', '--buildd', 0,
1038 'I-hardening-wrapper-used||
1040 is_blhc 'debian-hardening-wrapper-pbuilder', '--buildd', 0,
1041 'I-hardening-wrapper-used||
1044 is_blhc 'buildd-verbose-build', '--buildd', 0,
1045 'W-compiler-flags-hidden|3 (of 5) hidden|
1048 is_blhc 'make', '--buildd', 0,
1049 'I-no-compiler-commands||
1052 is_blhc 'debian-cmake', '--buildd', 0,
1053 'I-invalid-cmake-used|2.8.7-1|
1057 # debian specific settings
1059 is_blhc 'debian-gcc-pie', '--debian', 0, '';
1064 is_blhc ['good', 'good-pie', 'good-bindnow', 'good-all', 'good-multiline', 'good-library'], '', 0,
1065 "checking './t/logs/good'...
1066 checking './t/logs/good-pie'...
1067 checking './t/logs/good-bindnow'...
1068 checking './t/logs/good-all'...
1069 checking './t/logs/good-multiline'...
1070 checking './t/logs/good-library'...
1072 is_blhc ['good-all', 'good-library'], '--all', 0,
1073 "checking './t/logs/good-all'...
1074 checking './t/logs/good-library'...
1077 is_blhc ['arch-i386', 'arch-ia64'], '', 8,
1078 "checking './t/logs/arch-i386'...\n"
1080 . "checking './t/logs/arch-ia64'...\n"
1083 # No exit when multiple files are specified.
1084 is_blhc ['bad-ldflags', 'empty', 'arch-avr32', 'debian-hardening-wrapper'], '', 25,
1085 "checking './t/logs/bad-ldflags'...\n"
1087 . "checking './t/logs/empty'...\n"
1089 . "checking './t/logs/arch-avr32'...\n"
1091 . "checking './t/logs/debian-hardening-wrapper'...\n"
1092 . $debian_hardening_wrapper
1095 # Ignore works correctly with multiple architectures.
1096 is_blhc ['arch-i386', 'arch-amd64', 'arch-avr32', 'ignore-flag'],
1097 '--ignore-arch-flag i386:-fstack-protector-strong --ignore-arch-flag mipsel:-Werror=format-security', 8,
1098 "checking './t/logs/arch-i386'...
1099 LDFLAGS missing (-pie): gcc -fPIE -Wl,-z,relro -Wl,-z,now -o test test.o
1100 checking './t/logs/arch-amd64'...
1101 CFLAGS missing (-fstack-protector-strong): gcc -D_FORTIFY_SOURCE=2 -g -O2 -fPIE -Wformat -Wformat-security -Werror=format-security -Wall -c test.c
1102 LDFLAGS missing (-pie): gcc -fPIE -Wl,-z,relro -Wl,-z,now -o test test.o
1103 checking './t/logs/arch-avr32'...
1104 CFLAGS missing (-fstack-protector-strong): gcc -D_FORTIFY_SOURCE=2 -g -O2 -Wformat -Wformat-security -Werror=format-security -Wall -c test.c
1105 checking './t/logs/ignore-flag'...
1106 CFLAGS missing (-g): gcc -O2 -fstack-protector-strong -Wformat -Wformat-security -Werror=format-security -D_FORTIFY_SOURCE=2 -c test-b.c
1107 CFLAGS missing (-O2): gcc -g -fstack-protector-strong -Wformat -Wformat-security -Werror=format-security -D_FORTIFY_SOURCE=2 -c test-c.c
1111 is_blhc ['arch-i386', 'arch-amd64', 'arch-avr32', 'ignore-line'],
1112 '--ignore-arch-line "i386:gcc .+ -fPIE .+" --ignore-arch-line "mipsel:gcc .+ -Wl,-z,relro -Wl,-z,now .+"', 8,
1113 "checking './t/logs/arch-i386'...
1114 LDFLAGS missing (-pie): gcc -fPIE -Wl,-z,relro -Wl,-z,now -o test test.o
1115 checking './t/logs/arch-amd64'...
1116 CFLAGS missing (-fstack-protector-strong): gcc -D_FORTIFY_SOURCE=2 -g -O2 -fPIE -Wformat -Wformat-security -Werror=format-security -Wall -c test.c
1117 LDFLAGS missing (-pie): gcc -fPIE -Wl,-z,relro -Wl,-z,now -o test test.o
1118 checking './t/logs/arch-avr32'...
1119 CFLAGS missing (-fstack-protector-strong): gcc -D_FORTIFY_SOURCE=2 -g -O2 -Wformat -Wformat-security -Werror=format-security -Wall -c test.c
1120 checking './t/logs/ignore-line'...
1121 CFLAGS missing (-g -O2 -fstack-protector-strong -Wformat -Werror=format-security): ./prepare-script gcc test-a.c test-b.c test-c.c
1122 CPPFLAGS missing (-D_FORTIFY_SOURCE=2): ./prepare-script gcc test-a.c test-b.c test-c.c
1123 LDFLAGS missing (-Wl,-z,relro): ./prepare-script gcc test-a.c test-b.c test-c.c
1124 CFLAGS missing (-g -O2 -fstack-protector-strong -Wformat -Werror=format-security): ./prepare-script gcc test-a.c
1125 CPPFLAGS missing (-D_FORTIFY_SOURCE=2): ./prepare-script gcc test-a.c
1126 LDFLAGS missing (-Wl,-z,relro): ./prepare-script gcc test-a.c
1127 CFLAGS missing (-g -O2 -fstack-protector-strong -Wformat -Werror=format-security): ./prepare-script gcc test-b.c
1128 CPPFLAGS missing (-D_FORTIFY_SOURCE=2): ./prepare-script gcc test-b.c
1129 LDFLAGS missing (-Wl,-z,relro): ./prepare-script gcc test-b.c
1130 CFLAGS missing (-g -O2 -fstack-protector-strong -Wformat -Werror=format-security): ./prepare-script gcc test-c.c
1131 CPPFLAGS missing (-D_FORTIFY_SOURCE=2): ./prepare-script gcc test-c.c
1132 LDFLAGS missing (-Wl,-z,relro): ./prepare-script gcc test-c.c