configure.in: no -Wextra-token on gcc 3
* configure.in (warnflags): -Wextra-tokens is same as -Wextra and let -Wno- options ignored on gcc 3. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40131 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
647dc4fd49
commit
b493f30a42
@ -419,6 +419,8 @@ AC_SUBST(LD)
|
|||||||
if test "$GCC" = yes; then
|
if test "$GCC" = yes; then
|
||||||
linker_flag=-Wl,
|
linker_flag=-Wl,
|
||||||
: ${optflags=-O3}
|
: ${optflags=-O3}
|
||||||
|
gcc_major=`echo =__GNUC__ | $CC -E -xc - | sed '/^=/!d;s///'`
|
||||||
|
test -n "$gcc_major" || gcc_major=0
|
||||||
# RUBY_APPEND_OPTIONS(XCFLAGS, ["-include ruby/config.h" "-include ruby/missing.h"])
|
# RUBY_APPEND_OPTIONS(XCFLAGS, ["-include ruby/config.h" "-include ruby/missing.h"])
|
||||||
else
|
else
|
||||||
linker_flag=
|
linker_flag=
|
||||||
@ -664,6 +666,11 @@ AC_ARG_ENABLE(werror,
|
|||||||
|
|
||||||
rb_cv_warnflags="$warnflags"
|
rb_cv_warnflags="$warnflags"
|
||||||
if test "$GCC:${warnflags+set}:no" = yes::no; then
|
if test "$GCC:${warnflags+set}:no" = yes::no; then
|
||||||
|
if test $gcc_major -ge 4; then
|
||||||
|
extra_warning=-Werror=extra-tokens
|
||||||
|
else
|
||||||
|
extra_warning=
|
||||||
|
fi
|
||||||
for wflag in -Wno-unused-parameter -Wno-parentheses -Wno-long-long \
|
for wflag in -Wno-unused-parameter -Wno-parentheses -Wno-long-long \
|
||||||
-Wno-missing-field-initializers \
|
-Wno-missing-field-initializers \
|
||||||
-Wunused-variable \
|
-Wunused-variable \
|
||||||
@ -672,7 +679,7 @@ if test "$GCC:${warnflags+set}:no" = yes::no; then
|
|||||||
-Werror=declaration-after-statement \
|
-Werror=declaration-after-statement \
|
||||||
-Werror=shorten-64-to-32 \
|
-Werror=shorten-64-to-32 \
|
||||||
-Werror=implicit-function-declaration \
|
-Werror=implicit-function-declaration \
|
||||||
-Werror=extra-tokens \
|
$extra_warning \
|
||||||
; do
|
; do
|
||||||
if test "$particular_werror_flags" != yes; then
|
if test "$particular_werror_flags" != yes; then
|
||||||
wflag=`echo x$wflag | sed 's/^x-Werror=/-W/;s/^x//'`
|
wflag=`echo x$wflag | sed 's/^x-Werror=/-W/;s/^x//'`
|
||||||
|
Loading…
x
Reference in New Issue
Block a user