sim: move -Werror disabling to Makefile

For the ports that still don't build with -Werror, rather than disable
the flag at configure time, do it at make time.  This will allow us to
unify these tests in the common sim configure script.
This commit is contained in:
Mike Frysinger 2021-06-18 02:14:52 -04:00
parent 3f8414df7a
commit 982c3a65ca
84 changed files with 971 additions and 810 deletions

View File

@ -1,3 +1,7 @@
2021-06-18 Mike Frysinger <vapier@gentoo.org>
* m4/sim_ac_option_warnings.m4: Delete 1st arg to macro.
2021-06-18 Mike Frysinger <vapier@gentoo.org>
* configure.ac: Output arch-subdir.mk.

View File

@ -1,3 +1,7 @@
2021-06-18 Mike Frysinger <vapier@gentoo.org>
* configure: Regenerate.
2021-06-18 Mike Frysinger <vapier@gentoo.org>
* cpustate.c: Include sim-signal.h.

View File

@ -11149,15 +11149,14 @@ if test "${enable_werror+set}" = set; then :
fi
# Enable -Werror by default when using gcc
if test "${GCC}" = yes -a -z "${ERROR_ON_WARNING}" ; then
ERROR_ON_WARNING=yes
ERROR_ON_WARNING=yes
fi
WERROR_CFLAGS=""
if test "${ERROR_ON_WARNING}" = yes ; then
WERROR_CFLAGS="-Werror"
fi
if test "${ERROR_ON_WARNING}" = yes ; then
WERROR_CFLAGS="-Werror"
fi
build_warnings="-Wall -Wdeclaration-after-statement -Wpointer-arith \
-Wpointer-sign \

View File

@ -1,3 +1,7 @@
2021-06-18 Mike Frysinger <vapier@gentoo.org>
* configure: Regenerate.
2021-06-17 Mike Frysinger <vapier@gentoo.org>
* configure.ac: Delete SIM_AC_OPTION_ENDIAN call.

9
sim/arm/configure vendored
View File

@ -11149,15 +11149,14 @@ if test "${enable_werror+set}" = set; then :
fi
# Enable -Werror by default when using gcc
if test "${GCC}" = yes -a -z "${ERROR_ON_WARNING}" ; then
ERROR_ON_WARNING=yes
ERROR_ON_WARNING=yes
fi
WERROR_CFLAGS=""
if test "${ERROR_ON_WARNING}" = yes ; then
WERROR_CFLAGS="-Werror"
fi
if test "${ERROR_ON_WARNING}" = yes ; then
WERROR_CFLAGS="-Werror"
fi
build_warnings="-Wall -Wdeclaration-after-statement -Wpointer-arith \
-Wpointer-sign \

View File

@ -1,3 +1,7 @@
2021-06-18 Mike Frysinger <vapier@gentoo.org>
* configure: Regenerate.
2021-06-18 Mike Frysinger <vapier@gentoo.org>
* interp.c: Include sim-signal.h.

9
sim/avr/configure vendored
View File

@ -11149,15 +11149,14 @@ if test "${enable_werror+set}" = set; then :
fi
# Enable -Werror by default when using gcc
if test "${GCC}" = yes -a -z "${ERROR_ON_WARNING}" ; then
ERROR_ON_WARNING=yes
ERROR_ON_WARNING=yes
fi
WERROR_CFLAGS=""
if test "${ERROR_ON_WARNING}" = yes ; then
WERROR_CFLAGS="-Werror"
fi
if test "${ERROR_ON_WARNING}" = yes ; then
WERROR_CFLAGS="-Werror"
fi
build_warnings="-Wall -Wdeclaration-after-statement -Wpointer-arith \
-Wpointer-sign \

View File

@ -1,3 +1,7 @@
2021-06-18 Mike Frysinger <vapier@gentoo.org>
* configure: Regenerate.
2021-06-18 Mike Frysinger <vapier@gentoo.org>
* dv-bfin_cec.c: Include sim-signal.h.

9
sim/bfin/configure vendored
View File

@ -11579,15 +11579,14 @@ if test "${enable_werror+set}" = set; then :
fi
# Enable -Werror by default when using gcc
if test "${GCC}" = yes -a -z "${ERROR_ON_WARNING}" ; then
ERROR_ON_WARNING=yes
ERROR_ON_WARNING=yes
fi
WERROR_CFLAGS=""
if test "${ERROR_ON_WARNING}" = yes ; then
WERROR_CFLAGS="-Werror"
fi
if test "${ERROR_ON_WARNING}" = yes ; then
WERROR_CFLAGS="-Werror"
fi
build_warnings="-Wall -Wdeclaration-after-statement -Wpointer-arith \
-Wpointer-sign \

View File

@ -1,3 +1,9 @@
2021-06-18 Mike Frysinger <vapier@gentoo.org>
* Makefile.in (SIM_WERROR_CFLAGS): New variable.
* configure.ac: Delete call to SIM_AC_OPTION_WARNINGS.
* configure: Regenerate.
2021-06-18 Mike Frysinger <vapier@gentoo.org>
* bpf.c: Include sim-signal.h.

View File

@ -41,6 +41,9 @@ SIM_EXTRA_DEPS = \
SIM_EXTRA_CLEAN = bpf-clean
# Code doesn't build cleanly yet.
SIM_WERROR_CFLAGS =
## COMMON_POST_CONFIG_FRAG
# cgen support, enable with --enable-cgen-maint

78
sim/bpf/configure vendored
View File

