+# -Wformat-security is implied by -Werror=format-security and no longer used
+# since dpkg >= 1.16.3.
+gcc -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -c test-a.c
+gcc -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -c test-b.c
+gcc -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -c test-c.c
+gcc -g -O3 -fstack-protector-strong -Wformat -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
+
+# -Wformat=2 implies -Wformat.
+gcc -g -O2 -fstack-protector-strong -Wformat=2 -Werror=format-security -D_FORTIFY_SOURCE=2 -c test.c
+