summaryrefslogtreecommitdiff
path: root/configure.in
diff options
context:
space:
mode:
authorkosaki <kosaki@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-03-16 05:06:32 +0000
committerkosaki <kosaki@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-03-16 05:06:32 +0000
commit2e544471ae719757a0fec2a686bdeb7a97540c90 (patch)
tree0704082acc89152201a1bca248c250838eff4fcf /configure.in
parente1807e59951d4280895dd3f2c2fc4a774ad3fe6a (diff)
* configure.in (_FORTIFY_SOURCE): added a few comments.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39771 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'configure.in')
-rw-r--r--configure.in4
1 files changed, 4 insertions, 0 deletions
diff --git a/configure.in b/configure.in
index d166664a7f..89422b4f72 100644
--- a/configure.in
+++ b/configure.in
@@ -684,6 +684,10 @@ if test "$GCC" = yes; then
test "${debugflags+set}" || {RUBY_TRY_CFLAGS(-g3, [debugflags=-g3])}
# -D_FORTIFY_SOURCE
+ # When defined _FORTIFY_SOURCE, glibc enables some additional sanity
+ # argument check. The performance drop is very little and Ubuntu enables
+ # _FORTIFY_SOURCE=2 by default. So, let's support it for protecting us from
+ # a mistake of silly C extensions.
RUBY_TRY_CFLAGS(-D_FORTIFY_SOURCE=2, [RUBY_APPEND_OPTION(XCFLAGS, -D_FORTIFY_SOURCE=2)])
# -fstack-protector