@ -772,10 +772,10 @@ enable_sim_inline
enable_sim_bitsize
enable_sim_scache
enable_sim_default_model
enable_cgen_maint
enable_werror
enable_build_warnings
enable_sim_build_warnings
enable_cgen_maint
enable_sim_hardware
'
ac_precious_vars='build_alias
@ -1420,12 +1420,12 @@ Optional Features:
Specify simulator execution cache size
--enable-sim-default-model=model
Specify default model to simulate
--enable-cgen-maint=DIR build cgen generated files
--enable-werror treat compile warnings as errors
--enable-build-warnings enable build-time compiler warnings if gcc is used
--enable-sim-build-warnings
enable SIM specific build-time compiler warnings if
gcc is used
--enable-cgen-maint=DIR build cgen generated files
--enable-sim-hardware=LIST
Specify the hardware to be included in the build.
@ -11246,6 +11246,40 @@ fi
cgen_maint=no
cgen=guile
cgendir='$(srcdir)/../../cgen'
# Check whether --enable-cgen-maint was given.
if test "${enable_cgen_maint+set}" = set; then :
enableval=$enable_cgen_maint; case "${enableval}" in
yes) cgen_maint=yes ;;
no) cgen_maint=no ;;
*)
# Argument is a directory where cgen can be found. In some
# future world cgen could be installable, but right now this
# is not the case. Instead we assume the directory is a path
# to the cgen source tree.
cgen_maint=yes
if test -r ${enableval}/iformat.scm; then
# This looks like a cgen source tree.
cgendir=${enableval}
else
as_fn_error $? "${enableval} doesn't look like a cgen source tree" "$LINENO" 5
fi
;;
esac
fi
if test x${cgen_maint} != xno ; then
CGEN_MAINT=''
else
CGEN_MAINT='#'
fi
# Check whether --enable-werror was given.
if test "${enable_werror+set}" = set; then :
enableval=$enable_werror; case "${enableval}" in
@ -11256,12 +11290,14 @@ if test "${enable_werror+set}" = set; then :
fi
# Enable -Werror by default when using gcc
if test "${GCC}" = yes -a -z "${ERROR_ON_WARNING}" ; then
ERROR_ON_WARNING=yes
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 \
@ -11343,40 +11379,6 @@ $as_echo "${WARN_CFLAGS} ${WERROR_CFLAGS}" >&6; }
fi
cgen_maint=no
cgen=guile
cgendir='$(srcdir)/../../cgen'
# Check whether --enable-cgen-maint was given.
if test "${enable_cgen_maint+set}" = set; then :
enableval=$enable_cgen_maint; case "${enableval}" in
yes) cgen_maint=yes ;;
no) cgen_maint=no ;;
*)
# Argument is a directory where cgen can be found. In some
# future world cgen could be installable, but right now this
# is not the case. Instead we assume the directory is a path
# to the cgen source tree.
cgen_maint=yes
if test -r ${enableval}/iformat.scm; then
# This looks like a cgen source tree.
cgendir=${enableval}
else
as_fn_error $? "${enableval} doesn't look like a cgen source tree" "$LINENO" 5
fi
;;
esac
fi
if test x${cgen_maint} != xno ; then
CGEN_MAINT=''
else
CGEN_MAINT='#'
fi
hardware="cfi core pal glue "
sim_hw_cflags="-DWITH_HW=1"
sim_hw="$hardware"

View File

@ -7,7 +7,6 @@ SIM_AC_COMMON
SIM_AC_OPTION_BITSIZE([64])
SIM_AC_OPTION_SCACHE(16384)
SIM_AC_OPTION_DEFAULT_MODEL([bpf-def])
SIM_AC_OPTION_WARNINGS(no)
SIM_AC_OPTION_CGEN_MAINT
SIM_AC_OUTPUT

View File

@ -1,3 +1,7 @@
2021-06-18 Mike Frysinger <vapier@gentoo.org>
* configure: Regenerate.
2021-06-18 Mike Frysinger <vapier@gentoo.org>
* interp.c: Include sim-signal.h.

9
sim/cr16/configure vendored
View File

@ -11149,15 +11149,14 @@ if test "${enable_werror+set}" = set; then :
fi
# Enable -Werror by default when using gcc
if test "${GCC}" = yes -a -z "${ERROR_ON_WARNING}" ; then
ERROR_ON_WARNING=yes
ERROR_ON_WARNING=yes
fi
WERROR_CFLAGS=""
if test "${ERROR_ON_WARNING}" = yes ; then
WERROR_CFLAGS="-Werror"
fi
if test "${ERROR_ON_WARNING}" = yes ; then
WERROR_CFLAGS="-Werror"
fi
build_warnings="-Wall -Wdeclaration-after-statement -Wpointer-arith \
-Wpointer-sign \

View File

@ -1,3 +1,9 @@
2021-06-18 Mike Frysinger <vapier@gentoo.org>
* Makefile.in (SIM_WERROR_CFLAGS): New variable.
* configure.ac: Delete call to SIM_AC_OPTION_WARNINGS.
* configure: Regenerate.
2021-06-18 Mike Frysinger <vapier@gentoo.org>
* traps.c: Include sim-signal.h.

View File

@ -39,6 +39,9 @@ SIM_EXTRA_DEPS = \
SIM_EXTRA_CLEAN = cris-clean
# Code doesn't build cleanly yet.
SIM_WERROR_CFLAGS =
## COMMON_POST_CONFIG_FRAG
arch = cris

212
sim/cris/configure vendored
View File

@ -770,12 +770,12 @@ enable_libtool_lock
enable_maintainer_mode
enable_sim_inline
enable_sim_scache
enable_werror
enable_build_warnings
enable_sim_build_warnings
enable_sim_hardware
enable_sim_default_model
enable_cgen_maint
enable_werror
enable_build_warnings
enable_sim_build_warnings
'
ac_precious_vars='build_alias
host_alias
@ -1416,16 +1416,16 @@ Optional Features:
Specify which functions should be inlined
--enable-sim-scache=size
Specify simulator execution cache size
--enable-werror treat compile warnings as errors
--enable-build-warnings enable build-time compiler warnings if gcc is used
--enable-sim-build-warnings
enable SIM specific build-time compiler warnings if
gcc is used
--enable-sim-hardware=LIST
Specify the hardware to be included in the build.
--enable-sim-default-model=model
Specify default model to simulate
--enable-cgen-maint=DIR build cgen generated files
--enable-werror treat compile warnings as errors
--enable-build-warnings enable build-time compiler warnings if gcc is used
--enable-sim-build-warnings
enable SIM specific build-time compiler warnings if
gcc is used
Optional Packages:
--with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
@ -11169,103 +11169,6 @@ 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 -Werror $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
hardware="cfi core pal glue rv cris cris_900000xx"
sim_hw_cflags="-DWITH_HW=1"
sim_hw="$hardware"
@ -11415,6 +11318,105 @@ 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
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 -Werror $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=""
if grep CGEN_MAINT $srcdir/Makefile.in >/dev/null; then
cgen_breaks="break cgen_rtx_error";

View File

@ -5,7 +5,6 @@ AC_CONFIG_MACRO_DIRS([../m4 ../.. ../../config])
SIM_AC_COMMON
SIM_AC_OPTION_SCACHE(16384)
SIM_AC_OPTION_WARNINGS(no)
SIM_AC_OPTION_HARDWARE(rv cris cris_900000xx)
# The default model shouldn't matter as long as there's a BFD.

View File

@ -1,3 +1,7 @@
2021-06-18 Mike Frysinger <vapier@gentoo.org>
* configure: Regenerate.
2021-06-18 Mike Frysinger <vapier@gentoo.org>
* interp.c: Include sim-signal.h.

9
sim/d10v/configure vendored
View File

@ -11149,15 +11149,14 @@ if test "${enable_werror+set}" = set; then :
fi
# Enable -Werror by default when using gcc
if test "${GCC}" = yes -a -z "${ERROR_ON_WARNING}" ; then
ERROR_ON_WARNING=yes
ERROR_ON_WARNING=yes
fi
WERROR_CFLAGS=""
if test "${ERROR_ON_WARNING}" = yes ; then
WERROR_CFLAGS="-Werror"
fi
if test "${ERROR_ON_WARNING}" = yes ; then
WERROR_CFLAGS="-Werror"
fi
build_warnings="-Wall -Wdeclaration-after-statement -Wpointer-arith \
-Wpointer-sign \

View File

