mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
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
1 changed files with 8 additions and 1 deletions
|
@ -419,6 +419,8 @@ AC_SUBST(LD)
|
|||
if test "$GCC" = yes; then
|
||||
linker_flag=-Wl,
|
||||
: ${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"])
|
||||
else
|
||||
linker_flag=
|
||||
|
@ -664,6 +666,11 @@ AC_ARG_ENABLE(werror,
|
|||
|
||||
rb_cv_warnflags="$warnflags"
|
||||
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 \
|
||||
-Wno-missing-field-initializers \
|
||||
-Wunused-variable \
|
||||
|
@ -672,7 +679,7 @@ if test "$GCC:${warnflags+set}:no" = yes::no; then
|
|||
-Werror=declaration-after-statement \
|
||||
-Werror=shorten-64-to-32 \
|
||||
-Werror=implicit-function-declaration \
|
||||
-Werror=extra-tokens \
|
||||
$extra_warning \
|
||||
; do
|
||||
if test "$particular_werror_flags" != yes; then
|
||||
wflag=`echo x$wflag | sed 's/^x-Werror=/-W/;s/^x//'`
|
||||
|
|
Loading…
Reference in a new issue