From 982c3a65ca5dbea8d6de3afd934f0a06fef54383 Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Fri, 18 Jun 2021 02:14:52 -0400 Subject: 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. --- sim/m4/sim_ac_option_warnings.m4 | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) (limited to 'sim/m4') diff --git a/sim/m4/sim_ac_option_warnings.m4 b/sim/m4/sim_ac_option_warnings.m4 index c831fa8..5a0fe30 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 \ -- cgit v1.1