@ -1,3 +1,9 @@
2021-06-18 Mike Frysinger <vapier@gentoo.org>
* Makefile.in (SIM_WERROR_CFLAGS): New variable.
* configure.ac: Delete call to SIM_AC_OPTION_WARNINGS.
* configure: Regenerate.
2021-06-17 Mike Frysinger <vapier@gentoo.org>
* configure: Regenerate.

View File

@ -36,6 +36,9 @@ SIM_EXTRA_CLEAN = clean-sis
# behaviour of UART interrupt routines ...
SIM_EXTRA_CFLAGS += -DFAST_UART -I$(srcroot)
# Code doesn't build cleanly yet.
SIM_WERROR_CFLAGS =
## COMMON_POST_CONFIG_FRAG
# `sis' doesn't need interf.o.

196
sim/erc32/configure vendored
View File

@ -11141,103 +11141,6 @@ 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 -Werror $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
# In the Cygwin environment, we need some additional flags.
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for cygwin" >&5
$as_echo_n "checking for cygwin... " >&6; }
@ -11380,6 +11283,105 @@ 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
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 -Werror $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
hardware="cfi core pal glue "
sim_hw_cflags="-DWITH_HW=1"
sim_hw="$hardware"

View File

@ -18,7 +18,6 @@ AC_INIT(Makefile.in)
AC_CONFIG_MACRO_DIRS([../m4 ../.. ../../config])
SIM_AC_COMMON
SIM_AC_OPTION_WARNINGS(no)
# In the Cygwin environment, we need some additional flags.
AC_CACHE_CHECK([for cygwin], sim_cv_os_cygwin,

View File

@ -1,3 +1,7 @@
2021-06-18 Mike Frysinger <vapier@gentoo.org>
* configure: Regenerate.
2021-06-18 Mike Frysinger <vapier@gentoo.org>
* sim-main.c: Include sim-signal.h.

View File

@ -11149,15 +11149,14 @@ if test "${enable_werror+set}" = set; then :
fi
# Enable -Werror by default when using gcc
if test "${GCC}" = yes -a -z "${ERROR_ON_WARNING}" ; then
ERROR_ON_WARNING=yes
ERROR_ON_WARNING=yes
fi
WERROR_CFLAGS=""
if test "${ERROR_ON_WARNING}" = yes ; then
WERROR_CFLAGS="-Werror"
fi
if test "${ERROR_ON_WARNING}" = yes ; then
WERROR_CFLAGS="-Werror"
fi
build_warnings="-Wall -Wdeclaration-after-statement -Wpointer-arith \
-Wpointer-sign \

View File

@ -1,3 +1,9 @@
2021-06-18 Mike Frysinger <vapier@gentoo.org>
* Makefile.in (SIM_WERROR_CFLAGS): New variable.
* configure.ac: Delete call to SIM_AC_OPTION_WARNINGS.
* configure: Regenerate.
2021-06-18 Mike Frysinger <vapier@gentoo.org>
* interrupts.c: Include sim-signal.h.

View File

@ -40,6 +40,9 @@ SIM_EXTRA_CFLAGS = @sim_trapdump@
SIM_EXTRA_CLEAN = frv-clean
# Code doesn't build cleanly yet.
SIM_WERROR_CFLAGS =
## COMMON_POST_CONFIG_FRAG
arch = frv

118
sim/frv/configure vendored
View File

@ -772,11 +772,11 @@ enable_maintainer_mode
enable_sim_inline
enable_sim_scache
enable_sim_default_model
enable_cgen_maint
enable_sim_trapdump
enable_werror
enable_build_warnings
enable_sim_build_warnings
enable_cgen_maint
enable_sim_trapdump
enable_sim_hardware
'
ac_precious_vars='build_alias
@ -1420,13 +1420,13 @@ Optional Features:
Specify simulator execution cache size
--enable-sim-default-model=model
Specify default model to simulate
--enable-cgen-maint=DIR build cgen generated files
--enable-sim-trapdump Make unknown traps dump the registers
--enable-werror treat compile warnings as errors
--enable-build-warnings enable build-time compiler warnings if gcc is used
--enable-sim-build-warnings
enable SIM specific build-time compiler warnings if
gcc is used
--enable-cgen-maint=DIR build cgen generated files
--enable-sim-trapdump Make unknown traps dump the registers
--enable-sim-hardware=LIST
Specify the hardware to be included in the build.
@ -11188,6 +11188,58 @@ fi
cgen_maint=no
cgen=guile
cgendir='$(srcdir)/../../cgen'
# Check whether --enable-cgen-maint was given.
if test "${enable_cgen_maint+set}" = set; then :
enableval=$enable_cgen_maint; case "${enableval}" in
yes) cgen_maint=yes ;;
no) cgen_maint=no ;;
*)
# Argument is a directory where cgen can be found. In some
# future world cgen could be installable, but right now this
# is not the case. Instead we assume the directory is a path
# to the cgen source tree.
cgen_maint=yes
if test -r ${enableval}/iformat.scm; then
# This looks like a cgen source tree.
cgendir=${enableval}
else
as_fn_error $? "${enableval} doesn't look like a cgen source tree" "$LINENO" 5
fi
;;
esac
fi
if test x${cgen_maint} != xno ; then
CGEN_MAINT=''
else
CGEN_MAINT='#'
fi
#
# Enable making unknown traps dump out registers
#
# Check whether --enable-sim-trapdump was given.
if test "${enable_sim_trapdump+set}" = set; then :
enableval=$enable_sim_trapdump; case "${enableval}" in
yes) sim_trapdump="-DTRAPDUMP=1";;
no) sim_trapdump="-DTRAPDUMP=0";;
*) as_fn_error $? "\"Unknown value $enableval passed to --enable-sim-trapdump\"" "$LINENO" 5; sim_trapdump="";;
esac
if test x"$silent" != x"yes" && test x"$sim_trapdump" != x""; then
echo "Setting sim_trapdump = $sim_trapdump" 6>&1
fi
else
sim_trapdump=""
fi
# Check whether --enable-werror was given.
if test "${enable_werror+set}" = set; then :
enableval=$enable_werror; case "${enableval}" in
@ -11198,12 +11250,14 @@ if test "${enable_werror+set}" = set; then :
fi
# Enable -Werror by default when using gcc
if test "${GCC}" = yes -a -z "${ERROR_ON_WARNING}" ; then
ERROR_ON_WARNING=yes
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 \
@ -11285,58 +11339,6 @@ $as_echo "${WARN_CFLAGS} ${WERROR_CFLAGS}" >&6; }
fi
cgen_maint=no
cgen=guile
cgendir='$(srcdir)/../../cgen'
# Check whether --enable-cgen-maint was given.
if test "${enable_cgen_maint+set}" = set; then :
enableval=$enable_cgen_maint; case "${enableval}" in
yes) cgen_maint=yes ;;
no) cgen_maint=no ;;
*)
# Argument is a directory where cgen can be found. In some
# future world cgen could be installable, but right now this
# is not the case. Instead we assume the directory is a path
# to the cgen source tree.
cgen_maint=yes
if test -r ${enableval}/iformat.scm; then
# This looks like a cgen source tree.
cgendir=${enableval}
else
as_fn_error $? "${enableval} doesn't look like a cgen source tree" "$LINENO" 5
fi
;;
esac
fi
if test x${cgen_maint} != xno ; then
CGEN_MAINT=''
else
CGEN_MAINT='#'
fi
#
# Enable making unknown traps dump out registers
#
# Check whether --enable-sim-trapdump was given.
if test "${enable_sim_trapdump+set}" = set; then :
enableval=$enable_sim_trapdump; case "${enableval}" in
yes) sim_trapdump="-DTRAPDUMP=1";;
no) sim_trapdump="-DTRAPDUMP=0";;
*) as_fn_error $? "\"Unknown value $enableval passed to --enable-sim-trapdump\"" "$LINENO" 5; sim_trapdump="";;
esac
if test x"$silent" != x"yes" && test x"$sim_trapdump" != x""; then
echo "Setting sim_trapdump = $sim_trapdump" 6>&1
fi
else
sim_trapdump=""
fi
hardware="cfi core pal glue "
sim_hw_cflags="-DWITH_HW=1"
sim_hw="$hardware"

