Project

General

Profile

Backport #7830 » disable-werror.patch

add --disable-werror new configure option - kosaki (Motohiro KOSAKI), 02/12/2013 11:28 AM

View differences:

ChangeLog
Tue Feb 12 04:11:09 2013 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
* configure.in: added --disable-werror option.
[Bug #7830] [ruby-core:52131]
Mon Feb 11 23:08:48 2013 Tanaka Akira <akr@fsij.org>
* configure.in: enable rb_cv_page_size_log test for MirOS BSD.
configure.in
save_LDFLAGS=
])
AC_ARG_ENABLE(werror,
AS_HELP_STRING([--disable-werror],
[don't make warnings into errors even if a compiler support -Werror feature.]),
[particular_werror_flags=$enableval], [particular_werror_flags=yes])
rb_cv_warnflags="$warnflags"
if test "$GCC:${warnflags+set}:no" = yes::no; then
particular_werror_flags=yes
for wflag in -Wno-unused-parameter -Wno-parentheses -Wno-long-long \
-Wno-missing-field-initializers \
-Wunused-variable \
......
-Werror=write-strings \
-Werror=declaration-after-statement \
-Werror=shorten-64-to-32 \
-Werror-implicit-function-declaration \
-Werror=implicit-function-declaration \
; do
if test "$particular_werror_flags" = yes; then
wflag=`echo x$wflag | sed 's/^x-Werror-/-Werror=/;s/^x//'`
else
if test "$particular_werror_flags" = no; then
wflag=`echo x$wflag | sed 's/^x-Werror=/-W/;s/^x//'`
fi
ok=no
(1-1/2)