);
my @def_cflags_stack = (
'-fstack-protector',
- '--param=ssp-buffer-size=4',
+ '--param[= ]ssp-buffer-size=4',
);
my @def_cflags_pie = (
'-fPIE',
my %flag_renames = (
'-O(?:2|3)' => '-O2',
'-Wformat(?:=2)?' => '-Wformat',
+ '--param[= ]ssp-buffer-size=4' => '--param=ssp-buffer-size=4',
'-Wl,(?:-z,)?relro' => '-Wl,-z,relro',
'-Wl,(?:-z,)?now' => '-Wl,-z,now',
);
gcc -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Wformat-security -Werror=format-security -D_FORTIFY_SOURCE=2 -Wl,-z,relro -o test test.c -ltest
gcc -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Wformat-security -Werror=format-security -D_FORTIFY_SOURCE=2 -shared -fPIC -Wl,-z,relro -o test.so test.c -ltest
+# --parm=ssp-buffer-size=4 can also be written with a space.
+gcc -g -O2 -fstack-protector --param ssp-buffer-size=4 -Wformat -Wformat-security -Werror=format-security -D_FORTIFY_SOURCE=2 -c test.c
+
g++ -D_FORTIFY_SOURCE=2 -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Wformat-security -Werror=format-security -pthread -o ./testProgram -Wl,-z,relro ../src/test/testProgram.cpp
g++ -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Wformat-security -Werror=format-security -pthread -Wl,-z,relro -o ../src/test/bin/test ../src/test/objs/test.o