From: Mike Frysinger Date: Fri, 18 Jun 2021 06:14:52 +0000 (-0400) Subject: sim: move -Werror disabling to Makefile X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=982c3a65ca5dbea8d6de3afd934f0a06fef54383;p=binutils-gdb.git 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. --- diff --git a/sim/ChangeLog b/sim/ChangeLog index 65d0f11f41e..70c02b85d25 100644 --- a/sim/ChangeLog +++ b/sim/ChangeLog @@ -1,3 +1,7 @@ +2021-06-18 Mike Frysinger + + * m4/sim_ac_option_warnings.m4: Delete 1st arg to macro. + 2021-06-18 Mike Frysinger * configure.ac: Output arch-subdir.mk. diff --git a/sim/aarch64/ChangeLog b/sim/aarch64/ChangeLog index f5d1990119a..97bea6de125 100644 --- a/sim/aarch64/ChangeLog +++ b/sim/aarch64/ChangeLog @@ -1,3 +1,7 @@ +2021-06-18 Mike Frysinger + + * configure: Regenerate. + 2021-06-18 Mike Frysinger * cpustate.c: Include sim-signal.h. diff --git a/sim/aarch64/configure b/sim/aarch64/configure index 2c8a6e0abab..371c3553ce0 100755 --- a/sim/aarch64/configure +++ b/sim/aarch64/configure @@ -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 \ diff --git a/sim/arm/ChangeLog b/sim/arm/ChangeLog index 8bb9bffbfb0..866d168e462 100644 --- a/sim/arm/ChangeLog +++ b/sim/arm/ChangeLog @@ -1,3 +1,7 @@ +2021-06-18 Mike Frysinger + + * configure: Regenerate. + 2021-06-17 Mike Frysinger * configure.ac: Delete SIM_AC_OPTION_ENDIAN call. diff --git a/sim/arm/configure b/sim/arm/configure index 2c8a6e0abab..371c3553ce0 100755 --- a/sim/arm/configure +++ b/sim/arm/configure @@ -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 \ diff --git a/sim/avr/ChangeLog b/sim/avr/ChangeLog index 6fa075c477c..0d94305280b 100644 --- a/sim/avr/ChangeLog +++ b/sim/avr/ChangeLog @@ -1,3 +1,7 @@ +2021-06-18 Mike Frysinger + + * configure: Regenerate. + 2021-06-18 Mike Frysinger * interp.c: Include sim-signal.h. diff --git a/sim/avr/configure b/sim/avr/configure index 2c8a6e0abab..371c3553ce0 100755 --- a/sim/avr/configure +++ b/sim/avr/configure @@ -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 \ diff --git a/sim/bfin/ChangeLog b/sim/bfin/ChangeLog index 1e83b2b6672..9507033ef27 100644 --- a/sim/bfin/ChangeLog +++ b/sim/bfin/ChangeLog @@ -1,3 +1,7 @@ +2021-06-18 Mike Frysinger + + * configure: Regenerate. + 2021-06-18 Mike Frysinger * dv-bfin_cec.c: Include sim-signal.h. diff --git a/sim/bfin/configure b/sim/bfin/configure index d4aa3a21f0c..1344e1e5f89 100755 --- a/sim/bfin/configure +++ b/sim/bfin/configure @@ -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 \ diff --git a/sim/bpf/ChangeLog b/sim/bpf/ChangeLog index fd12bbf778c..08d5af8edfa 100644 --- a/sim/bpf/ChangeLog +++ b/sim/bpf/ChangeLog @@ -1,3 +1,9 @@ +2021-06-18 Mike Frysinger + + * Makefile.in (SIM_WERROR_CFLAGS): New variable. + * configure.ac: Delete call to SIM_AC_OPTION_WARNINGS. + * configure: Regenerate. + 2021-06-18 Mike Frysinger * bpf.c: Include sim-signal.h. diff --git a/sim/bpf/Makefile.in b/sim/bpf/Makefile.in index c19d13c9046..d165febdd34 100644 --- a/sim/bpf/Makefile.in +++ b/sim/bpf/Makefile.in @@ -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 diff --git a/sim/bpf/configure b/sim/bpf/configure index a0ed8ab4c37..15f8b7ce820 100755 --- a/sim/bpf/configure +++ b/sim/bpf/configure @@ -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" diff --git a/sim/bpf/configure.ac b/sim/bpf/configure.ac index d2ec00c5a34..a4138c097a8 100644 --- a/sim/bpf/configure.ac +++ b/sim/bpf/configure.ac @@ -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 diff --git a/sim/cr16/ChangeLog b/sim/cr16/ChangeLog index b79d0312937..a05768c4551 100644 --- a/sim/cr16/ChangeLog +++ b/sim/cr16/ChangeLog @@ -1,3 +1,7 @@ +2021-06-18 Mike Frysinger + + * configure: Regenerate. + 2021-06-18 Mike Frysinger * interp.c: Include sim-signal.h. diff --git a/sim/cr16/configure b/sim/cr16/configure index 2c8a6e0abab..371c3553ce0 100755 --- a/sim/cr16/configure +++ b/sim/cr16/configure @@ -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 \ diff --git a/sim/cris/ChangeLog b/sim/cris/ChangeLog index a69349a7660..34a6264972f 100644 --- a/sim/cris/ChangeLog +++ b/sim/cris/ChangeLog @@ -1,3 +1,9 @@ +2021-06-18 Mike Frysinger + + * Makefile.in (SIM_WERROR_CFLAGS): New variable. + * configure.ac: Delete call to SIM_AC_OPTION_WARNINGS. + * configure: Regenerate. + 2021-06-18 Mike Frysinger * traps.c: Include sim-signal.h. diff --git a/sim/cris/Makefile.in b/sim/cris/Makefile.in index 4d0cdd243a0..0b4b8f5c530 100644 --- a/sim/cris/Makefile.in +++ b/sim/cris/Makefile.in @@ -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 diff --git a/sim/cris/configure b/sim/cris/configure index cd6fe783175..7d82dbde254 100755 --- a/sim/cris/configure +++ b/sim/cris/configure @@ -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"; diff --git a/sim/cris/configure.ac b/sim/cris/configure.ac index 48c4bbeabac..d94eabb683a 100644 --- a/sim/cris/configure.ac +++ b/sim/cris/configure.ac @@ -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. diff --git a/sim/d10v/ChangeLog b/sim/d10v/ChangeLog index 429b4d00b7e..7157567847a 100644 --- a/sim/d10v/ChangeLog +++ b/sim/d10v/ChangeLog @@ -1,3 +1,7 @@ +2021-06-18 Mike Frysinger + + * configure: Regenerate. + 2021-06-18 Mike Frysinger * interp.c: Include sim-signal.h. diff --git a/sim/d10v/configure b/sim/d10v/configure index 2c8a6e0abab..371c3553ce0 100755 --- a/sim/d10v/configure +++ b/sim/d10v/configure @@ -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 \ diff --git a/sim/erc32/ChangeLog b/sim/erc32/ChangeLog index 24d1aacb7d7..94a0cb92b56 100644 --- a/sim/erc32/ChangeLog +++ b/sim/erc32/ChangeLog @@ -1,3 +1,9 @@ +2021-06-18 Mike Frysinger + + * Makefile.in (SIM_WERROR_CFLAGS): New variable. + * configure.ac: Delete call to SIM_AC_OPTION_WARNINGS. + * configure: Regenerate. + 2021-06-17 Mike Frysinger * configure: Regenerate. diff --git a/sim/erc32/Makefile.in b/sim/erc32/Makefile.in index 5c29b0abfb7..278b4792dae 100644 --- a/sim/erc32/Makefile.in +++ b/sim/erc32/Makefile.in @@ -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. diff --git a/sim/erc32/configure b/sim/erc32/configure index 2b10dc4be1d..04122f7ee26 100755 --- a/sim/erc32/configure +++ b/sim/erc32/configure @@ -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" diff --git a/sim/erc32/configure.ac b/sim/erc32/configure.ac index cf7ec5fdb80..3cb35d80f57 100644 --- a/sim/erc32/configure.ac +++ b/sim/erc32/configure.ac @@ -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, diff --git a/sim/example-synacor/ChangeLog b/sim/example-synacor/ChangeLog index a55ed0fdd55..bee0c95b442 100644 --- a/sim/example-synacor/ChangeLog +++ b/sim/example-synacor/ChangeLog @@ -1,3 +1,7 @@ +2021-06-18 Mike Frysinger + + * configure: Regenerate. + 2021-06-18 Mike Frysinger * sim-main.c: Include sim-signal.h. diff --git a/sim/example-synacor/configure b/sim/example-synacor/configure index 2c8a6e0abab..371c3553ce0 100755 --- a/sim/example-synacor/configure +++ b/sim/example-synacor/configure @@ -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 \ diff --git a/sim/frv/ChangeLog b/sim/frv/ChangeLog index 16bbf486c5f..c984f117813 100644 --- a/sim/frv/ChangeLog +++ b/sim/frv/ChangeLog @@ -1,3 +1,9 @@ +2021-06-18 Mike Frysinger + + * Makefile.in (SIM_WERROR_CFLAGS): New variable. + * configure.ac: Delete call to SIM_AC_OPTION_WARNINGS. + * configure: Regenerate. + 2021-06-18 Mike Frysinger * interrupts.c: Include sim-signal.h. diff --git a/sim/frv/Makefile.in b/sim/frv/Makefile.in index 7d1eaf51e02..5356add6f0a 100644 --- a/sim/frv/Makefile.in +++ b/sim/frv/Makefile.in @@ -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 diff --git a/sim/frv/configure b/sim/frv/configure index a578200c5b9..685a3d1a20a 100755 --- a/sim/frv/configure +++ b/sim/frv/configure @@ -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" diff --git a/sim/frv/configure.ac b/sim/frv/configure.ac index 39d8de4a5b8..f652e269a3b 100644 --- a/sim/frv/configure.ac +++ b/sim/frv/configure.ac @@ -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 # diff --git a/sim/ft32/ChangeLog b/sim/ft32/ChangeLog index 19ffbada539..e57f29fcd40 100644 --- a/sim/ft32/ChangeLog +++ b/sim/ft32/ChangeLog @@ -1,3 +1,7 @@ +2021-06-18 Mike Frysinger + + * configure: Regenerate. + 2021-06-18 Mike Frysinger * interp.c: Include sim-signal.h. diff --git a/sim/ft32/configure b/sim/ft32/configure index 2c8a6e0abab..371c3553ce0 100755 --- a/sim/ft32/configure +++ b/sim/ft32/configure @@ -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 \ diff --git a/sim/h8300/ChangeLog b/sim/h8300/ChangeLog index 72e2926f084..bd506aad35d 100644 --- a/sim/h8300/ChangeLog +++ b/sim/h8300/ChangeLog @@ -1,3 +1,7 @@ +2021-06-18 Mike Frysinger + + * configure: Regenerate. + 2021-06-18 Mike Frysinger * compile.c: Include sim-signal.h. diff --git a/sim/h8300/configure b/sim/h8300/configure index 2c8a6e0abab..371c3553ce0 100755 --- a/sim/h8300/configure +++ b/sim/h8300/configure @@ -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 \ diff --git a/sim/iq2000/ChangeLog b/sim/iq2000/ChangeLog index 5318570f9de..737fad363a9 100644 --- a/sim/iq2000/ChangeLog +++ b/sim/iq2000/ChangeLog @@ -1,3 +1,9 @@ +2021-06-18 Mike Frysinger + + * Makefile.in (SIM_WERROR_CFLAGS): New variable. + * configure.ac: Delete call to SIM_AC_OPTION_WARNINGS. + * configure: Regenerate. + 2021-06-18 Mike Frysinger * iq2000.c: Include sim-signal.h. diff --git a/sim/iq2000/Makefile.in b/sim/iq2000/Makefile.in index dfa0e67a767..f7a77c2eefd 100644 --- a/sim/iq2000/Makefile.in +++ b/sim/iq2000/Makefile.in @@ -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 diff --git a/sim/iq2000/configure b/sim/iq2000/configure index a6467398ff7..b83dfb647db 100755 --- a/sim/iq2000/configure +++ b/sim/iq2000/configure @@ -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" diff --git a/sim/iq2000/configure.ac b/sim/iq2000/configure.ac index 4afa1b3501d..92c10d2eb18 100644 --- a/sim/iq2000/configure.ac +++ b/sim/iq2000/configure.ac @@ -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 diff --git a/sim/lm32/ChangeLog b/sim/lm32/ChangeLog index 7aee807480c..c82947a23f0 100644 --- a/sim/lm32/ChangeLog +++ b/sim/lm32/ChangeLog @@ -1,3 +1,9 @@ +2021-06-18 Mike Frysinger + + * Makefile.in (SIM_WERROR_CFLAGS): New variable. + * configure.ac: Delete call to SIM_AC_OPTION_WARNINGS. + * configure: Regenerate. + 2021-06-18 Mike Frysinger * traps.c: Include sim-signal.h. diff --git a/sim/lm32/Makefile.in b/sim/lm32/Makefile.in index 31c39400df8..29489bcf7e4 100644 --- a/sim/lm32/Makefile.in +++ b/sim/lm32/Makefile.in @@ -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 diff --git a/sim/lm32/configure b/sim/lm32/configure index 6c1d03d5171..6fb3d9727ca 100755 --- a/sim/lm32/configure +++ b/sim/lm32/configure @@ -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"; diff --git a/sim/lm32/configure.ac b/sim/lm32/configure.ac index 06c65569642..32bbd1b4ac1 100644 --- a/sim/lm32/configure.ac +++ b/sim/lm32/configure.ac @@ -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) diff --git a/sim/m32c/ChangeLog b/sim/m32c/ChangeLog index 18a2882e858..8c3703a14f3 100644 --- a/sim/m32c/ChangeLog +++ b/sim/m32c/ChangeLog @@ -1,3 +1,7 @@ +2021-06-18 Mike Frysinger + + * configure: Regenerate. + 2021-06-17 Mike Frysinger * configure: Regenerate. diff --git a/sim/m32c/configure b/sim/m32c/configure index 2c8a6e0abab..371c3553ce0 100755 --- a/sim/m32c/configure +++ b/sim/m32c/configure @@ -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 \ diff --git a/sim/m32r/ChangeLog b/sim/m32r/ChangeLog index f6600506b89..bdf8490088e 100644 --- a/sim/m32r/ChangeLog +++ b/sim/m32r/ChangeLog @@ -1,3 +1,9 @@ +2021-06-18 Mike Frysinger + + * Makefile.in (SIM_WERROR_CFLAGS): New variable. + * configure.ac: Delete call to SIM_AC_OPTION_WARNINGS. + * configure: Regenerate. + 2021-06-18 Mike Frysinger * traps-linux.c: Include sim-signal.h. diff --git a/sim/m32r/Makefile.in b/sim/m32r/Makefile.in index 2bb246d2524..272974572ec 100644 --- a/sim/m32r/Makefile.in +++ b/sim/m32r/Makefile.in @@ -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 diff --git a/sim/m32r/configure b/sim/m32r/configure index 1f12c92e04b..b144a151107 100755 --- a/sim/m32r/configure +++ b/sim/m32r/configure @@ -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"; diff --git a/sim/m32r/configure.ac b/sim/m32r/configure.ac index 9377081e938..3146feee640 100644 --- a/sim/m32r/configure.ac +++ b/sim/m32r/configure.ac @@ -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 diff --git a/sim/m4/sim_ac_option_warnings.m4 b/sim/m4/sim_ac_option_warnings.m4 index c831fa82596..5a0fe304e9c 100644 --- a/sim/m4/sim_ac_option_warnings.m4 +++ b/sim/m4/sim_ac_option_warnings.m4 @@ -15,7 +15,6 @@ dnl along with this program. If not, see . 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 \ diff --git a/sim/m68hc11/ChangeLog b/sim/m68hc11/ChangeLog index dd9ccce12a0..fffa98c1051 100644 --- a/sim/m68hc11/ChangeLog +++ b/sim/m68hc11/ChangeLog @@ -1,3 +1,7 @@ +2021-06-18 Mike Frysinger + + * configure: Regenerate. + 2021-06-18 Mike Frysinger * dv-m68hc11eepr.c: Include sim-signal.h. diff --git a/sim/m68hc11/configure b/sim/m68hc11/configure index 1ed8c04f089..e24c6503e5e 100755 --- a/sim/m68hc11/configure +++ b/sim/m68hc11/configure @@ -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 \ diff --git a/sim/mcore/ChangeLog b/sim/mcore/ChangeLog index 3757d295169..1a6cdbc6a5d 100644 --- a/sim/mcore/ChangeLog +++ b/sim/mcore/ChangeLog @@ -1,3 +1,7 @@ +2021-06-18 Mike Frysinger + + * configure: Regenerate. + 2021-06-18 Mike Frysinger * interp.c: Include sim-signal.h. diff --git a/sim/mcore/configure b/sim/mcore/configure index 2c8a6e0abab..371c3553ce0 100755 --- a/sim/mcore/configure +++ b/sim/mcore/configure @@ -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 \ diff --git a/sim/microblaze/ChangeLog b/sim/microblaze/ChangeLog index abeac71e5b1..10e4fffbadc 100644 --- a/sim/microblaze/ChangeLog +++ b/sim/microblaze/ChangeLog @@ -1,3 +1,7 @@ +2021-06-18 Mike Frysinger + + * configure: Regenerate. + 2021-06-18 Mike Frysinger * interp.c: Include sim-signal.h. diff --git a/sim/microblaze/configure b/sim/microblaze/configure index 2c8a6e0abab..371c3553ce0 100755 --- a/sim/microblaze/configure +++ b/sim/microblaze/configure @@ -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 \ diff --git a/sim/mips/ChangeLog b/sim/mips/ChangeLog index 2ad72ef94c0..33081739bd6 100644 --- a/sim/mips/ChangeLog +++ b/sim/mips/ChangeLog @@ -1,3 +1,9 @@ +2021-06-18 Mike Frysinger + + * Makefile.in (SIM_WERROR_CFLAGS): New variable. + * configure.ac: Delete call to SIM_AC_OPTION_WARNINGS. + * configure: Regenerate. + 2021-06-18 Mike Frysinger * interp.c: Include sim-signal.h. diff --git a/sim/mips/Makefile.in b/sim/mips/Makefile.in index 7e1356ca4f6..2f79c56cbcb 100644 --- a/sim/mips/Makefile.in +++ b/sim/mips/Makefile.in @@ -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 diff --git a/sim/mips/configure b/sim/mips/configure index 55041fdffad..db16388b969 100755 --- a/sim/mips/configure +++ b/sim/mips/configure @@ -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"; diff --git a/sim/mips/configure.ac b/sim/mips/configure.ac index 03d8f5169e7..88f06ee13c9 100644 --- a/sim/mips/configure.ac +++ b/sim/mips/configure.ac @@ -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 diff --git a/sim/mn10300/ChangeLog b/sim/mn10300/ChangeLog index 6bdb23ee129..c8853624754 100644 --- a/sim/mn10300/ChangeLog +++ b/sim/mn10300/ChangeLog @@ -1,3 +1,7 @@ +2021-06-18 Mike Frysinger + + * configure: Regenerate. + 2021-06-18 Mike Frysinger * interp.c: Include sim-signal.h. diff --git a/sim/mn10300/configure b/sim/mn10300/configure index d24ac1df39e..43005f7c138 100755 --- a/sim/mn10300/configure +++ b/sim/mn10300/configure @@ -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 \ diff --git a/sim/moxie/ChangeLog b/sim/moxie/ChangeLog index 66f7b61751c..71a84c74066 100644 --- a/sim/moxie/ChangeLog +++ b/sim/moxie/ChangeLog @@ -1,3 +1,7 @@ +2021-06-18 Mike Frysinger + + * configure: Regenerate. + 2021-06-18 Mike Frysinger * interp.c: Include sim-signal.h. diff --git a/sim/moxie/configure b/sim/moxie/configure index 26ccbb3d01e..de69f08cfb9 100755 --- a/sim/moxie/configure +++ b/sim/moxie/configure @@ -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 \ diff --git a/sim/msp430/ChangeLog b/sim/msp430/ChangeLog index 08743987d43..04aa101f3d4 100644 --- a/sim/msp430/ChangeLog +++ b/sim/msp430/ChangeLog @@ -1,3 +1,7 @@ +2021-06-18 Mike Frysinger + + * configure: Regenerate. + 2021-06-18 Mike Frysinger * msp430-sim.c: Include sim-signal.h. diff --git a/sim/msp430/configure b/sim/msp430/configure index 2c8a6e0abab..371c3553ce0 100755 --- a/sim/msp430/configure +++ b/sim/msp430/configure @@ -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 \ diff --git a/sim/or1k/ChangeLog b/sim/or1k/ChangeLog index 33799acf029..a5a1960a6d9 100644 --- a/sim/or1k/ChangeLog +++ b/sim/or1k/ChangeLog @@ -1,3 +1,9 @@ +2021-06-18 Mike Frysinger + + * Makefile.in (SIM_WERROR_CFLAGS): New variable. + * configure.ac: Delete call to SIM_AC_OPTION_WARNINGS. + * configure: Regenerate. + 2021-06-18 Mike Frysinger * traps.c: Include sim-signal.h. diff --git a/sim/or1k/Makefile.in b/sim/or1k/Makefile.in index 649486fd4e1..c6083b0cd6e 100644 --- a/sim/or1k/Makefile.in +++ b/sim/or1k/Makefile.in @@ -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 diff --git a/sim/or1k/configure b/sim/or1k/configure index d73662434ab..fa8853c4e9d 100755 --- a/sim/or1k/configure +++ b/sim/or1k/configure @@ -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" diff --git a/sim/or1k/configure.ac b/sim/or1k/configure.ac index ed8538eb108..576574c2ded 100644 --- a/sim/or1k/configure.ac +++ b/sim/or1k/configure.ac @@ -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 diff --git a/sim/pru/ChangeLog b/sim/pru/ChangeLog index 6e06c7391db..68e2941cb98 100644 --- a/sim/pru/ChangeLog +++ b/sim/pru/ChangeLog @@ -1,3 +1,7 @@ +2021-06-18 Mike Frysinger + + * configure: Regenerate. + 2021-06-18 Mike Frysinger * interp.c: Include sim-signal.h. diff --git a/sim/pru/configure b/sim/pru/configure index 2c8a6e0abab..371c3553ce0 100755 --- a/sim/pru/configure +++ b/sim/pru/configure @@ -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 \ diff --git a/sim/riscv/ChangeLog b/sim/riscv/ChangeLog index 925fa0cc576..ba8734c421c 100644 --- a/sim/riscv/ChangeLog +++ b/sim/riscv/ChangeLog @@ -1,3 +1,7 @@ +2021-06-18 Mike Frysinger + + * configure: Regenerate. + 2021-06-18 Mike Frysinger * sim-main.c: Include sim-signal.h. diff --git a/sim/riscv/configure b/sim/riscv/configure index cdbedcceabc..94bf447bede 100755 --- a/sim/riscv/configure +++ b/sim/riscv/configure @@ -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 \ diff --git a/sim/rl78/ChangeLog b/sim/rl78/ChangeLog index a2e2cfbd51a..123392da8b4 100644 --- a/sim/rl78/ChangeLog +++ b/sim/rl78/ChangeLog @@ -1,3 +1,7 @@ +2021-06-18 Mike Frysinger + + * configure: Regenerate. + 2021-06-17 Mike Frysinger * configure: Regenerate. diff --git a/sim/rl78/configure b/sim/rl78/configure index 2c8a6e0abab..371c3553ce0 100755 --- a/sim/rl78/configure +++ b/sim/rl78/configure @@ -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 \ diff --git a/sim/rx/ChangeLog b/sim/rx/ChangeLog index 0b3cbc6efc7..8ed41af2053 100644 --- a/sim/rx/ChangeLog +++ b/sim/rx/ChangeLog @@ -1,3 +1,7 @@ +2021-06-18 Mike Frysinger + + * configure: Regenerate. + 2021-06-17 Mike Frysinger * configure: Regenerate. diff --git a/sim/rx/configure b/sim/rx/configure index 7200bcb42c4..837b7efad4b 100755 --- a/sim/rx/configure +++ b/sim/rx/configure @@ -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 \ diff --git a/sim/sh/ChangeLog b/sim/sh/ChangeLog index 950fe1a3f70..aeb2d0e8d0c 100644 --- a/sim/sh/ChangeLog +++ b/sim/sh/ChangeLog @@ -1,3 +1,9 @@ +2021-06-18 Mike Frysinger + + * Makefile.in (SIM_WERROR_CFLAGS): New variable. + * configure.ac: Delete call to SIM_AC_OPTION_WARNINGS. + * configure: Regenerate. + 2021-06-17 Mike Frysinger * configure.ac: Delete SIM_AC_OPTION_ENDIAN call. diff --git a/sim/sh/Makefile.in b/sim/sh/Makefile.in index 84d417287d1..e43fb5a17e8 100644 --- a/sim/sh/Makefile.in +++ b/sim/sh/Makefile.in @@ -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 diff --git a/sim/sh/configure b/sim/sh/configure index 661ad09e3ce..371c3553ce0 100755 --- a/sim/sh/configure +++ b/sim/sh/configure @@ -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" diff --git a/sim/sh/configure.ac b/sim/sh/configure.ac index 9bf4a4099ee..08bf6ff8acb 100644 --- a/sim/sh/configure.ac +++ b/sim/sh/configure.ac @@ -4,6 +4,4 @@ AC_CONFIG_MACRO_DIRS([../m4 ../.. ../../config]) SIM_AC_COMMON -SIM_AC_OPTION_WARNINGS(no) - SIM_AC_OUTPUT diff --git a/sim/v850/ChangeLog b/sim/v850/ChangeLog index 23f432cfd5d..b3fc86f4b41 100644 --- a/sim/v850/ChangeLog +++ b/sim/v850/ChangeLog @@ -1,3 +1,7 @@ +2021-06-18 Mike Frysinger + + * configure: Regenerate. + 2021-06-18 Mike Frysinger * simops.c: Include sim-signal.h. diff --git a/sim/v850/configure b/sim/v850/configure index 9f83ff1c2a2..8666204c6a4 100755 --- a/sim/v850/configure +++ b/sim/v850/configure @@ -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 \