summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog4
-rw-r--r--configure.in4
2 files changed, 8 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index 14c41aad7a..aed51302d9 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+Fri Mar 15 14:45:02 2013 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
+
+ * configure.in (_FORTIFY_SOURCE): added a few comments.
+
Fri Mar 15 14:17:55 2013 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
* thread_pthread.c (numberof): renamed from ARRAY_SIZE() because
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