From: Simon Ruderich Date: Mon, 24 Sep 2012 11:24:01 +0000 (+0200) Subject: Also accept --param ssp-buffer-size=4. X-Git-Tag: 0.04~9 X-Git-Url: https://ruderich.org/simon/gitweb/?a=commitdiff_plain;h=959cbe56d9b89868c42c2ae0082771eea8f31d1a;p=blhc%2Fblhc.git Also accept --param ssp-buffer-size=4. Space instead of equals sign after --param. --- diff --git a/bin/blhc b/bin/blhc index b77420d..c13f3b6 100755 --- a/bin/blhc +++ b/bin/blhc @@ -190,7 +190,7 @@ my @def_cflags_fortify = ( ); my @def_cflags_stack = ( '-fstack-protector', - '--param=ssp-buffer-size=4', + '--param[= ]ssp-buffer-size=4', ); my @def_cflags_pie = ( '-fPIE', @@ -252,6 +252,7 @@ my @flag_refs_all = ( 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', ); diff --git a/t/logs/good b/t/logs/good index 9837879..a345c7b 100644 --- a/t/logs/good +++ b/t/logs/good @@ -27,6 +27,9 @@ gcc -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat=2 -Werror=format 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