aboutsummaryrefslogtreecommitdiff
path: root/sim/moxie
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2021-01-31 12:06:29 -0500
committerMike Frysinger <vapier@gentoo.org>2021-01-31 12:06:29 -0500
commit3c811346e93eb83eecadc738102103719c8a0f1f (patch)
treeb991994c8fa0ae1327a6384ad86e4a60d43d5bf7 /sim/moxie
parent9a7ba4aa0ed5bd60fd01bf0817692212a854bf78 (diff)
downloadgdb-3c811346e93eb83eecadc738102103719c8a0f1f.zip
gdb-3c811346e93eb83eecadc738102103719c8a0f1f.tar.gz
gdb-3c811346e93eb83eecadc738102103719c8a0f1f.tar.bz2
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).
Diffstat (limited to 'sim/moxie')
-rw-r--r--sim/moxie/ChangeLog6
-rwxr-xr-xsim/moxie/configure19
-rw-r--r--sim/moxie/configure.ac1
-rw-r--r--sim/moxie/interp.c2
4 files changed, 22 insertions, 6 deletions
diff --git a/sim/moxie/ChangeLog b/sim/moxie/ChangeLog
index 4a10ac3..d85c578 100644
--- a/sim/moxie/ChangeLog
+++ b/sim/moxie/ChangeLog
@@ -1,3 +1,9 @@
+2021-01-31 Mike Frysinger <vapier@gentoo.org>
+
+ * interp.c (sim_create_inferior): Add const to avp.
+ * configure.ac (SIM_AC_OPTION_WARNINGS): Delete call.
+ * configure: Regenerate.
+
2021-01-30 Mike Frysinger <vapier@gentoo.org>
* interp.c (sim_open): Delete STATE_WATCHPOINTS (sd)->sizeof_pc.
diff --git a/sim/moxie/configure b/sim/moxie/configure
index d500eef..1cf6e5b 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 a02e13a..6477249 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 c5f9ed6..87e1c15 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 */