From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) by sourceware.org (Postfix) with ESMTP id BFB2C3850F05 for ; Sun, 25 Dec 2022 07:14:55 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org BFB2C3850F05 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gentoo.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gentoo.org Received: by smtp.gentoo.org (Postfix, from userid 559) id 6E48A340F92; Sun, 25 Dec 2022 07:14:55 +0000 (UTC) From: Mike Frysinger To: gdb-patches@sourceware.org Subject: [PATCH 8/9] sim: smp: make option available again Date: Sun, 25 Dec 2022 02:14:33 -0500 Message-Id: <20221225071434.30014-8-vapier@gentoo.org> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20221225071434.30014-1-vapier@gentoo.org> References: <20221225071434.30014-1-vapier@gentoo.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-11.2 required=5.0 tests=BAYES_00,GIT_PATCH_0,JMQ_SPF_NEUTRAL,KAM_DMARC_STATUS,KAM_SHORT,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_PASS,SPF_PASS,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: At some point we want this to work, but it's not easy to test if the configure option isn't available. Restore it, but keep the default off. --- sim/Makefile.in | 1 + sim/aclocal.m4 | 1 + sim/config.h.in | 3 +++ sim/configure | 32 ++++++++++++++++++++++++++++++-- sim/configure.ac | 1 + sim/m4/sim_ac_option_smp.m4 | 18 ++++++++++++------ 6 files changed, 48 insertions(+), 8 deletions(-) diff --git a/sim/configure.ac b/sim/configure.ac index bfcd9e59d10e..af7e6e752ca1 100644 --- a/sim/configure.ac +++ b/sim/configure.ac @@ -180,6 +180,7 @@ SIM_AC_OPTION_INLINE SIM_AC_OPTION_PROFILE SIM_AC_OPTION_RESERVED_BITS SIM_AC_OPTION_SCACHE +SIM_AC_OPTION_SMP SIM_AC_OPTION_STDIO SIM_AC_OPTION_TRACE SIM_AC_OPTION_WARNINGS diff --git a/sim/m4/sim_ac_option_smp.m4 b/sim/m4/sim_ac_option_smp.m4 index b59d7e6e7600..5c2b35f9d846 100644 --- a/sim/m4/sim_ac_option_smp.m4 +++ b/sim/m4/sim_ac_option_smp.m4 @@ -12,20 +12,26 @@ dnl GNU General Public License for more details. dnl dnl You should have received a copy of the GNU General Public License dnl along with this program. If not, see . -AC_DEFUN([SIM_AC_OPTION_SMP], -[ +AC_DEFUN([SIM_AC_OPTION_SMP], [dnl AC_MSG_CHECKING([number of sim cpus to support]) -default_sim_smp="ifelse([$1],,5,[$1])" -sim_smp="$default_sim_smp"" +dnl TODO: We should increase the default to use smp at some point. When we do, +dnl the ppc/configure sim-smp option should be merged. See the WITH_SMP check +dnl below for more cleanups too. +default_sim_smp="0" +sim_smp="$default_sim_smp" AC_ARG_ENABLE(sim-smp, [AS_HELP_STRING([--enable-sim-smp=n], - [Specify number of processors to configure for (default ${default_sim_smp})])], + [Specify number of processors to configure for (default 1)])], [case "${enableval}" in yes) sim_smp="5";; no) sim_smp="0";; *) sim_smp="$enableval";; esac])dnl sim_igen_smp="-N ${sim_smp}" -AC_DEFINE_UNQUOTED([WITH_SMP], [$sim_smp], [Sim SMP settings]) +dnl NB: The ppc code uses a diff default because its smp works. That is why +dnl we don't unconditionally enable WITH_SMP here. Once we unify ppc, we can +dnl make this unconditional. +AS_VAR_IF([sim_smp], [0], [], [dnl + AC_DEFINE_UNQUOTED([WITH_SMP], [$sim_smp], [Sim SMP settings])]) AC_MSG_RESULT($sim_smp) ]) -- 2.39.0