aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog4
-rw-r--r--configure.in3
2 files changed, 7 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index d5bd5613a5..a5c2687f1e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+Mon Feb 20 15:50:33 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * configure.in: check if -fstack-protector is really available.
+
Sun Feb 19 23:43:38 2012 Tanaka Akira <akr@fsij.org>
* ext/dbm/extconf.rb: show header and library found.
diff --git a/configure.in b/configure.in
index 2b56b749d4..7b14caa571 100644
--- a/configure.in
+++ b/configure.in
@@ -505,6 +505,9 @@ if test "$GCC" = yes; then
],
[
RUBY_TRY_CFLAGS(-fstack-protector, [stack_protector=yes], [stack_protector=no])
+ if test "x$stack_protector" = xyes; then
+ RUBY_TRY_LDFLAGS(-fstack-protector, [], [stack_protector=broken])
+ fi
])
if test "x$stack_protector" = xyes; then
RUBY_APPEND_OPTION(XCFLAGS, -fstack-protector)