summaryrefslogtreecommitdiff
path: root/configure.in
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-04-30 12:09:09 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-04-30 12:09:09 +0000
commit860cf7b8121bbb7ca4fa0191fef08587a826ba0c (patch)
tree19d7014ea6be591cb64c1809763605b447d0e9e9 /configure.in
parentce007c7c86b4f6793179088937d23b5b01962118 (diff)
* configure.in (optflags): disable unsafe optimizations.
[ruby-core:44679][Bug #6370] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35497 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'configure.in')
-rw-r--r--configure.in12
1 files changed, 10 insertions, 2 deletions
diff --git a/configure.in b/configure.in
index e40354af89..e71aeb3c03 100644
--- a/configure.in
+++ b/configure.in
@@ -479,11 +479,14 @@ if test "$GCC:${warnflags+set}:no" = yes::no; then
wflag=`echo x$wflag | sed 's/^x-Werror=/-W/;s/^x//'`
fi
ok=no
- RUBY_TRY_CFLAGS($wflag, [warnflags="${warnflags+$warnflags }$wflag" ok=yes])
+ RUBY_TRY_CFLAGS($wflag, [
+ RUBY_APPEND_OPTIONS(warnflags, $wflag)
+ ok=yes
+ ])
AS_CASE([$ok:$wflag], [no:-Werror=*], [
wflag=`echo x$wflag | sed 's/^x-Werror=/-W/'`
RUBY_TRY_CFLAGS($wflag, [
- warnflags="${warnflags+$warnflags }$wflag"
+ RUBY_APPEND_OPTIONS(warnflags, $wflag)
particular_werror_flags=no
])
])
@@ -539,9 +542,14 @@ if test "$GCC" = yes; then
fi
if test "$GCC" = yes; then
+ # optflags
+
AS_CASE(["$target_os"], [mingw*], [
RUBY_TRY_CFLAGS(-fno-omit-frame-pointer, [optflags="${optflags+$optflags }-fno-omit-frame-pointer"])
])
+
+ # disable fast-math
+ RUBY_TRY_CFLAGS(-fno-fast-math, [RUBY_APPEND_OPTION(optflags, $oflag)])
fi
test -z "${ac_env_CFLAGS_set}" -a -n "${cflags+set}" && eval CFLAGS="\"$cflags $ARCH_FLAG\""