summaryrefslogtreecommitdiff
path: root/configure.in
diff options
context:
space:
mode:
authorkosaki <kosaki@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-11-27 12:27:00 +0000
committerkosaki <kosaki@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-11-27 12:27:00 +0000
commit543820885ee691d70e0d5c36246bdfdf8a1eddd3 (patch)
tree3dc9417c379e1d6f07ca57ceb16ea9c1d00aaa32 /configure.in
parent8cee31214df54281a93c8fe135a5fd36fd7e288a (diff)
* configure.in: added -fno-strict-overflow. it suppress annoying
-Wstrict-overflow warning. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33872 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'configure.in')
-rw-r--r--configure.in6
1 files changed, 6 insertions, 0 deletions
diff --git a/configure.in b/configure.in
index a57cec93a1..b17c280735 100644
--- a/configure.in
+++ b/configure.in
@@ -496,7 +496,10 @@ if test "$GCC:${warnflags+set}:no" = yes::no; then
warnflags=
fi
if test "$GCC" = yes; then
+ # -D_FORTIFY_SOURCE
RUBY_TRY_CFLAGS(-D_FORTIFY_SOURCE=2, [RUBY_APPEND_OPTION(XCFLAGS, -D_FORTIFY_SOURCE=2)])
+
+ # -fstack-protector
AS_CASE(["$target_os"],
[mingw*], [
stack_protector=no
@@ -508,6 +511,9 @@ if test "$GCC" = yes; then
RUBY_APPEND_OPTION(XCFLAGS, -fstack-protector)
RUBY_APPEND_OPTION(XLDFLAGS, -fstack-protector)
fi
+
+ # suppress annoying -Wstrict-overflow warnings
+ RUBY_TRY_CFLAGS(-fno-strict-overflow, [RUBY_APPEND_OPTION(XCFLAGS, -fno-strict-overflow)])
fi
if test "$GCC" = ""; then