* configure.in (RUBY_WERROR_FLAG): append all warning flags which

are enabled to compile, so that printf format modifiers properly
  fail.  [ruby-core:41351] [Bug #5679]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33978 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2011-12-08 03:11:11 +00:00
Родитель 3e204989c1
Коммит f2747b5782
2 изменённых файлов: 11 добавлений и 4 удалений

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

@ -1,3 +1,9 @@
Thu Dec 8 12:11:06 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
* configure.in (RUBY_WERROR_FLAG): append all warning flags which
are enabled to compile, so that printf format modifiers properly
fail. [ruby-core:41351] [Bug #5679]
Thu Dec 8 07:20:15 2011 Eric Hodel <drbrain@segment7.net> Thu Dec 8 07:20:15 2011 Eric Hodel <drbrain@segment7.net>
* doc/re.rdoc: Document difference between match and =~, options with * doc/re.rdoc: Document difference between match and =~, options with

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

@ -418,6 +418,8 @@ dnl }
dnl compiler section { dnl compiler section {
AC_DEFUN([RUBY_WERROR_FLAG], [dnl AC_DEFUN([RUBY_WERROR_FLAG], [dnl
save_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS $rb_cv_warnflags"
if test "${ac_c_werror_flag+set}"; then if test "${ac_c_werror_flag+set}"; then
rb_c_werror_flag="$ac_c_werror_flag" rb_c_werror_flag="$ac_c_werror_flag"
else else
@ -425,6 +427,8 @@ else
fi fi
ac_c_werror_flag=yes ac_c_werror_flag=yes
$1 $1
CFLAGS="$save_CFLAGS"
save_CFLAGS=
if test "${rb_c_werror_flag+set}"; then if test "${rb_c_werror_flag+set}"; then
ac_c_werror_flag="$rb_c_werror_flag" ac_c_werror_flag="$rb_c_werror_flag"
else else
@ -432,18 +436,15 @@ else
fi]) fi])
AC_DEFUN(RUBY_TRY_CFLAGS, [ AC_DEFUN(RUBY_TRY_CFLAGS, [
save_CFLAGS="$CFLAGS"
CFLAGS="[$]CFLAGS $1"
AC_MSG_CHECKING([whether ]$1[ is accepted as CFLAGS]) AC_MSG_CHECKING([whether ]$1[ is accepted as CFLAGS])
RUBY_WERROR_FLAG([ RUBY_WERROR_FLAG([
CFLAGS="[$]CFLAGS $1"
AC_TRY_COMPILE([$4], [$5], AC_TRY_COMPILE([$4], [$5],
[$2 [$2
AC_MSG_RESULT(yes)], AC_MSG_RESULT(yes)],
[$3 [$3
AC_MSG_RESULT(no)]) AC_MSG_RESULT(no)])
]) ])
CFLAGS="$save_CFLAGS"
save_CFLAGS=
]) ])
AC_DEFUN(RUBY_TRY_LDFLAGS, [ AC_DEFUN(RUBY_TRY_LDFLAGS, [