From: Mike Frysinger <vapier@gentoo.org>
To: gdb-patches@sourceware.org
Subject: [PATCH] sim: igen: simplify build logic a little
Date: Sat, 14 Jan 2023 22:10:17 -0500 [thread overview]
Message-ID: <20230115031017.28159-1-vapier@gentoo.org> (raw)
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 \
--
2.39.0
reply other threads:[~2023-01-15 3:10 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20230115031017.28159-1-vapier@gentoo.org \
--to=vapier@gentoo.org \
--cc=gdb-patches@sourceware.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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).