Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Mike Frysinger via Gdb-patches <gdb-patches@sourceware.org>
To: gdb-patches@sourceware.org
Subject: [PATCH 2/5] sim: unify hardware settings
Date: Sun, 20 Jun 2021 01:55:16 -0400	[thread overview]
Message-ID: <20210620055519.22229-2-vapier@gentoo.org> (raw)
In-Reply-To: <20210620055519.22229-1-vapier@gentoo.org>

Move these options up to the common dir so we only test & export
them once across all ports.
---
 sim/Makefile.in                  |  3 ++
 sim/aarch64/aclocal.m4           |  1 -
 sim/aarch64/configure            | 53 -------------------------------
 sim/aclocal.m4                   |  1 +
 sim/arch-subdir.mk.in            |  5 +++
 sim/arm/aclocal.m4               |  1 -
 sim/arm/configure                | 53 -------------------------------
 sim/avr/aclocal.m4               |  1 -
 sim/avr/configure                | 53 -------------------------------
 sim/bfin/aclocal.m4              |  1 -
 sim/bfin/configure               | 48 ----------------------------
 sim/bpf/aclocal.m4               |  1 -
 sim/bpf/configure                | 48 ----------------------------
 sim/common/Make-common.in        |  4 ---
 sim/configure                    | 54 ++++++++++++++++++++++++++++++--
 sim/configure.ac                 |  1 +
 sim/cr16/aclocal.m4              |  1 -
 sim/cr16/configure               | 53 -------------------------------
 sim/cris/aclocal.m4              |  1 -
 sim/cris/configure               | 48 ----------------------------
 sim/d10v/aclocal.m4              |  1 -
 sim/d10v/configure               | 53 -------------------------------
 sim/erc32/aclocal.m4             |  1 -
 sim/erc32/configure              | 53 -------------------------------
 sim/example-synacor/aclocal.m4   |  1 -
 sim/example-synacor/configure    | 53 -------------------------------
 sim/frv/aclocal.m4               |  1 -
 sim/frv/configure                | 48 ----------------------------
 sim/ft32/aclocal.m4              |  1 -
 sim/ft32/configure               | 53 -------------------------------
 sim/h8300/aclocal.m4             |  1 -
 sim/h8300/configure              | 53 -------------------------------
 sim/iq2000/aclocal.m4            |  1 -
 sim/iq2000/configure             | 48 ----------------------------
 sim/lm32/aclocal.m4              |  1 -
 sim/lm32/configure               | 48 ----------------------------
 sim/m32c/aclocal.m4              |  1 -
 sim/m32c/configure               | 53 -------------------------------
 sim/m32r/aclocal.m4              |  1 -
 sim/m32r/configure               | 48 ----------------------------
 sim/m4/sim_ac_option_hardware.m4 | 11 +------
 sim/m4/sim_ac_output.m4          |  2 --
 sim/m68hc11/aclocal.m4           |  1 -
 sim/m68hc11/configure            | 53 -------------------------------
 sim/mcore/aclocal.m4             |  1 -
 sim/mcore/configure              | 53 -------------------------------
 sim/microblaze/aclocal.m4        |  1 -
 sim/microblaze/configure         | 53 -------------------------------
 sim/mips/aclocal.m4              |  1 -
 sim/mips/configure               | 48 ----------------------------
 sim/mn10300/aclocal.m4           |  1 -
 sim/mn10300/configure            | 48 ----------------------------
 sim/moxie/aclocal.m4             |  1 -
 sim/moxie/configure              | 53 -------------------------------
 sim/msp430/aclocal.m4            |  1 -
 sim/msp430/configure             | 53 -------------------------------
 sim/or1k/aclocal.m4              |  1 -
 sim/or1k/configure               | 48 ----------------------------
 sim/pru/aclocal.m4               |  1 -
 sim/pru/configure                | 53 -------------------------------
 sim/riscv/aclocal.m4             |  1 -
 sim/riscv/configure              | 48 ----------------------------
 sim/rl78/aclocal.m4              |  1 -
 sim/rl78/configure               | 53 -------------------------------
 sim/rx/aclocal.m4                |  1 -
 sim/rx/configure                 | 48 ----------------------------
 sim/sh/aclocal.m4                |  1 -
 sim/sh/configure                 | 53 -------------------------------
 sim/v850/aclocal.m4              |  1 -
 sim/v850/configure               | 48 ----------------------------
 70 files changed, 63 insertions(+), 1627 deletions(-)

diff --git a/sim/arch-subdir.mk.in b/sim/arch-subdir.mk.in
index 92b217d20be6..f145f1a3c6bd 100644
--- a/sim/arch-subdir.mk.in
+++ b/sim/arch-subdir.mk.in
@@ -68,3 +68,8 @@ CGEN_MAINT = ; @true
 CGENDIR = @cgendir@
 
 SIM_INLINE = @SIM_INLINE@
