From patchwork Sun Jan 15 03:10:17 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mike Frysinger X-Patchwork-Id: 63201 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 925073858D1E for ; Sun, 15 Jan 2023 03:10:56 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 925073858D1E DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1673752256; bh=AhQ7tSm33fgTI75hD1Dtr9h26Pwo65xNlKgZ5cax/6w=; h=To:Subject:Date:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=qFXSRGGv+GdepUfJNVB79B31OUKV/IdGbreXKlmCA0GA4StwP5Bm9GDy+e12C3YsQ S7LfINjQv0TTgYDTV7O1Dk8hmIjyQhwjMw4lhQgYk8AJfW7PxxAYi/2p0LSWCwwydN AC0vjlLy1wxiZ9c14Y20XeQubahhDyy7p+in1evA= X-Original-To: gdb-patches@sourceware.org Delivered-To: gdb-patches@sourceware.org Received: from smtp.gentoo.org (dev.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) by sourceware.org (Postfix) with ESMTP id 9F2D83858D32 for ; Sun, 15 Jan 2023 03:10:28 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 9F2D83858D32 Received: by smtp.gentoo.org (Postfix, from userid 559) id 384C0340EDB; Sun, 15 Jan 2023 03:10:26 +0000 (UTC) To: gdb-patches@sourceware.org Subject: [PATCH] sim: igen: simplify build logic a little Date: Sat, 14 Jan 2023 22:10:17 -0500 Message-Id: <20230115031017.28159-1-vapier@gentoo.org> X-Mailer: git-send-email 2.39.0 MIME-Version: 1.0 X-Spam-Status: No, score=-11.2 required=5.0 tests=BAYES_00, GIT_PATCH_0, JMQ_SPF_NEUTRAL, KAM_DMARC_STATUS, 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 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-Patchwork-Original-From: Mike Frysinger via Gdb-patches From: Mike Frysinger Reply-To: Mike Frysinger Errors-To: gdb-patches-bounces+patchwork=sourceware.org@sourceware.org Sender: "Gdb-patches" Now that all ports (that use igen) build in the top-level and depend on igen, we can move the conditional logic out of configure. We also switch from noinst_LIBRARIES to EXTRA_LIBRARIES so that the library is only built when needed (i.e. the igen tool is used). --- sim/Makefile.am | 3 +- sim/Makefile.in | 564 ++++++++++++++++++++++------------------------ sim/configure | 50 +--- sim/configure.ac | 10 +- sim/igen/local.mk | 2 +- 5 files changed, 275 insertions(+), 354 deletions(-) diff --git a/sim/Makefile.am b/sim/Makefile.am index 0e9fc3c67a9e..3693eb18d496 100644 --- a/sim/Makefile.am +++ b/sim/Makefile.am @@ -33,6 +33,7 @@ SIM_PRIMARY_TARGET = @SIM_PRIMARY_TARGET@ pkginclude_HEADERS = check_PROGRAMS = noinst_PROGRAMS = +EXTRA_LIBRARIES = noinst_LIBRARIES = EXTRA_PROGRAMS = BUILT_SOURCES = @@ -101,9 +102,7 @@ SIM_COMPILE = \ $(am__mv) $(SIM_DEPBASE).Tpo $(SIM_DEPBASE).Po include common/local.mk -if SIM_ENABLE_IGEN include igen/local.mk -endif include testsuite/local.mk ## Arch includes must come after common/local.mk. diff --git a/sim/configure.ac b/sim/configure.ac index b4ea1e7de9b6..ecda34a6b3fc 100644 --- a/sim/configure.ac +++ b/sim/configure.ac @@ -68,7 +68,6 @@ dnl Enable a particular arch subdir. dnl arg[1] is the matching target triple. dnl arg[2] is the arch subdir name. dnl arg[3] is whether the arch has a dedicated configure script. -dnl arg[4] is any additional shell code to run for this arch. m4_define([SIM_TARGET], [dnl sim_enable_arch_$2=false case "${targ}" in @@ -78,7 +77,6 @@ m4_define([SIM_TARGET], [dnl fi SIM_BUILD_TARGET($2, $3) sim_enable_arch_$2=true - $4 ;; esac SIM_AC_TOOLCHAIN_FOR_TARGET($2) @@ -93,7 +91,6 @@ dnl dnl NB: Target matching is aligned with gdb/configure.tgt. Changes must be kept dnl in sync with that file. if test "${enable_sim}" != no; then - sim_igen=no for targ in `echo $target $enable_targets | sed 's/,/ /g'` do SIM_TARGET([aarch64*-*-*], [aarch64]) @@ -114,8 +111,8 @@ if test "${enable_sim}" != no; then SIM_TARGET([m68hc11-*-*|m6811-*-*], [m68hc11]) SIM_TARGET([mcore-*-*], [mcore]) SIM_TARGET([microblaze*-*-*], [microblaze]) - SIM_TARGET([mips*-*-*], [mips], [], [sim_igen=yes]) - SIM_TARGET([mn10300*-*-*], [mn10300], [], [sim_igen=yes]) + SIM_TARGET([mips*-*-*], [mips]) + SIM_TARGET([mn10300*-*-*], [mn10300]) SIM_TARGET([moxie-*-*], [moxie]) SIM_TARGET([msp430*-*-*], [msp430]) SIM_TARGET([or1k*-*-*], [or1k]) @@ -126,7 +123,7 @@ if test "${enable_sim}" != no; then SIM_TARGET([rx-*-*], [rx]) SIM_TARGET([sh*-*-*], [sh]) SIM_TARGET([sparc-*-*], [erc32]) - SIM_TARGET([v850*-*-*], [v850], [], [sim_igen=yes]) + SIM_TARGET([v850*-*-*], [v850]) done if test "x${enable_example_sims}" = xyes; then @@ -135,7 +132,6 @@ if test "${enable_sim}" != no; then fi AM_CONDITIONAL([SIM_ENABLE_ARCH_examples], [test "${enable_example_sims}" = "yes"]) fi -AM_CONDITIONAL([SIM_ENABLE_IGEN], [test "$sim_igen" = "yes"]) AM_CONDITIONAL([ENABLE_SIM], [test "$ENABLE_SIM" = "yes"]) dnl Standard (and optional) simulator options. diff --git a/sim/igen/local.mk b/sim/igen/local.mk index 0126a2cdb7eb..75b9cebd8f7b 100644 --- a/sim/igen/local.mk +++ b/sim/igen/local.mk @@ -27,7 +27,7 @@ IGEN_RUN = ASAN_OPTIONS=detect_leaks=0 $(IGEN) $(IGEN_FLAGS_SMP) # Alias for developers. igen: $(IGEN) -noinst_LIBRARIES += %D%/libigen.a +EXTRA_LIBRARIES += %D%/libigen.a %C%_libigen_a_SOURCES = \ %D%/table.c \ %D%/lf.c \