summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rw-r--r--configure.in12
2 files changed, 15 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index c1141202c14..35bcc5fb784 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Mon Apr 30 21:09:06 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * configure.in (optflags): disable unsafe optimizations.
+ [ruby-core:44679][Bug #6370]
+
Mon Apr 30 20:10:04 2012 Tanaka Akira <akr@fsij.org>
* ext/zlib/extconf.rb: detect z_crc_t type which will be defined
diff --git a/configure.in b/configure.in
index e40354af89b..e71aeb3c032 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\""