]> ruderich.org/simon Gitweb - blhc/blhc.git/blobdiff - t/logs/bad-cflags
First working version.
[blhc/blhc.git] / t / logs / bad-cflags
diff --git a/t/logs/bad-cflags b/t/logs/bad-cflags
new file mode 100644 (file)
index 0000000..3f47182
--- /dev/null
@@ -0,0 +1,8 @@
+gcc -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat-security -Werror=format-security -D_FORTIFY_SOURCE=2 -c test-a.c
+gcc -g -O2 -fstack-protector -Wformat -Wformat-security -Werror=format-security -D_FORTIFY_SOURCE=2 -c test-b.c
+gcc -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Wformat-security -D_FORTIFY_SOURCE=2 -c test-c.c
+gcc -Wl,-z,relro -o test test-a.o test-b.o test-c.o -ltest
+
+# Compiling and linking in one step must also check CFLAGS/CPPFLAGS.
+gcc -Wl,-z,relro -o test test.c -ltest
+gcc -shared -fPIC -Wl,-z,relro -o test.so test.c -ltest