View File

@ -6,7 +6,6 @@ SIM_AC_COMMON
SIM_AC_OPTION_SCACHE(16384)
SIM_AC_OPTION_DEFAULT_MODEL(fr500)
SIM_AC_OPTION_WARNINGS(no)
SIM_AC_OPTION_CGEN_MAINT
#

View File

@ -1,3 +1,7 @@
2021-06-18 Mike Frysinger <vapier@gentoo.org>
* configure: Regenerate.
2021-06-18 Mike Frysinger <vapier@gentoo.org>
* interp.c: Include sim-signal.h.

9
sim/ft32/configure vendored
View File

@ -11149,15 +11149,14 @@ if test "${enable_werror+set}" = set; then :
fi
# Enable -Werror by default when using gcc
if test "${GCC}" = yes -a -z "${ERROR_ON_WARNING}" ; then
ERROR_ON_WARNING=yes
ERROR_ON_WARNING=yes
fi
WERROR_CFLAGS=""
if test "${ERROR_ON_WARNING}" = yes ; then
WERROR_CFLAGS="-Werror"
fi
if test "${ERROR_ON_WARNING}" = yes ; then
WERROR_CFLAGS="-Werror"
fi
build_warnings="-Wall -Wdeclaration-after-statement -Wpointer-arith \
-Wpointer-sign \

View File

@ -1,3 +1,7 @@
2021-06-18 Mike Frysinger <vapier@gentoo.org>
* configure: Regenerate.
2021-06-18 Mike Frysinger <vapier@gentoo.org>
* compile.c: Include sim-signal.h.

9
sim/h8300/configure vendored
View File

@ -11149,15 +11149,14 @@ if test "${enable_werror+set}" = set; then :
fi
# Enable -Werror by default when using gcc
if test "${GCC}" = yes -a -z "${ERROR_ON_WARNING}" ; then
ERROR_ON_WARNING=yes
ERROR_ON_WARNING=yes
fi
WERROR_CFLAGS=""
if test "${ERROR_ON_WARNING}" = yes ; then
WERROR_CFLAGS="-Werror"
fi
if test "${ERROR_ON_WARNING}" = yes ; then
WERROR_CFLAGS="-Werror"
fi
build_warnings="-Wall -Wdeclaration-after-statement -Wpointer-arith \
-Wpointer-sign \

View File

@ -1,3 +1,9 @@
2021-06-18 Mike Frysinger <vapier@gentoo.org>
* Makefile.in (SIM_WERROR_CFLAGS): New variable.
* configure.ac: Delete call to SIM_AC_OPTION_WARNINGS.
* configure: Regenerate.
2021-06-18 Mike Frysinger <vapier@gentoo.org>
* iq2000.c: Include sim-signal.h.

View File

@ -37,6 +37,9 @@ ALL_CPU_CFLAGS = -DHAVE_CPU_IQ2000BF -DHAVE_CPU_IQ10BF
SIM_EXTRA_CLEAN = iq2000-clean
# Code doesn't build cleanly yet.
SIM_WERROR_CFLAGS =
## COMMON_POST_CONFIG_FRAG
arch = iq2000

78
sim/iq2000/configure vendored
View File

@ -771,10 +771,10 @@ enable_maintainer_mode
enable_sim_inline
enable_sim_scache
enable_sim_default_model
enable_cgen_maint
enable_werror
enable_build_warnings
enable_sim_build_warnings
enable_cgen_maint
enable_sim_hardware
'
ac_precious_vars='build_alias
@ -1418,12 +1418,12 @@ Optional Features:
Specify simulator execution cache size
--enable-sim-default-model=model
Specify default model to simulate
--enable-cgen-maint=DIR build cgen generated files
--enable-werror treat compile warnings as errors
--enable-build-warnings enable build-time compiler warnings if gcc is used
--enable-sim-build-warnings
enable SIM specific build-time compiler warnings if
gcc is used
--enable-cgen-maint=DIR build cgen generated files
--enable-sim-hardware=LIST
Specify the hardware to be included in the build.
@ -11185,6 +11185,40 @@ fi
cgen_maint=no
cgen=guile
cgendir='$(srcdir)/../../cgen'
# Check whether --enable-cgen-maint was given.
if test "${enable_cgen_maint+set}" = set; then :
enableval=$enable_cgen_maint; case "${enableval}" in
yes) cgen_maint=yes ;;
no) cgen_maint=no ;;
*)
# Argument is a directory where cgen can be found. In some
# future world cgen could be installable, but right now this
# is not the case. Instead we assume the directory is a path
# to the cgen source tree.
cgen_maint=yes
if test -r ${enableval}/iformat.scm; then
# This looks like a cgen source tree.
cgendir=${enableval}
else
as_fn_error $? "${enableval} doesn't look like a cgen source tree" "$LINENO" 5
fi
;;
esac
fi
if test x${cgen_maint} != xno ; then
CGEN_MAINT=''
else
CGEN_MAINT='#'
fi
# Check whether --enable-werror was given.
if test "${enable_werror+set}" = set; then :
enableval=$enable_werror; case "${enableval}" in
@ -11195,12 +11229,14 @@ if test "${enable_werror+set}" = set; then :
fi
# Enable -Werror by default when using gcc
if test "${GCC}" = yes -a -z "${ERROR_ON_WARNING}" ; then
ERROR_ON_WARNING=yes
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 \
@ -11282,40 +11318,6 @@ $as_echo "${WARN_CFLAGS} ${WERROR_CFLAGS}" >&6; }
fi
cgen_maint=no
cgen=guile
cgendir='$(srcdir)/../../cgen'
# Check whether --enable-cgen-maint was given.
if test "${enable_cgen_maint+set}" = set; then :
enableval=$enable_cgen_maint; case "${enableval}" in
yes) cgen_maint=yes ;;
no) cgen_maint=no ;;
*)
# Argument is a directory where cgen can be found. In some
# future world cgen could be installable, but right now this
# is not the case. Instead we assume the directory is a path
# to the cgen source tree.
cgen_maint=yes
if test -r ${enableval}/iformat.scm; then
# This looks like a cgen source tree.
cgendir=${enableval}
else
as_fn_error $? "${enableval} doesn't look like a cgen source tree" "$LINENO" 5
fi
;;
esac
fi
if test x${cgen_maint} != xno ; then
CGEN_MAINT=''
else
CGEN_MAINT='#'
fi
hardware="cfi core pal glue "
sim_hw_cflags="-DWITH_HW=1"
sim_hw="$hardware"

