From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp.gentoo.org (mail.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) by sourceware.org (Postfix) with ESMTP id 5EB3F3857421 for ; Fri, 18 Jun 2021 05:21:31 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 5EB3F3857421 Received: from vapier.lan (localhost [127.0.0.1]) by smtp.gentoo.org (Postfix) with ESMTP id 98934335D12 for ; Fri, 18 Jun 2021 05:21:30 +0000 (UTC) From: Mike Frysinger To: gdb-patches@sourceware.org Subject: [PATCH 2/2] sim: unify werror build settings Date: Fri, 18 Jun 2021 01:21:28 -0400 Message-Id: <20210618052128.5014-2-vapier@gentoo.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210618052128.5014-1-vapier@gentoo.org> References: <20210618052128.5014-1-vapier@gentoo.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-10.7 required=5.0 tests=BAYES_00, GIT_PATCH_0, KAM_ASCII_DIVIDERS, KAM_DMARC_STATUS, KAM_SHORT, SPF_HELO_PASS, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 18 Jun 2021 05:21:35 -0000 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 . + +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