diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2011-11-27 09:25:38 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2011-11-27 09:25:38 +0000 |
commit | c4cd97a56359a800f94ceca7fbb4450ff30359ca (patch) | |
tree | a1e21fd3aae59ddf781e71a604d523b80c03713d /configure.in | |
parent | 929e69fdca0a95c83040fffaccff055f615bb5e6 (diff) | |
download | ruby-c4cd97a56359a800f94ceca7fbb4450ff30359ca.tar.gz |
* configure.in (-fstack-protector): also needed in DLDFLAGS.
[Bug#5676]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33868 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'configure.in')
-rw-r--r-- | configure.in | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/configure.in b/configure.in index 620f320ddd..510f0ebdcd 100644 --- a/configure.in +++ b/configure.in @@ -497,8 +497,12 @@ if test "$GCC:${warnflags+set}:no" = yes::no; then fi if test "$GCC" = yes; then 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) - RUBY_APPEND_OPTION(XLDFLAGS, -fstack-protector)]) + RUBY_TRY_CFLAGS(-fstack-protector, [stack_protector=yes], [stack_protector=no]) + if test "x$stack_protector" = xyes; then + RUBY_APPEND_OPTION(XCFLAGS, -fstack-protector) + RUBY_APPEND_OPTION(XLDFLAGS, -fstack-protector) + RUBY_APPEND_OPTION(DLDFLAGS, -fstack-protector) + fi fi if test "$GCC" = ""; then |