1 dpkg-buildpackage: source package test
3 gcc -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat-security -Werror=format-security -D_FORTIFY_SOURCE=2 -c test-a.c
4 gcc -g -O2 -fstack-protector -Wformat -Wformat-security -Werror=format-security -D_FORTIFY_SOURCE=2 -c test-b.c
5 gcc -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Wformat-security -D_FORTIFY_SOURCE=2 -c test-c.c
6 gcc -Wl,-z,relro -o test test-a.o test-b.o test-c.o -ltest
8 # Compiling and linking in one step must also check CFLAGS/CPPFLAGS.
9 gcc -Wl,-z,relro -o test test.c -ltest
10 gcc -shared -fPIC -Wl,-z,relro -o test.so test.c -ltest
12 gcc -fPIC -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat-security -Werror=format-security -c -D_FORTIFY_SOURCE=2 ../../../../src/test/test.c -o test.so.o
14 gcc test.c -o test.output
16 (gcc -Wl,-z,relro -o test.output test.c)