* configure.in: add -fstack-protector. It help to protect us from

stack smashing attack.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33836 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
kosaki 2011-11-24 23:06:26 +00:00
parent d0e615e25f
commit b2eae7891b
2 changed files with 6 additions and 0 deletions

View file

@ -1,3 +1,8 @@
Fri Nov 25 08:05:07 2011 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
* configure.in: add -fstack-protector. It help to protect us from
stack smashing attack.
Fri Nov 25 08:03:28 2011 KOSAKI Motohiro <kosaki.motohiro@gmail.com> Fri Nov 25 08:03:28 2011 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
* configure.in: add -D_FORTIFY_SOURCE=2. It provide some compile * configure.in: add -D_FORTIFY_SOURCE=2. It provide some compile

View file

@ -497,6 +497,7 @@ if test "$GCC:${warnflags+set}:no" = yes::no; then
fi fi
if test "$GCC" = yes; then if test "$GCC" = yes; then
RUBY_TRY_CFLAGS(-D_FORTIFY_SOURCE=2, [RUBY_APPEND_OPTION(XCFLAGS, -D_FORTIFY_SOURCE=2)]) RUBY_TRY_CFLAGS(-D_FORTIFY_SOURCE=2, [RUBY_APPEND_OPTION(XCFLAGS, -D_FORTIFY_SOURCE=2)])
RUBY_TRY_CFLAGS(-fstack-protector, [RUBY_APPEND_OPTION(XCFLAGS, -fstack-protector)])
fi fi
if test "$GCC" = ""; then if test "$GCC" = ""; then