* 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
This commit is contained in:
nobu 2012-04-30 12:09:09 +00:00
Родитель ce007c7c86
Коммит 860cf7b812
2 изменённых файлов: 15 добавлений и 2 удалений

Просмотреть файл

@ -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

Просмотреть файл

@ -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\""