From 3c811346e93eb83eecadc738102103719c8a0f1f Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Sun, 31 Jan 2021 12:06:29 -0500 Subject: [PATCH] sim: moxie: cleanup build warnings This port only had one minor warning left in it, so fix it and then enable -Werror behavior by deleting the macro call. We'll use the common default now (which is -Werror). --- sim/moxie/ChangeLog | 6 ++++++ sim/moxie/configure | 19 +++++++++++++++---- sim/moxie/configure.ac | 1 - sim/moxie/interp.c | 2 +- 4 files changed, 22 insertions(+), 6 deletions(-) diff --git a/sim/moxie/ChangeLog b/sim/moxie/ChangeLog index 4a10ac365ba..d85c5784135 100644 --- a/sim/moxie/ChangeLog +++ b/sim/moxie/ChangeLog @@ -1,3 +1,9 @@ +2021-01-31 Mike Frysinger + + * interp.c (sim_create_inferior): Add const to avp. + * configure.ac (SIM_AC_OPTION_WARNINGS): Delete call. + * configure: Regenerate. + 2021-01-30 Mike Frysinger * interp.c (sim_open): Delete STATE_WATCHPOINTS (sd)->sizeof_pc. diff --git a/sim/moxie/configure b/sim/moxie/configure index d500eef4ed9..1cf6e5bc547 100755 --- a/sim/moxie/configure +++ b/sim/moxie/configure @@ -6906,7 +6906,15 @@ fi test -z "$AR" && AR=ar if test -n "$plugin_option"; then if $AR --help 2>&1 | grep -q "\--plugin"; then - AR="$AR $plugin_option" + touch conftest.c + $AR $plugin_option rc conftest.a conftest.c + if test "$?" != 0; then + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Failed: $AR $plugin_option rc" >&5 +$as_echo "$as_me: WARNING: Failed: $AR $plugin_option rc" >&2;} + else + AR="$AR $plugin_option" + fi + rm -f conftest.* fi fi test -z "$AR_FLAGS" && AR_FLAGS=cru @@ -12930,7 +12938,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 12933 "configure" +#line 12941 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -13036,7 +13044,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 13039 "configure" +#line 13047 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -13772,6 +13780,7 @@ fi fi + # Check whether --enable-werror was given. if test "${enable_werror+set}" = set; then : enableval=$enable_werror; case "${enableval}" in @@ -13788,6 +13797,9 @@ if test "${GCC}" = yes -a -z "${ERROR_ON_WARNING}" ; then fi WERROR_CFLAGS="" + if test "${ERROR_ON_WARNING}" = yes ; then + WERROR_CFLAGS="-Werror" + fi build_warnings="-Wall -Wdeclaration-after-statement -Wpointer-arith \ -Wpointer-sign \ @@ -13869,7 +13881,6 @@ $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/moxie/configure.ac b/sim/moxie/configure.ac index a02e13a3dcb..6477249d425 100644 --- a/sim/moxie/configure.ac +++ b/sim/moxie/configure.ac @@ -8,6 +8,5 @@ AC_CHECK_TOOL(DTC, dtc) SIM_AC_OPTION_ENDIAN(BIG) SIM_AC_OPTION_ALIGNMENT(STRICT_ALIGNMENT) -SIM_AC_OPTION_WARNINGS(no) SIM_AC_OUTPUT diff --git a/sim/moxie/interp.c b/sim/moxie/interp.c index c5f9ed64160..87e1c157542 100644 --- a/sim/moxie/interp.c +++ b/sim/moxie/interp.c @@ -1295,7 +1295,7 @@ SIM_RC sim_create_inferior (SIM_DESC sd, struct bfd *prog_bfd, char * const *argv, char * const *env) { - char ** avp; + char * const *avp; int l, argc, i, tp; sim_cpu *scpu = STATE_CPU (sd, 0); /* FIXME */ -- 2.30.2