View File

@ -6,7 +6,6 @@ SIM_AC_COMMON
SIM_AC_OPTION_SCACHE(16384)
SIM_AC_OPTION_DEFAULT_MODEL(iq2000)
SIM_AC_OPTION_WARNINGS(no)
SIM_AC_OPTION_CGEN_MAINT
SIM_AC_OUTPUT

View File

@ -1,3 +1,9 @@
2021-06-18 Mike Frysinger <vapier@gentoo.org>
* Makefile.in (SIM_WERROR_CFLAGS): New variable.
* configure.ac: Delete call to SIM_AC_OPTION_WARNINGS.
* configure: Regenerate.
2021-06-18 Mike Frysinger <vapier@gentoo.org>
* traps.c: Include sim-signal.h.

View File

@ -22,6 +22,9 @@ SIM_EXTRA_DEPS = $(CGEN_INCLUDE_DEPS) $(srcdir)/../../opcodes/lm32-desc.h \
SIM_EXTRA_CLEAN = lm32-clean
# Code doesn't build cleanly yet.
SIM_WERROR_CFLAGS =
## COMMON_POST_CONFIG_FRAG
arch = lm32

206
sim/lm32/configure vendored
View File

@ -771,11 +771,11 @@ enable_maintainer_mode
enable_sim_inline
enable_sim_scache
enable_sim_default_model
enable_cgen_maint
enable_sim_hardware
enable_werror
enable_build_warnings
enable_sim_build_warnings
enable_cgen_maint
enable_sim_hardware
'
ac_precious_vars='build_alias
host_alias
@ -1418,14 +1418,14 @@ Optional Features:
Specify simulator execution cache size
--enable-sim-default-model=model
Specify default model to simulate
--enable-cgen-maint=DIR build cgen generated files
--enable-sim-hardware=LIST
Specify the hardware to be included in the build.
--enable-werror treat compile warnings as errors
--enable-build-warnings enable build-time compiler warnings if gcc is used
--enable-sim-build-warnings
enable SIM specific build-time compiler warnings if
gcc is used
--enable-cgen-maint=DIR build cgen generated files
--enable-sim-hardware=LIST
Specify the hardware to be included in the build.
Optional Packages:
--with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
@ -11185,103 +11185,6 @@ 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 -Werror $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_maint=no
cgen=guile
cgendir='$(srcdir)/../../cgen'
@ -11413,6 +11316,105 @@ 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
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 -Werror $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=""
if grep CGEN_MAINT $srcdir/Makefile.in >/dev/null; then
cgen_breaks="break cgen_rtx_error";

View File

@ -6,7 +6,6 @@ SIM_AC_COMMON
SIM_AC_OPTION_SCACHE(16384)
SIM_AC_OPTION_DEFAULT_MODEL(lm32)
SIM_AC_OPTION_WARNINGS(no)
SIM_AC_OPTION_CGEN_MAINT
SIM_AC_OPTION_HARDWARE(lm32cpu lm32timer lm32uart)

View File

@ -1,3 +1,7 @@
2021-06-18 Mike Frysinger <vapier@gentoo.org>
* configure: Regenerate.
2021-06-17 Mike Frysinger <vapier@gentoo.org>
* configure: Regenerate.

9
sim/m32c/configure vendored
View File

@ -11149,15 +11149,14 @@ if test "${enable_werror+set}" = set; then :
fi
# Enable -Werror by default when using gcc
if test "${GCC}" = yes -a -z "${ERROR_ON_WARNING}" ; then
ERROR_ON_WARNING=yes
ERROR_ON_WARNING=yes
fi
WERROR_CFLAGS=""
if test "${ERROR_ON_WARNING}" = yes ; then
WERROR_CFLAGS="-Werror"
fi
if test "${ERROR_ON_WARNING}" = yes ; then
WERROR_CFLAGS="-Werror"
fi
build_warnings="-Wall -Wdeclaration-after-statement -Wpointer-arith \
-Wpointer-sign \

View File

@ -1,3 +1,9 @@
2021-06-18 Mike Frysinger <vapier@gentoo.org>
* Makefile.in (SIM_WERROR_CFLAGS): New variable.
* configure.ac: Delete call to SIM_AC_OPTION_WARNINGS.
* configure: Regenerate.
2021-06-18 Mike Frysinger <vapier@gentoo.org>
* traps-linux.c: Include sim-signal.h.

View File

@ -44,6 +44,9 @@ SIM_EXTRA_CFLAGS = @sim_extra_cflags@
SIM_EXTRA_CLEAN = m32r-clean
# Code doesn't build cleanly yet.
SIM_WERROR_CFLAGS =
## COMMON_POST_CONFIG_FRAG
arch = m32r

206
sim/m32r/configure vendored
View File

@ -773,11 +773,11 @@ enable_maintainer_mode
enable_sim_inline
enable_sim_scache
enable_sim_default_model
enable_cgen_maint
enable_sim_hardware
enable_werror
enable_build_warnings
enable_sim_build_warnings
enable_cgen_maint
enable_sim_hardware
'
ac_precious_vars='build_alias
host_alias
@ -1420,14 +1420,14 @@ Optional Features:
Specify simulator execution cache size
--enable-sim-default-model=model
Specify default model to simulate
--enable-cgen-maint=DIR build cgen generated files
--enable-sim-hardware=LIST
Specify the hardware to be included in the build.
--enable-werror treat compile warnings as errors
--enable-build-warnings enable build-time compiler warnings if gcc is used
--enable-sim-build-warnings
enable SIM specific build-time compiler warnings if
gcc is used
--enable-cgen-maint=DIR build cgen generated files
--enable-sim-hardware=LIST
Specify the hardware to be included in the build.
Optional Packages:
--with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
@ -11187,103 +11187,6 @@ 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 -Werror $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_maint=no
cgen=guile
cgendir='$(srcdir)/../../cgen'
@ -11429,6 +11332,105 @@ 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
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 -Werror $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=""
if grep CGEN_MAINT $srcdir/Makefile.in >/dev/null; then
cgen_breaks="break cgen_rtx_error";

View File

@ -6,7 +6,6 @@ SIM_AC_COMMON
SIM_AC_OPTION_SCACHE(16384)
SIM_AC_OPTION_DEFAULT_MODEL(m32r/d)
SIM_AC_OPTION_WARNINGS(no)
SIM_AC_OPTION_CGEN_MAINT
case "${target_alias}" in

