Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Mike Frysinger via Gdb-patches <gdb-patches@sourceware.org>
To: gdb-patches@sourceware.org
Subject: [PATCH 2/2] sim: unify werror build settings
Date: Fri, 18 Jun 2021 01:21:28 -0400	[thread overview]
Message-ID: <20210618052128.5014-2-vapier@gentoo.org> (raw)
In-Reply-To: <20210618052128.5014-1-vapier@gentoo.org>

Move these options up to the common dir so we only test & export
them once across all ports.  It also enables -Werror usage on the
common files we've been pulling out of arch subdirs.
---
 sim/Makefile.am                |   1 +
 sim/Makefile.in                |   4 ++
 sim/aarch64/aclocal.m4         |   1 -
 sim/aarch64/configure          | 114 +--------------------------------
 sim/aclocal.m4                 |   1 +
 sim/arch-subdir.mk.in          |   3 +
 sim/arm/aclocal.m4             |   1 -
 sim/arm/configure              | 114 +--------------------------------
 sim/avr/aclocal.m4             |   1 -
 sim/avr/configure              | 114 +--------------------------------
 sim/bfin/aclocal.m4            |   1 -
 sim/bfin/configure             | 114 +--------------------------------
 sim/common/Make-common.in      |   2 -
 sim/configure                  | 112 +++++++++++++++++++++++++++++++-
 sim/configure.ac               |   1 +
 sim/cr16/aclocal.m4            |   1 -
 sim/cr16/configure             | 114 +--------------------------------
 sim/d10v/aclocal.m4            |   1 -
 sim/d10v/configure             | 114 +--------------------------------
 sim/example-synacor/aclocal.m4 |   1 -
 sim/example-synacor/configure  | 114 +--------------------------------
 sim/ft32/aclocal.m4            |   1 -
 sim/ft32/configure             | 114 +--------------------------------
 sim/h8300/aclocal.m4           |   1 -
 sim/h8300/configure            | 114 +--------------------------------
 sim/m32c/aclocal.m4            |   1 -
 sim/m32c/configure             | 114 +--------------------------------
 sim/m4/sim_ac_output.m4        |   1 -
 sim/m68hc11/aclocal.m4         |   1 -
 sim/m68hc11/configure          | 114 +--------------------------------
 sim/mcore/aclocal.m4           |   1 -
 sim/mcore/configure            | 114 +--------------------------------
 sim/microblaze/aclocal.m4      |   1 -
 sim/microblaze/configure       | 114 +--------------------------------
 sim/mn10300/aclocal.m4         |   1 -
 sim/mn10300/configure          | 114 +--------------------------------
 sim/moxie/aclocal.m4           |   1 -
 sim/moxie/configure            | 114 +--------------------------------
 sim/msp430/aclocal.m4          |   1 -
 sim/msp430/configure           | 114 +--------------------------------
 sim/pru/aclocal.m4             |   1 -
 sim/pru/configure              | 114 +--------------------------------
 sim/riscv/aclocal.m4           |   1 -
 sim/riscv/configure            | 114 +--------------------------------
 sim/rl78/aclocal.m4            |   1 -
 sim/rl78/configure             | 114 +--------------------------------
 sim/rx/aclocal.m4              |   1 -
 sim/rx/configure               | 114 +--------------------------------
 sim/v850/aclocal.m4            |   1 -
 sim/v850/configure             | 114 +--------------------------------
 50 files changed, 163 insertions(+), 2377 deletions(-)

diff --git a/sim/Makefile.am b/sim/Makefile.am
index 79274beabd8d..8d5311456860 100644
--- a/sim/Makefile.am
+++ b/sim/Makefile.am
@@ -35,6 +35,7 @@ CLEANFILES =
 DISTCLEANFILES =
 MOSTLYCLEANFILES = core
 
+AM_CFLAGS = $(WERROR_CFLAGS) $(WARN_CFLAGS)
 AM_CPPFLAGS = -I$(srcroot)/include
 
 COMPILE_FOR_BUILD = $(CC_FOR_BUILD) $(AM_CPPFLAGS) $(CFLAGS_FOR_BUILD)
diff --git a/sim/arch-subdir.mk.in b/sim/arch-subdir.mk.in
index 9eae1f3e4998..6f9d4ad3c370 100644
--- a/sim/arch-subdir.mk.in
+++ b/sim/arch-subdir.mk.in
@@ -16,3 +16,6 @@
 #
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+WARN_CFLAGS = @WARN_CFLAGS@
+WERROR_CFLAGS = @WERROR_CFLAGS@
diff --git a/sim/common/Make-common.in b/sim/common/Make-common.in
index b82e76c91f6f..51e4ca7b5ac7 100644
--- a/sim/common/Make-common.in
+++ b/sim/common/Make-common.in
@@ -96,8 +96,6 @@ SIM_HW = @sim_hw@
 SIM_INLINE = @sim_inline@
 SIM_RESERVED_BITS = @sim_reserved_bits@
 SIM_SCACHE = @sim_scache@
-WARN_CFLAGS = @WARN_CFLAGS@
-WERROR_CFLAGS = @WERROR_CFLAGS@
 SIM_WARN_CFLAGS = $(WARN_CFLAGS)
 SIM_WERROR_CFLAGS = $(WERROR_CFLAGS)
 
diff --git a/sim/configure.ac b/sim/configure.ac
index 91af0bba5860..8e9190040d4c 100644
--- a/sim/configure.ac
+++ b/sim/configure.ac
@@ -117,6 +117,7 @@ SIM_AC_OPTION_ENVIRONMENT
 SIM_AC_OPTION_PROFILE
 SIM_AC_OPTION_STDIO
 SIM_AC_OPTION_TRACE
+SIM_AC_OPTION_WARNINGS
 
 AC_CONFIG_FILES([arch-subdir.mk Makefile])
 AC_OUTPUT
diff --git a/sim/m4/sim_ac_output.m4 b/sim/m4/sim_ac_output.m4
index db6c3ffbbfe9..98385b99f76d 100644
--- a/sim/m4/sim_ac_output.m4
+++ b/sim/m4/sim_ac_output.m4
@@ -21,7 +21,6 @@ dnl one afterwards.  The two pieces of the common fragment are inserted into
 dnl the target's fragment at the appropriate points.
 AC_DEFUN([SIM_AC_OUTPUT],
 [dnl
-AC_REQUIRE([SIM_AC_OPTION_WARNINGS])dnl
 AC_REQUIRE([SIM_AC_OPTION_HARDWARE])dnl
 
 dnl Make @cgen_breaks@ non-null only if the sim uses CGEN.
-- 
2.31.1


  reply	other threads:[~2021-06-18  5:22 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-18  5:21 [PATCH 1/2] sim: create a makefile fragment to pass common settings Mike Frysinger via Gdb-patches
2021-06-18  5:21 ` Mike Frysinger via Gdb-patches [this message]
2021-06-19 14:39   ` [PATCH 2/2] sim: unify werror build settings Simon Marchi via Gdb-patches
2021-06-19 19:57     ` Mike Frysinger via Gdb-patches
2021-06-20  1:33       ` Simon Marchi via Gdb-patches
2021-06-18  6:25 ` [PATCH 1.5/2] sim: move -Werror disabling to Makefile Mike Frysinger via Gdb-patches

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=20210618052128.5014-2-vapier@gentoo.org \
    --to=gdb-patches@sourceware.org \
    --cc=vapier@gentoo.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