diff options
author | kosaki <kosaki@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2011-11-24 23:04:35 +0000 |
---|---|---|
committer | kosaki <kosaki@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2011-11-24 23:04:35 +0000 |
commit | d0e615e25f839d32507bcccb593d5fc3c28db28c (patch) | |
tree | f9b30352a76a78a07bc4a21b96ff6e5413339b3b /configure.in | |
parent | b418bc9be47ac63da559cb4bbdf705d83d99cde2 (diff) | |
download | ruby-d0e615e25f839d32507bcccb593d5fc3c28db28c.tar.gz |
* configure.in: add -D_FORTIFY_SOURCE=2. It provide some compile
time and runtime check for security.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33835 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'configure.in')
-rw-r--r-- | configure.in | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/configure.in b/configure.in index 24aa84d149..827bece224 100644 --- a/configure.in +++ b/configure.in @@ -495,6 +495,10 @@ if test "$GCC:${warnflags+set}:no" = yes::no; then rb_cv_warnflags="$warnflags" warnflags= fi +if test "$GCC" = yes; then + RUBY_TRY_CFLAGS(-D_FORTIFY_SOURCE=2, [RUBY_APPEND_OPTION(XCFLAGS, -D_FORTIFY_SOURCE=2)]) +fi + if test "$GCC" = ""; then AS_CASE(["$target_os"],[aix*],[warnflags="-qinfo=por"]) fi |