+
+SIM_HW_CFLAGS = @sim_hw_cflags@
+SIM_HW_SOCKSER = @sim_hw_sockser@
+SIM_HW_OBJS = $(SIM_COMMON_HW_OBJS) $(SIM_HW_DEVICES:%=dv-%.o) $(SIM_HW_SOCKSER)
+@SIM_ENABLE_HW_FALSE@SIM_HW_OBJS =
diff --git a/sim/common/Make-common.in b/sim/common/Make-common.in
index 6d7c9c47b64a..41becaa05f16 100644
--- a/sim/common/Make-common.in
+++ b/sim/common/Make-common.in
@@ -72,8 +72,6 @@ SHELL = @SHELL@
 SIM_BITSIZE = @sim_bitsize@
 SIM_DEFAULT_MODEL = @sim_default_model@
 SIM_FLOAT = @sim_float@
-SIM_HW_CFLAGS = @sim_hw_cflags@
-SIM_HW_SOCKSER = @sim_hw_sockser@
 SIM_RESERVED_BITS = @sim_reserved_bits@
 SIM_SCACHE = @sim_scache@
 SIM_WARN_CFLAGS = $(WARN_CFLAGS)
@@ -216,8 +214,6 @@ BUILD_CFLAGS = $(CFLAGS_FOR_BUILD) $(CSEARCH)
 COMMON_DEP_CFLAGS = $(CONFIG_CFLAGS) $(CSEARCH) $(SIM_EXTRA_CFLAGS)
 
 SIM_HW_DEVICES = cfi core pal glue $(SIM_EXTRA_HW_DEVICES)
-SIM_HW_OBJS = $(SIM_COMMON_HW_OBJS) $(SIM_HW_DEVICES:%=dv-%.o) $(SIM_HW_SOCKSER)
-@SIM_ENABLE_HW_FALSE@SIM_HW_OBJS =
 
 ZLIB = $(zlibdir) -lz
 LIBIBERTY_LIB = ../../libiberty/libiberty.a
diff --git a/sim/configure.ac b/sim/configure.ac
index 9530268ddc59..042bfbfd1cd3 100644
--- a/sim/configure.ac
+++ b/sim/configure.ac
@@ -122,6 +122,7 @@ SIM_AC_OPTION_CGEN_MAINT
 SIM_AC_OPTION_DEBUG
 SIM_AC_OPTION_ENDIAN
 SIM_AC_OPTION_ENVIRONMENT
+SIM_AC_OPTION_HARDWARE
 SIM_AC_OPTION_INLINE
 SIM_AC_OPTION_PROFILE
 SIM_AC_OPTION_STDIO
diff --git a/sim/m4/sim_ac_option_hardware.m4 b/sim/m4/sim_ac_option_hardware.m4
index 14101830e828..ed53cd2f1206 100644
--- a/sim/m4/sim_ac_option_hardware.m4
+++ b/sim/m4/sim_ac_option_hardware.m4
@@ -39,16 +39,7 @@ elif test "$enable_sim_hardware" = yes; then
 else
   AC_MSG_ERROR([unknown argument "$enable_sim_hardware"])
 fi
-dnl AM_CONDITIONAL([SIM_ENABLE_HW], [test "$enable_sim_hardware" = "yes"])
-if test "$enable_sim_hardware" = "yes"; then
-  SIM_ENABLE_HW_TRUE=
-  SIM_ENABLE_HW_FALSE='#'
-else
-  SIM_ENABLE_HW_TRUE='#'
-  SIM_ENABLE_HW_FALSE=
-fi
-AC_SUBST(SIM_ENABLE_HW_TRUE)
-AC_SUBST(SIM_ENABLE_HW_FALSE)
+AM_CONDITIONAL([SIM_ENABLE_HW], [test "$enable_sim_hardware" = "yes"])
 AC_MSG_RESULT(${enable_sim_hardware})
 AC_SUBST(sim_hw_cflags)
 AC_SUBST(sim_hw_sockser)
diff --git a/sim/m4/sim_ac_output.m4 b/sim/m4/sim_ac_output.m4
index 8d260421e0e9..aba45b0bc33e 100644
--- a/sim/m4/sim_ac_output.m4
+++ b/sim/m4/sim_ac_output.m4
@@ -21,8 +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_HARDWARE])dnl
-
 dnl Make @cgen_breaks@ non-null only if the sim uses CGEN.
 cgen_breaks=""
 if grep CGEN_MAINT $srcdir/Makefile.in >/dev/null; then
-- 
2.31.1


  reply	other threads:[~2021-06-20  5:57 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-20  5:55 [PATCH 1/5] sim: hw: rework configure option & device selection Mike Frysinger via Gdb-patches
2021-06-20  5:55 ` Mike Frysinger via Gdb-patches [this message]
2021-06-20  5:55 ` [PATCH 3/5] sim: drop configure scripts for simple ports Mike Frysinger via Gdb-patches
2021-06-23  1:05   ` Simon Marchi via Gdb-patches
2021-06-23  2:09     ` Mike Frysinger via Gdb-patches
2021-06-23  2:59     ` [PATCH] sim: switch common srcdir to abs_srcdir Mike Frysinger via Gdb-patches
2021-06-23 13:01       ` Simon Marchi via Gdb-patches
2021-06-20  5:55 ` [PATCH 4/5] sim: rx: merge with common configure script Mike Frysinger via Gdb-patches
2021-06-20  5:55 ` [PATCH 5/5] sim: hw: move cfi & glue to common code Mike Frysinger via Gdb-patches

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=20210620055519.22229-2-vapier@gentoo.org \
    --to=gdb-patches@sourceware.org \
    --cc=vapier@gentoo.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