public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Andrew Burgess <andrew.burgess@embecosm.com>
To: gdb-patches@sourceware.org
Subject: [PATCH 11/11] sim/rx: enable build with warnings
Date: Mon,  1 Feb 2021 11:44:14 +0000	[thread overview]
Message-ID: <8de8f7977f8b7b1c640400305a731e0d5c933a4a.1612179773.git.andrew.burgess@embecosm.com> (raw)
In-Reply-To: <cover.1612179773.git.andrew.burgess@embecosm.com>

The rx simulator now has no build warnings, so enable build with
warnings by default.

sim/rx/ChangeLog:

	* configure: Regenerate.
	* configure.ac (SIM_AC_OPTION_WARNINGS): Pass yes.
---
 sim/rx/ChangeLog    |  5 +++++
 sim/rx/configure    | 17 ++++++++++++++---
 sim/rx/configure.ac |  2 +-
 3 files changed, 20 insertions(+), 4 deletions(-)

diff --git a/sim/rx/configure b/sim/rx/configure
index 3969c670380..8501f84e727 100755
--- a/sim/rx/configure
+++ b/sim/rx/configure
@@ -6903,7 +6903,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
@@ -12927,7 +12935,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 12930 "configure"
+#line 12938 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -13033,7 +13041,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 13036 "configure"
+#line 13044 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -13600,6 +13608,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 \
diff --git a/sim/rx/configure.ac b/sim/rx/configure.ac
index 6c14434f4af..b81c322d441 100644
--- a/sim/rx/configure.ac
+++ b/sim/rx/configure.ac
@@ -22,7 +22,7 @@ AC_INIT(Makefile.in)
 sinclude(../common/acinclude.m4)
 
 SIM_AC_COMMON
-SIM_AC_OPTION_WARNINGS(no)
+SIM_AC_OPTION_WARNINGS(yes)
 
 AC_CHECK_HEADERS(getopt.h)
 
-- 
2.25.4


  parent reply	other threads:[~2021-02-01 11:44 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-01 11:44 [PATCH 00/11] fix build warnings for rx simulator Andrew Burgess
2021-02-01 11:44 ` [PATCH 01/11] sim/rx: define sim_memory_map Andrew Burgess
2021-02-01 14:46   ` Mike Frysinger
2021-02-08 11:01     ` Andrew Burgess
2021-02-01 11:44 ` [PATCH 02/11] sim/rx: fix an issue where we try to modify a const string Andrew Burgess
2021-02-01 11:44 ` [PATCH 03/11] sim/rx: fill in missing 'void' for empty argument lists Andrew Burgess
2021-02-01 11:44 ` [PATCH 04/11] sim/rx: mark some functions as static Andrew Burgess
2021-02-01 11:44 ` [PATCH 05/11] sim/rx: delete an unused function Andrew Burgess
2021-02-01 11:44 ` [PATCH 06/11] sim/rx: use puts instead of printf in a few places Andrew Burgess
2021-02-01 14:49   ` Mike Frysinger
2021-02-08 10:58     ` Andrew Burgess
2021-02-01 11:44 ` [PATCH 07/11] sim/rx: move some variable declarations to the start of the block Andrew Burgess
2021-02-01 11:44 ` [PATCH 08/11] sim/rx: use PRIx64 in printf format string Andrew Burgess
2021-02-01 11:44 ` [PATCH 09/11] sim/rx: add some missing includes Andrew Burgess
2021-02-01 11:44 ` [PATCH 10/11] sim/rx: avoid pointer arithmetic on void * pointers Andrew Burgess
2021-02-01 11:44 ` Andrew Burgess [this message]
2021-02-01 14:50   ` [PATCH 11/11] sim/rx: enable build with warnings Mike Frysinger
2021-02-02  4:53     ` [PATCH] sim: erc32/m32c/rl78: add sim_memory_map stub for gdb Mike Frysinger
2021-02-08 10:57     ` [PATCH 11/11] sim/rx: enable build with warnings Andrew Burgess
2021-02-02  4:37 ` [PATCH 00/11] fix build warnings for rx simulator Mike Frysinger

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=8de8f7977f8b7b1c640400305a731e0d5c933a4a.1612179773.git.andrew.burgess@embecosm.com \
    --to=andrew.burgess@embecosm.com \
    --cc=gdb-patches@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).