View File

@ -15,7 +15,6 @@ dnl along with this program. If not, see <http://www.gnu.org/licenses/>.
dnl
dnl --enable-build-warnings is for developers of the simulator.
dnl it enables extra GCC specific warnings.
dnl arg[1] Enable -Werror by default? ("yes" or "no")
AC_DEFUN([SIM_AC_OPTION_WARNINGS],
[
AC_ARG_ENABLE(werror,
@ -26,17 +25,15 @@ AC_ARG_ENABLE(werror,
*) AC_MSG_ERROR(bad value ${enableval} for --enable-werror) ;;
esac])
# Enable -Werror by default when using gcc
dnl Enable -Werror by default when using gcc
if test "${GCC}" = yes -a -z "${ERROR_ON_WARNING}" ; then
ERROR_ON_WARNING=yes
ERROR_ON_WARNING=yes
fi
WERROR_CFLAGS=""
m4_if(m4_default([$1], [yes]), [yes], [dnl
if test "${ERROR_ON_WARNING}" = yes ; then
WERROR_CFLAGS="-Werror"
fi
])dnl
if test "${ERROR_ON_WARNING}" = yes ; then
WERROR_CFLAGS="-Werror"
fi
build_warnings="-Wall -Wdeclaration-after-statement -Wpointer-arith \
-Wpointer-sign \

View File

@ -1,3 +1,7 @@
2021-06-18 Mike Frysinger <vapier@gentoo.org>
* configure: Regenerate.
2021-06-18 Mike Frysinger <vapier@gentoo.org>
* dv-m68hc11eepr.c: Include sim-signal.h.

View File

@ -11248,15 +11248,14 @@ if test "${enable_werror+set}" = set; then :
fi
# Enable -Werror by default when using gcc
if test "${GCC}" = yes -a -z "${ERROR_ON_WARNING}" ; then
ERROR_ON_WARNING=yes
ERROR_ON_WARNING=yes
fi
WERROR_CFLAGS=""
if test "${ERROR_ON_WARNING}" = yes ; then
WERROR_CFLAGS="-Werror"
fi
if test "${ERROR_ON_WARNING}" = yes ; then
WERROR_CFLAGS="-Werror"
fi
build_warnings="-Wall -Wdeclaration-after-statement -Wpointer-arith \
-Wpointer-sign \

View File

@ -1,3 +1,7 @@
2021-06-18 Mike Frysinger <vapier@gentoo.org>
* configure: Regenerate.
2021-06-18 Mike Frysinger <vapier@gentoo.org>
* interp.c: Include sim-signal.h.

9
sim/mcore/configure vendored
View File

@ -11149,15 +11149,14 @@ if test "${enable_werror+set}" = set; then :
fi
# Enable -Werror by default when using gcc
if test "${GCC}" = yes -a -z "${ERROR_ON_WARNING}" ; then
ERROR_ON_WARNING=yes
ERROR_ON_WARNING=yes
fi
WERROR_CFLAGS=""
if test "${ERROR_ON_WARNING}" = yes ; then
WERROR_CFLAGS="-Werror"
fi
if test "${ERROR_ON_WARNING}" = yes ; then
WERROR_CFLAGS="-Werror"
fi
build_warnings="-Wall -Wdeclaration-after-statement -Wpointer-arith \
-Wpointer-sign \

View File

@ -1,3 +1,7 @@
2021-06-18 Mike Frysinger <vapier@gentoo.org>
* configure: Regenerate.
2021-06-18 Mike Frysinger <vapier@gentoo.org>
* interp.c: Include sim-signal.h.

View File

@ -11149,15 +11149,14 @@ if test "${enable_werror+set}" = set; then :
fi
# Enable -Werror by default when using gcc
if test "${GCC}" = yes -a -z "${ERROR_ON_WARNING}" ; then
ERROR_ON_WARNING=yes
ERROR_ON_WARNING=yes
fi
WERROR_CFLAGS=""
if test "${ERROR_ON_WARNING}" = yes ; then
WERROR_CFLAGS="-Werror"
fi
if test "${ERROR_ON_WARNING}" = yes ; then
WERROR_CFLAGS="-Werror"
fi
build_warnings="-Wall -Wdeclaration-after-statement -Wpointer-arith \
-Wpointer-sign \

View File

@ -1,3 +1,9 @@
2021-06-18 Mike Frysinger <vapier@gentoo.org>
* Makefile.in (SIM_WERROR_CFLAGS): New variable.
* configure.ac: Delete call to SIM_AC_OPTION_WARNINGS.
* configure: Regenerate.
2021-06-18 Mike Frysinger <vapier@gentoo.org>
* interp.c: Include sim-signal.h.

View File

@ -81,6 +81,8 @@ all: $(SIM_@sim_gen@_ALL)
SIM_EXTRA_DEPS = itable.h
# Code doesn't build cleanly yet.
SIM_WERROR_CFLAGS =
## COMMON_POST_CONFIG_FRAG

212
sim/mips/configure vendored
View File

@ -777,14 +777,14 @@ with_gnu_ld
enable_libtool_lock
enable_maintainer_mode
enable_sim_inline
enable_werror
enable_build_warnings
enable_sim_build_warnings
enable_sim_reserved_bits
enable_sim_bitsize
enable_sim_float
enable_sim_hardware
with_x
enable_werror
enable_build_warnings
enable_sim_build_warnings
'
ac_precious_vars='build_alias
host_alias
@ -1428,11 +1428,6 @@ Optional Features:
sometimes confusing) to the casual installer
--enable-sim-inline=inlines
Specify which functions should be inlined
--enable-werror treat compile warnings as errors
--enable-build-warnings enable build-time compiler warnings if gcc is used
--enable-sim-build-warnings
enable SIM specific build-time compiler warnings if
gcc is used
--enable-sim-reserved-bits
Specify whether to check reserved bits in
instruction
@ -1441,6 +1436,11 @@ Optional Features:
hardware
--enable-sim-hardware=LIST
Specify the hardware to be included in the build.
--enable-werror treat compile warnings as errors
--enable-build-warnings enable build-time compiler warnings if gcc is used
--enable-sim-build-warnings
enable SIM specific build-time compiler warnings if
gcc is used
Optional Packages:
--with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
@ -11167,103 +11167,6 @@ 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 -Werror $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"
# Check whether --enable-sim-reserved-bits was given.
if test "${enable_sim_reserved_bits+set}" = set; then :
@ -12102,6 +12005,105 @@ 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
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 -Werror $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=""
if grep CGEN_MAINT $srcdir/Makefile.in >/dev/null; then
cgen_breaks="break cgen_rtx_error";

View File

@ -5,7 +5,6 @@ AC_CONFIG_MACRO_DIRS([../m4 ../.. ../../config])
SIM_AC_COMMON
dnl Options available in this module
SIM_AC_OPTION_WARNINGS(no)
SIM_AC_OPTION_RESERVED_BITS(1)
# DEPRECATED

