diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2012-04-30 12:09:09 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2012-04-30 12:09:09 +0000 |
commit | 860cf7b8121bbb7ca4fa0191fef08587a826ba0c (patch) | |
tree | 19d7014ea6be591cb64c1809763605b447d0e9e9 | |
parent | ce007c7c86b4f6793179088937d23b5b01962118 (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
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | configure.in | 12 |
2 files changed, 15 insertions, 2 deletions
@@ -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 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\"" |