1 dpkg-buildpackage: source package test
3 gcc -g -O2 -fstack-protector-strong -Wformat-security -Werror=format-security -D_FORTIFY_SOURCE=2 -c test-a.c
4 gcc -g -O2 -Wformat -Wformat-security -Werror=format-security -D_FORTIFY_SOURCE=2 -c test-b.c
5 gcc -g -O2 -fstack-protector-strong -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-strong -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)