From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by sourceware.org (Postfix) with ESMTP id 6FF7D386101A for ; Wed, 30 Jun 2021 17:25:32 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 6FF7D386101A Received: from vapier.lan (localhost [127.0.0.1]) by smtp.gentoo.org (Postfix) with ESMTP id 6E7B2335C77 for ; Wed, 30 Jun 2021 17:25:31 +0000 (UTC) From: Mike Frysinger To: gdb-patches@sourceware.org Subject: [PATCH] sim: frv: scope the unique configure flag Date: Wed, 30 Jun 2021 13:25:31 -0400 Message-Id: <20210630172531.21734-1-vapier@gentoo.org> X-Mailer: git-send-email 2.31.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-11.2 required=5.0 tests=BAYES_00, GIT_PATCH_0, KAM_DMARC_STATUS, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, 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: Wed, 30 Jun 2021 17:25:35 -0000 This will make it possible to merge into the common configure by making sure we never collide with other arches. --- sim/frv/ChangeLog | 6 ++++++ sim/frv/Makefile.in | 2 +- sim/frv/configure | 34 +++++++++++++++++++--------------- sim/frv/configure.ac | 28 +++++++++++++++------------- 4 files changed, 41 insertions(+), 29 deletions(-) diff --git a/sim/frv/ChangeLog b/sim/frv/ChangeLog index 6db6b66c4514..c2c5354838e6 100644 --- a/sim/frv/ChangeLog +++ b/sim/frv/ChangeLog @@ -1,3 +1,9 @@ +2021-06-30 Mike Frysinger + + * Makefile.in (SIM_EXTRA_CFLAGS): Change to SIM_FRV_TRAPDUMP_FLAGS. + * configure.ac: Change sim-trapdump to sim-frv-trapdump. + * configure: Regenerate. + 2021-06-30 Mike Frysinger * configure.ac: Delete SIM_AC_OPTION_DEFAULT_MODEL call. diff --git a/sim/frv/Makefile.in b/sim/frv/Makefile.in index 6fdd6e0f1be3..3a1bbab4e9a5 100644 --- a/sim/frv/Makefile.in +++ b/sim/frv/Makefile.in @@ -36,7 +36,7 @@ SIM_EXTRA_DEPS = \ registers.h profile.h eng.h \ $(sim-options_h) -SIM_EXTRA_CFLAGS = @sim_trapdump@ +SIM_EXTRA_CFLAGS = @SIM_FRV_TRAPDUMP_FLAGS@ SIM_EXTRA_CLEAN = frv-clean diff --git a/sim/frv/configure.ac b/sim/frv/configure.ac index 785a3bc1cc23..7430641101d1 100644 --- a/sim/frv/configure.ac +++ b/sim/frv/configure.ac @@ -4,20 +4,22 @@ AC_CONFIG_MACRO_DIRS([../m4 ../.. ../../config]) SIM_AC_OPTION_SCACHE(16384) -# -# Enable making unknown traps dump out registers -# -AC_ARG_ENABLE(sim-trapdump, -[AS_HELP_STRING([--enable-sim-trapdump], +dnl Enable making unknown traps dump out registers +AC_MSG_CHECKING([whether sim frv should dump cpu state on unknown traps]) +AC_ARG_ENABLE(sim-frv-trapdump, +[AS_HELP_STRING([--enable-sim-frv-trapdump], [Make unknown traps dump the registers])], [case "${enableval}" in - yes) sim_trapdump="-DTRAPDUMP=1";; - no) sim_trapdump="-DTRAPDUMP=0";; - *) AC_MSG_ERROR("Unknown value $enableval passed to --enable-sim-trapdump"); sim_trapdump="";; -esac -if test x"$silent" != x"yes" && test x"$sim_trapdump" != x""; then - echo "Setting sim_trapdump = $sim_trapdump" 6>&1 -fi],[sim_trapdump=""])dnl -AC_SUBST(sim_trapdump) +yes|no) ;; +*) AC_MSG_ERROR("Unknown value $enableval passed to --enable-sim-trapdump");; +esac]) +if test "x${enable_sim_frv_trapdump}" != xno; then + SIM_FRV_TRAPDUMP_FLAGS="-DTRAPDUMP=1" + AC_MSG_RESULT([yes]) +else + SIM_FRV_TRAPDUMP_FLAGS="-DTRAPDUMP=0" + AC_MSG_RESULT([no]) +fi +AC_SUBST(SIM_FRV_TRAPDUMP_FLAGS) SIM_AC_OUTPUT -- 2.31.1