View File

@ -1,3 +1,7 @@
2021-06-18 Mike Frysinger <vapier@gentoo.org>
* configure: Regenerate.
2021-06-18 Mike Frysinger <vapier@gentoo.org>
* interp.c: Include sim-signal.h.

View File

@ -11328,15 +11328,14 @@ if test "${enable_werror+set}" = set; then :
fi
# Enable -Werror by default when using gcc
if test "${GCC}" = yes -a -z "${ERROR_ON_WARNING}" ; then
ERROR_ON_WARNING=yes
ERROR_ON_WARNING=yes
fi
WERROR_CFLAGS=""
if test "${ERROR_ON_WARNING}" = yes ; then
WERROR_CFLAGS="-Werror"
fi
if test "${ERROR_ON_WARNING}" = yes ; then
WERROR_CFLAGS="-Werror"
fi
build_warnings="-Wall -Wdeclaration-after-statement -Wpointer-arith \
-Wpointer-sign \

View File

@ -1,3 +1,7 @@
2021-06-18 Mike Frysinger <vapier@gentoo.org>
* configure: Regenerate.
2021-06-18 Mike Frysinger <vapier@gentoo.org>
* interp.c: Include sim-signal.h.

9
sim/moxie/configure vendored
View File

@ -11243,15 +11243,14 @@ if test "${enable_werror+set}" = set; then :
fi
# Enable -Werror by default when using gcc
if test "${GCC}" = yes -a -z "${ERROR_ON_WARNING}" ; then
ERROR_ON_WARNING=yes
ERROR_ON_WARNING=yes
fi
WERROR_CFLAGS=""
if test "${ERROR_ON_WARNING}" = yes ; then
WERROR_CFLAGS="-Werror"
fi
if test "${ERROR_ON_WARNING}" = yes ; then
WERROR_CFLAGS="-Werror"
fi
build_warnings="-Wall -Wdeclaration-after-statement -Wpointer-arith \
-Wpointer-sign \

View File

@ -1,3 +1,7 @@
2021-06-18 Mike Frysinger <vapier@gentoo.org>
* configure: Regenerate.
2021-06-18 Mike Frysinger <vapier@gentoo.org>
* msp430-sim.c: Include sim-signal.h.

View File

@ -11149,15 +11149,14 @@ if test "${enable_werror+set}" = set; then :
fi
# Enable -Werror by default when using gcc
if test "${GCC}" = yes -a -z "${ERROR_ON_WARNING}" ; then
ERROR_ON_WARNING=yes
ERROR_ON_WARNING=yes
fi
WERROR_CFLAGS=""
if test "${ERROR_ON_WARNING}" = yes ; then
WERROR_CFLAGS="-Werror"
fi
if test "${ERROR_ON_WARNING}" = yes ; then
WERROR_CFLAGS="-Werror"
fi
build_warnings="-Wall -Wdeclaration-after-statement -Wpointer-arith \
-Wpointer-sign \

View File

@ -1,3 +1,9 @@
2021-06-18 Mike Frysinger <vapier@gentoo.org>
* Makefile.in (SIM_WERROR_CFLAGS): New variable.
* configure.ac: Delete call to SIM_AC_OPTION_WARNINGS.
* configure: Regenerate.
2021-06-18 Mike Frysinger <vapier@gentoo.org>
* traps.c: Include sim-signal.h.

View File

@ -55,6 +55,9 @@ SIM_EXTRA_LIBS = -lm
SIM_EXTRA_CLEAN = or1k-clean
# Code doesn't build cleanly yet.
SIM_WERROR_CFLAGS =
## COMMON_POST_CONFIG_FRAG
arch = or1k

78
sim/or1k/configure vendored
View File

@ -772,10 +772,10 @@ enable_sim_inline
enable_sim_bitsize
enable_sim_scache
enable_sim_default_model
enable_cgen_maint
enable_werror
enable_build_warnings
enable_sim_build_warnings
enable_cgen_maint
enable_sim_hardware
'
ac_precious_vars='build_alias
@ -1420,12 +1420,12 @@ Optional Features:
Specify simulator execution cache size
--enable-sim-default-model=model
Specify default model to simulate
--enable-cgen-maint=DIR build cgen generated files
--enable-werror treat compile warnings as errors
--enable-build-warnings enable build-time compiler warnings if gcc is used
--enable-sim-build-warnings
enable SIM specific build-time compiler warnings if
gcc is used
--enable-cgen-maint=DIR build cgen generated files
--enable-sim-hardware=LIST
Specify the hardware to be included in the build.
@ -11246,6 +11246,40 @@ fi
cgen_maint=no
cgen=guile
cgendir='$(srcdir)/../../cgen'
# Check whether --enable-cgen-maint was given.
if test "${enable_cgen_maint+set}" = set; then :
enableval=$enable_cgen_maint; case "${enableval}" in
yes) cgen_maint=yes ;;
no) cgen_maint=no ;;
*)
# Argument is a directory where cgen can be found. In some
# future world cgen could be installable, but right now this
# is not the case. Instead we assume the directory is a path
# to the cgen source tree.
cgen_maint=yes
if test -r ${enableval}/iformat.scm; then
# This looks like a cgen source tree.
cgendir=${enableval}
else
as_fn_error $? "${enableval} doesn't look like a cgen source tree" "$LINENO" 5
fi
;;
esac
fi
if test x${cgen_maint} != xno ; then
CGEN_MAINT=''
else
CGEN_MAINT='#'
fi
# Check whether --enable-werror was given.
if test "${enable_werror+set}" = set; then :
enableval=$enable_werror; case "${enableval}" in
@ -11256,12 +11290,14 @@ if test "${enable_werror+set}" = set; then :
fi
# Enable -Werror by default when using gcc
if test "${GCC}" = yes -a -z "${ERROR_ON_WARNING}" ; then
ERROR_ON_WARNING=yes
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 \
@ -11343,40 +11379,6 @@ $as_echo "${WARN_CFLAGS} ${WERROR_CFLAGS}" >&6; }
fi
cgen_maint=no
cgen=guile
cgendir='$(srcdir)/../../cgen'
# Check whether --enable-cgen-maint was given.
if test "${enable_cgen_maint+set}" = set; then :
enableval=$enable_cgen_maint; case "${enableval}" in
yes) cgen_maint=yes ;;
no) cgen_maint=no ;;
*)
# Argument is a directory where cgen can be found. In some
# future world cgen could be installable, but right now this
# is not the case. Instead we assume the directory is a path
# to the cgen source tree.
cgen_maint=yes
if test -r ${enableval}/iformat.scm; then
# This looks like a cgen source tree.
cgendir=${enableval}
else
as_fn_error $? "${enableval} doesn't look like a cgen source tree" "$LINENO" 5
fi
;;
esac
fi
if test x${cgen_maint} != xno ; then
CGEN_MAINT=''
else
CGEN_MAINT='#'
fi
hardware="cfi core pal glue "
sim_hw_cflags="-DWITH_HW=1"
sim_hw="$hardware"

