mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2024-12-03 07:14:18 +08:00
sim: v850: cleanup build warnings
This port only had one minor warning left in it, so fix it and then enable -Werror behavior by deleting the macro call. We'll use the common default now (which is -Werror).
This commit is contained in:
parent
44b30b7f0e
commit
5f05936d9b
@ -1,3 +1,9 @@
|
|||||||
|
2021-01-31 Mike Frysinger <vapier@gentoo.org>
|
||||||
|
|
||||||
|
* simops.c: Include stdlib.h.
|
||||||
|
* configure.ac (SIM_AC_OPTION_WARNINGS): Delete call.
|
||||||
|
* configure: Regenerate.
|
||||||
|
|
||||||
2021-01-31 Mike Frysinger <vapier@gentoo.org>
|
2021-01-31 Mike Frysinger <vapier@gentoo.org>
|
||||||
|
|
||||||
* simops.c (OP_10007E0): Change reterr to RETERR.
|
* simops.c (OP_10007E0): Change reterr to RETERR.
|
||||||
|
223
sim/v850/configure
vendored
223
sim/v850/configure
vendored
@ -782,11 +782,11 @@ with_pkgversion
|
|||||||
with_bugurl
|
with_bugurl
|
||||||
enable_sim_endian
|
enable_sim_endian
|
||||||
enable_sim_alignment
|
enable_sim_alignment
|
||||||
|
enable_sim_reserved_bits
|
||||||
|
enable_sim_bitsize
|
||||||
enable_werror
|
enable_werror
|
||||||
enable_build_warnings
|
enable_build_warnings
|
||||||
enable_sim_build_warnings
|
enable_sim_build_warnings
|
||||||
enable_sim_reserved_bits
|
|
||||||
enable_sim_bitsize
|
|
||||||
'
|
'
|
||||||
ac_precious_vars='build_alias
|
ac_precious_vars='build_alias
|
||||||
host_alias
|
host_alias
|
||||||
@ -1441,15 +1441,15 @@ Optional Features:
|
|||||||
--enable-sim-alignment=align
|
--enable-sim-alignment=align
|
||||||
Specify strict, nonstrict or forced alignment of
|
Specify strict, nonstrict or forced alignment of
|
||||||
memory accesses
|
memory accesses
|
||||||
|
--enable-sim-reserved-bits
|
||||||
|
Specify whether to check reserved bits in
|
||||||
|
instruction
|
||||||
|
--enable-sim-bitsize=N Specify target bitsize (32 or 64)
|
||||||
--enable-werror treat compile warnings as errors
|
--enable-werror treat compile warnings as errors
|
||||||
--enable-build-warnings enable build-time compiler warnings if gcc is used
|
--enable-build-warnings enable build-time compiler warnings if gcc is used
|
||||||
--enable-sim-build-warnings
|
--enable-sim-build-warnings
|
||||||
enable SIM specific build-time compiler warnings if
|
enable SIM specific build-time compiler warnings if
|
||||||
gcc is used
|
gcc is used
|
||||||
--enable-sim-reserved-bits
|
|
||||||
Specify whether to check reserved bits in
|
|
||||||
instruction
|
|
||||||
--enable-sim-bitsize=N Specify target bitsize (32 or 64)
|
|
||||||
|
|
||||||
Optional Packages:
|
Optional Packages:
|
||||||
--with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
|
--with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
|
||||||
@ -6911,7 +6911,15 @@ fi
|
|||||||
test -z "$AR" && AR=ar
|
test -z "$AR" && AR=ar
|
||||||
if test -n "$plugin_option"; then
|
if test -n "$plugin_option"; then
|
||||||
if $AR --help 2>&1 | grep -q "\--plugin"; then
|
if $AR --help 2>&1 | grep -q "\--plugin"; then
|
||||||
AR="$AR $plugin_option"
|
touch conftest.c
|
||||||
|
$AR $plugin_option rc conftest.a conftest.c
|
||||||
|
if test "$?" != 0; then
|
||||||
|
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Failed: $AR $plugin_option rc" >&5
|
||||||
|
$as_echo "$as_me: WARNING: Failed: $AR $plugin_option rc" >&2;}
|
||||||
|
else
|
||||||
|
AR="$AR $plugin_option"
|
||||||
|
fi
|
||||||
|
rm -f conftest.*
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
test -z "$AR_FLAGS" && AR_FLAGS=cru
|
test -z "$AR_FLAGS" && AR_FLAGS=cru
|
||||||
@ -12935,7 +12943,7 @@ else
|
|||||||
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
|
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
|
||||||
lt_status=$lt_dlunknown
|
lt_status=$lt_dlunknown
|
||||||
cat > conftest.$ac_ext <<_LT_EOF
|
cat > conftest.$ac_ext <<_LT_EOF
|
||||||
#line 12938 "configure"
|
#line 12946 "configure"
|
||||||
#include "confdefs.h"
|
#include "confdefs.h"
|
||||||
|
|
||||||
#if HAVE_DLFCN_H
|
#if HAVE_DLFCN_H
|
||||||
@ -13041,7 +13049,7 @@ else
|
|||||||
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
|
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
|
||||||
lt_status=$lt_dlunknown
|
lt_status=$lt_dlunknown
|
||||||
cat > conftest.$ac_ext <<_LT_EOF
|
cat > conftest.$ac_ext <<_LT_EOF
|
||||||
#line 13044 "configure"
|
#line 13052 "configure"
|
||||||
#include "confdefs.h"
|
#include "confdefs.h"
|
||||||
|
|
||||||
#if HAVE_DLFCN_H
|
#if HAVE_DLFCN_H
|
||||||
@ -13684,103 +13692,6 @@ fi
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
# Check whether --enable-werror was given.
|
|
||||||
if test "${enable_werror+set}" = set; then :
|
|
||||||
enableval=$enable_werror; case "${enableval}" in
|
|
||||||
yes | y) ERROR_ON_WARNING="yes" ;;
|
|
||||||
no | n) ERROR_ON_WARNING="no" ;;
|
|
||||||
*) as_fn_error $? "bad value ${enableval} for --enable-werror" "$LINENO" 5 ;;
|
|
||||||
esac
|
|
||||||
fi
|
|
||||||
|
|
||||||
|
|
||||||
# Enable -Werror by default when using gcc
|
|
||||||
if test "${GCC}" = yes -a -z "${ERROR_ON_WARNING}" ; then
|
|
||||||
ERROR_ON_WARNING=yes
|
|
||||||
fi
|
|
||||||
|
|
||||||
WERROR_CFLAGS=""
|
|
||||||
|
|
||||||
build_warnings="-Wall -Wdeclaration-after-statement -Wpointer-arith \
|
|
||||||
-Wpointer-sign \
|
|
||||||
-Wno-unused -Wunused-value -Wunused-function \
|
|
||||||
-Wno-switch -Wno-char-subscripts -Wmissing-prototypes
|
|
||||||
-Wdeclaration-after-statement -Wempty-body -Wmissing-parameter-type \
|
|
||||||
-Wold-style-declaration -Wold-style-definition"
|
|
||||||
|
|
||||||
# Enable -Wno-format by default when using gcc on mingw since many
|
|
||||||
# GCC versions complain about %I64.
|
|
||||||
case "${host}" in
|
|
||||||
*-*-mingw32*) build_warnings="$build_warnings -Wno-format" ;;
|
|
||||||
*) build_warnings="$build_warnings -Wformat-nonliteral" ;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
# Check whether --enable-build-warnings was given.
|
|
||||||
if test "${enable_build_warnings+set}" = set; then :
|
|
||||||
enableval=$enable_build_warnings; case "${enableval}" in
|
|
||||||
yes) ;;
|
|
||||||
no) build_warnings="-w";;
|
|
||||||
,*) t=`echo "${enableval}" | sed -e "s/,/ /g"`
|
|
||||||
build_warnings="${build_warnings} ${t}";;
|
|
||||||
*,) t=`echo "${enableval}" | sed -e "s/,/ /g"`
|
|
||||||
build_warnings="${t} ${build_warnings}";;
|
|
||||||
*) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
|
|
||||||
esac
|
|
||||||
if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
|
|
||||||
echo "Setting compiler warning flags = $build_warnings" 6>&1
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
# Check whether --enable-sim-build-warnings was given.
|
|
||||||
if test "${enable_sim_build_warnings+set}" = set; then :
|
|
||||||
enableval=$enable_sim_build_warnings; case "${enableval}" in
|
|
||||||
yes) ;;
|
|
||||||
no) build_warnings="-w";;
|
|
||||||
,*) t=`echo "${enableval}" | sed -e "s/,/ /g"`
|
|
||||||
build_warnings="${build_warnings} ${t}";;
|
|
||||||
*,) t=`echo "${enableval}" | sed -e "s/,/ /g"`
|
|
||||||
build_warnings="${t} ${build_warnings}";;
|
|
||||||
*) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
|
|
||||||
esac
|
|
||||||
if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
|
|
||||||
echo "Setting GDB specific compiler warning flags = $build_warnings" 6>&1
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
WARN_CFLAGS=""
|
|
||||||
if test "x${build_warnings}" != x -a "x$GCC" = xyes
|
|
||||||
then
|
|
||||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking compiler warning flags" >&5
|
|
||||||
$as_echo_n "checking compiler warning flags... " >&6; }
|
|
||||||
# Separate out the -Werror flag as some files just cannot be
|
|
||||||
# compiled with it enabled.
|
|
||||||
for w in ${build_warnings}; do
|
|
||||||
case $w in
|
|
||||||
-Werr*) WERROR_CFLAGS=-Werror ;;
|
|
||||||
*) # Check that GCC accepts it
|
|
||||||
saved_CFLAGS="$CFLAGS"
|
|
||||||
CFLAGS="$CFLAGS $w"
|
|
||||||
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
|
||||||
/* end confdefs.h. */
|
|
||||||
|
|
||||||
int
|
|
||||||
main ()
|
|
||||||
{
|
|
||||||
|
|
||||||
;
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
_ACEOF
|
|
||||||
if ac_fn_c_try_compile "$LINENO"; then :
|
|
||||||
WARN_CFLAGS="${WARN_CFLAGS} $w"
|
|
||||||
fi
|
|
||||||
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
|
|
||||||
CFLAGS="$saved_CFLAGS"
|
|
||||||
esac
|
|
||||||
done
|
|
||||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ${WARN_CFLAGS} ${WERROR_CFLAGS}" >&5
|
|
||||||
$as_echo "${WARN_CFLAGS} ${WERROR_CFLAGS}" >&6; }
|
|
||||||
fi
|
|
||||||
|
|
||||||
|
|
||||||
default_sim_reserved_bits="1"
|
default_sim_reserved_bits="1"
|
||||||
# Check whether --enable-sim-reserved-bits was given.
|
# Check whether --enable-sim-reserved-bits was given.
|
||||||
if test "${enable_sim_reserved_bits+set}" = set; then :
|
if test "${enable_sim_reserved_bits+set}" = set; then :
|
||||||
@ -13882,6 +13793,106 @@ done
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# Check whether --enable-werror was given.
|
||||||
|
if test "${enable_werror+set}" = set; then :
|
||||||
|
enableval=$enable_werror; case "${enableval}" in
|
||||||
|
yes | y) ERROR_ON_WARNING="yes" ;;
|
||||||
|
no | n) ERROR_ON_WARNING="no" ;;
|
||||||
|
*) as_fn_error $? "bad value ${enableval} for --enable-werror" "$LINENO" 5 ;;
|
||||||
|
esac
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
# Enable -Werror by default when using gcc
|
||||||
|
if test "${GCC}" = yes -a -z "${ERROR_ON_WARNING}" ; then
|
||||||
|
ERROR_ON_WARNING=yes
|
||||||
|
fi
|
||||||
|
|
||||||
|
WERROR_CFLAGS=""
|
||||||
|
if test "${ERROR_ON_WARNING}" = yes ; then
|
||||||
|
WERROR_CFLAGS="-Werror"
|
||||||
|
fi
|
||||||
|
|
||||||
|
build_warnings="-Wall -Wdeclaration-after-statement -Wpointer-arith \
|
||||||
|
-Wpointer-sign \
|
||||||
|
-Wno-unused -Wunused-value -Wunused-function \
|
||||||
|
-Wno-switch -Wno-char-subscripts -Wmissing-prototypes
|
||||||
|
-Wdeclaration-after-statement -Wempty-body -Wmissing-parameter-type \
|
||||||
|
-Wold-style-declaration -Wold-style-definition"
|
||||||
|
|
||||||
|
# Enable -Wno-format by default when using gcc on mingw since many
|
||||||
|
# GCC versions complain about %I64.
|
||||||
|
case "${host}" in
|
||||||
|
*-*-mingw32*) build_warnings="$build_warnings -Wno-format" ;;
|
||||||
|
*) build_warnings="$build_warnings -Wformat-nonliteral" ;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
# Check whether --enable-build-warnings was given.
|
||||||
|
if test "${enable_build_warnings+set}" = set; then :
|
||||||
|
enableval=$enable_build_warnings; case "${enableval}" in
|
||||||
|
yes) ;;
|
||||||
|
no) build_warnings="-w";;
|
||||||
|
,*) t=`echo "${enableval}" | sed -e "s/,/ /g"`
|
||||||
|
build_warnings="${build_warnings} ${t}";;
|
||||||
|
*,) t=`echo "${enableval}" | sed -e "s/,/ /g"`
|
||||||
|
build_warnings="${t} ${build_warnings}";;
|
||||||
|
*) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
|
||||||
|
esac
|
||||||
|
if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
|
||||||
|
echo "Setting compiler warning flags = $build_warnings" 6>&1
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
# Check whether --enable-sim-build-warnings was given.
|
||||||
|
if test "${enable_sim_build_warnings+set}" = set; then :
|
||||||
|
enableval=$enable_sim_build_warnings; case "${enableval}" in
|
||||||
|
yes) ;;
|
||||||
|
no) build_warnings="-w";;
|
||||||
|
,*) t=`echo "${enableval}" | sed -e "s/,/ /g"`
|
||||||
|
build_warnings="${build_warnings} ${t}";;
|
||||||
|
*,) t=`echo "${enableval}" | sed -e "s/,/ /g"`
|
||||||
|
build_warnings="${t} ${build_warnings}";;
|
||||||
|
*) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
|
||||||
|
esac
|
||||||
|
if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
|
||||||
|
echo "Setting GDB specific compiler warning flags = $build_warnings" 6>&1
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
WARN_CFLAGS=""
|
||||||
|
if test "x${build_warnings}" != x -a "x$GCC" = xyes
|
||||||
|
then
|
||||||
|
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking compiler warning flags" >&5
|
||||||
|
$as_echo_n "checking compiler warning flags... " >&6; }
|
||||||
|
# Separate out the -Werror flag as some files just cannot be
|
||||||
|
# compiled with it enabled.
|
||||||
|
for w in ${build_warnings}; do
|
||||||
|
case $w in
|
||||||
|
-Werr*) WERROR_CFLAGS=-Werror ;;
|
||||||
|
*) # Check that GCC accepts it
|
||||||
|
saved_CFLAGS="$CFLAGS"
|
||||||
|
CFLAGS="$CFLAGS $w"
|
||||||
|
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||||
|
/* end confdefs.h. */
|
||||||
|
|
||||||
|
int
|
||||||
|
main ()
|
||||||
|
{
|
||||||
|
|
||||||
|
;
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
_ACEOF
|
||||||
|
if ac_fn_c_try_compile "$LINENO"; then :
|
||||||
|
WARN_CFLAGS="${WARN_CFLAGS} $w"
|
||||||
|
fi
|
||||||
|
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
|
||||||
|
CFLAGS="$saved_CFLAGS"
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ${WARN_CFLAGS} ${WERROR_CFLAGS}" >&5
|
||||||
|
$as_echo "${WARN_CFLAGS} ${WERROR_CFLAGS}" >&6; }
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
cgen_breaks=""
|
cgen_breaks=""
|
||||||
if grep CGEN_MAINT $srcdir/Makefile.in >/dev/null; then
|
if grep CGEN_MAINT $srcdir/Makefile.in >/dev/null; then
|
||||||
cgen_breaks="break cgen_rtx_error";
|
cgen_breaks="break cgen_rtx_error";
|
||||||
|
@ -6,7 +6,6 @@ SIM_AC_COMMON
|
|||||||
|
|
||||||
SIM_AC_OPTION_ENDIAN(LITTLE)
|
SIM_AC_OPTION_ENDIAN(LITTLE)
|
||||||
SIM_AC_OPTION_ALIGNMENT(,NONSTRICT_ALIGNMENT)
|
SIM_AC_OPTION_ALIGNMENT(,NONSTRICT_ALIGNMENT)
|
||||||
SIM_AC_OPTION_WARNINGS(no)
|
|
||||||
SIM_AC_OPTION_RESERVED_BITS
|
SIM_AC_OPTION_RESERVED_BITS
|
||||||
SIM_AC_OPTION_BITSIZE(32,31)
|
SIM_AC_OPTION_BITSIZE(32,31)
|
||||||
|
|
||||||
|
@ -11,6 +11,7 @@
|
|||||||
#ifdef HAVE_UNISTD_H
|
#ifdef HAVE_UNISTD_H
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#endif
|
#endif
|
||||||
|
#include <stdlib.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
#include "targ-vals.h"
|
#include "targ-vals.h"
|
||||||
|
Loading…
Reference in New Issue
Block a user