diff options
author | kosaki <kosaki@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2011-11-24 23:50:00 +0000 |
---|---|---|
committer | kosaki <kosaki@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2011-11-24 23:50:00 +0000 |
commit | 98975ba9dc6781083275e26aac4fbe29d689a7f6 (patch) | |
tree | dc144337630e12b7c0ae364406fcdfd5a5315617 /configure.in | |
parent | b2eae7891b8a808f7f737833fbaf84b0d467377c (diff) | |
download | ruby-98975ba9dc6781083275e26aac4fbe29d689a7f6.tar.gz |
* configure.in: turn on PIE if --enable-shared is not specified.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33837 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'configure.in')
-rw-r--r-- | configure.in | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/configure.in b/configure.in index caef7d6684..30be256903 100644 --- a/configure.in +++ b/configure.in @@ -2350,6 +2350,12 @@ AS_CASE("$enable_shared", [yes], [ ]) ], [ LIBRUBYARG_SHARED= + + # enable PIE if possible + if test "$GCC" = yes; then + RUBY_TRY_CFLAGS(-fPIE, [RUBY_APPEND_OPTION(XCFLAGS, -fPIE) + RUBY_APPEND_OPTION(XLDFLAGS, -pie)]) + fi ]) if test "$enable_rpath" = yes; then test -z "$LIBRUBY_RPATHFLAGS" || LIBRUBY_RPATHFLAGS="$LIBRUBY_RPATHFLAGS " |