View File

@ -7,7 +7,6 @@ SIM_AC_COMMON
SIM_AC_OPTION_BITSIZE([32], [31], [32])
SIM_AC_OPTION_SCACHE(16384)
SIM_AC_OPTION_DEFAULT_MODEL([or1200])
SIM_AC_OPTION_WARNINGS(no)
SIM_AC_OPTION_CGEN_MAINT
SIM_AC_OUTPUT

View File

@ -1,3 +1,7 @@
2021-06-18 Mike Frysinger <vapier@gentoo.org>
* configure: Regenerate.
2021-06-18 Mike Frysinger <vapier@gentoo.org>
* interp.c: Include sim-signal.h.

9
sim/pru/configure vendored
View File

@ -11149,15 +11149,14 @@ if test "${enable_werror+set}" = set; then :
fi
# Enable -Werror by default when using gcc
if test "${GCC}" = yes -a -z "${ERROR_ON_WARNING}" ; then
ERROR_ON_WARNING=yes
ERROR_ON_WARNING=yes
fi
WERROR_CFLAGS=""
if test "${ERROR_ON_WARNING}" = yes ; then
WERROR_CFLAGS="-Werror"
fi
if test "${ERROR_ON_WARNING}" = yes ; then
WERROR_CFLAGS="-Werror"
fi
build_warnings="-Wall -Wdeclaration-after-statement -Wpointer-arith \
-Wpointer-sign \

View File

@ -1,3 +1,7 @@
2021-06-18 Mike Frysinger <vapier@gentoo.org>
* configure: Regenerate.
2021-06-18 Mike Frysinger <vapier@gentoo.org>
* sim-main.c: Include sim-signal.h.

9
sim/riscv/configure vendored
View File

@ -11243,15 +11243,14 @@ if test "${enable_werror+set}" = set; then :
fi
# Enable -Werror by default when using gcc
if test "${GCC}" = yes -a -z "${ERROR_ON_WARNING}" ; then
ERROR_ON_WARNING=yes
ERROR_ON_WARNING=yes
fi
WERROR_CFLAGS=""
if test "${ERROR_ON_WARNING}" = yes ; then
WERROR_CFLAGS="-Werror"
fi
if test "${ERROR_ON_WARNING}" = yes ; then
WERROR_CFLAGS="-Werror"
fi
build_warnings="-Wall -Wdeclaration-after-statement -Wpointer-arith \
-Wpointer-sign \

View File

@ -1,3 +1,7 @@
2021-06-18 Mike Frysinger <vapier@gentoo.org>
* configure: Regenerate.
2021-06-17 Mike Frysinger <vapier@gentoo.org>
* configure: Regenerate.

9
sim/rl78/configure vendored
View File

@ -11149,15 +11149,14 @@ if test "${enable_werror+set}" = set; then :
fi
# Enable -Werror by default when using gcc
if test "${GCC}" = yes -a -z "${ERROR_ON_WARNING}" ; then
ERROR_ON_WARNING=yes
ERROR_ON_WARNING=yes
fi
WERROR_CFLAGS=""
if test "${ERROR_ON_WARNING}" = yes ; then
WERROR_CFLAGS="-Werror"
fi
if test "${ERROR_ON_WARNING}" = yes ; then
WERROR_CFLAGS="-Werror"
fi
build_warnings="-Wall -Wdeclaration-after-statement -Wpointer-arith \
-Wpointer-sign \

View File

@ -1,3 +1,7 @@
2021-06-18 Mike Frysinger <vapier@gentoo.org>
* configure: Regenerate.
2021-06-17 Mike Frysinger <vapier@gentoo.org>
* configure: Regenerate.

9
sim/rx/configure vendored
View File

@ -11169,15 +11169,14 @@ if test "${enable_werror+set}" = set; then :
fi
# Enable -Werror by default when using gcc
if test "${GCC}" = yes -a -z "${ERROR_ON_WARNING}" ; then
ERROR_ON_WARNING=yes
ERROR_ON_WARNING=yes
fi
WERROR_CFLAGS=""
if test "${ERROR_ON_WARNING}" = yes ; then
WERROR_CFLAGS="-Werror"
fi
if test "${ERROR_ON_WARNING}" = yes ; then
WERROR_CFLAGS="-Werror"
fi
build_warnings="-Wall -Wdeclaration-after-statement -Wpointer-arith \
-Wpointer-sign \

View File

@ -1,3 +1,9 @@
2021-06-18 Mike Frysinger <vapier@gentoo.org>
* Makefile.in (SIM_WERROR_CFLAGS): New variable.
* configure.ac: Delete call to SIM_AC_OPTION_WARNINGS.
* configure: Regenerate.
2021-06-17 Mike Frysinger <vapier@gentoo.org>
* configure.ac: Delete SIM_AC_OPTION_ENDIAN call.

View File

@ -28,6 +28,9 @@ SIM_EXTRA_LIBS = -lm
SIM_EXTRA_CLEAN = sh-clean
SIM_EXTRA_DEPS = table.c code.c ppi.c
# Code doesn't build cleanly yet.
SIM_WERROR_CFLAGS =
## COMMON_POST_CONFIG_FRAG
code.c: gencode

7
sim/sh/configure vendored
View File

@ -11149,12 +11149,14 @@ if test "${enable_werror+set}" = set; then :
fi
# Enable -Werror by default when using gcc
if test "${GCC}" = yes -a -z "${ERROR_ON_WARNING}" ; then
ERROR_ON_WARNING=yes
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 \
@ -11236,7 +11238,6 @@ $as_echo "${WARN_CFLAGS} ${WERROR_CFLAGS}" >&6; }
fi
hardware="cfi core pal glue "
sim_hw_cflags="-DWITH_HW=1"
sim_hw="$hardware"

View File

@ -4,6 +4,4 @@ AC_CONFIG_MACRO_DIRS([../m4 ../.. ../../config])
SIM_AC_COMMON
SIM_AC_OPTION_WARNINGS(no)
SIM_AC_OUTPUT

View File

@ -1,3 +1,7 @@
2021-06-18 Mike Frysinger <vapier@gentoo.org>
* configure: Regenerate.
2021-06-18 Mike Frysinger <vapier@gentoo.org>
* simops.c: Include sim-signal.h.

9
sim/v850/configure vendored
View File

@ -11231,15 +11231,14 @@ if test "${enable_werror+set}" = set; then :
fi
# Enable -Werror by default when using gcc
if test "${GCC}" = yes -a -z "${ERROR_ON_WARNING}" ; then
ERROR_ON_WARNING=yes
ERROR_ON_WARNING=yes
fi
WERROR_CFLAGS=""
if test "${ERROR_ON_WARNING}" = yes ; then
WERROR_CFLAGS="-Werror"
fi
if test "${ERROR_ON_WARNING}" = yes ; then
WERROR_CFLAGS="-Werror"
fi
build_warnings="-Wall -Wdeclaration-after-statement -Wpointer-arith \
-Wpointer-sign \