Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* [PATCH 1/2] sim: switch top level to automake
@ 2021-02-28  8:55 Mike Frysinger via Gdb-patches
  2021-02-28  8:55 ` [PATCH 2/2] sim: testsuite: merge into toplevel automake Mike Frysinger via Gdb-patches
  0 siblings, 1 reply; 3+ messages in thread
From: Mike Frysinger via Gdb-patches @ 2021-02-28  8:55 UTC (permalink / raw)
  To: gdb-patches

This doesn't gain us much by itself, but it sets us up for using more
features as we try to unify ports and avoid recursive make.
---
 sim/ChangeLog        |    7 +
 sim/Makefile.am      |   36 +
 sim/Makefile.in      |  774 +++++++++++------
 sim/aclocal.m4       | 1136 +++++++++++++++++++++++++
 sim/configure        | 1924 +++++++++++++++++++++++++++++++++---------
 sim/configure.ac     |   12 +-
 sim/igen/Makefile.in |    1 +
 sim/ppc/Makefile.in  |    2 +
 8 files changed, 3233 insertions(+), 659 deletions(-)
 create mode 100644 sim/Makefile.am
 create mode 100644 sim/aclocal.m4

diff --git a/sim/ChangeLog b/sim/ChangeLog
index 4449c947274e..78e112cfa6c2 100644
--- a/sim/ChangeLog
+++ b/sim/ChangeLog
@@ -1,3 +1,10 @@
+2021-02-28  Mike Frysinger  <vapier@gentoo.org>
+
+	* Makefile.am: New file.
+	* configure.ac: Update AC_INIT call.  Move AC_CANONICAL_SYSTEM after
+	it.  Call AM_INIT_AUTOMAKE.  Delete AC_CONFIG_MACRO_DIRS.
+	* aclocal.m4, configure, Makefile.in: Regenerated.
+
 2021-02-28  Mike Frysinger  <vapier@gentoo.org>
 
 	* m4/sim_ac_common.m4 (SIM_AC_COMMON): Delete CC_FOR_BUILD test.
diff --git a/sim/Makefile.am b/sim/Makefile.am
new file mode 100644
index 000000000000..bcca70623e9a
--- /dev/null
+++ b/sim/Makefile.am
@@ -0,0 +1,36 @@
+## Process this file with automake to generate Makefile.in
+#
+#   Copyright (C) 1993-2021 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+AUTOMAKE_OPTIONS = foreign no-dist subdir-objects
+ACLOCAL_AMFLAGS = -I.. -I../config
+
+srcroot = $(srcdir)/..
+
+SUBDIRS = @subdirs@
+
+MOSTLYCLEANFILES = core
+
+# Generate nltvals.def for newlib/libgloss using devo and build tree.
+# This file is shipped with distributions so we build in the source dir.
+# Use `make nltvals' to rebuild.
+# Note: If gdb releases begin to contain target header files (not a good idea,
+# but if they did ...), nltvals.def coud be generated at build time.
+# An alternative is to slurp in the tables at runtime.
+.PHONY: nltvals
+nltvals:
+	$(abs_srcdir)/common/gennltvals.py --cpp "$(CPP)" --output nltvals.def --srcroot $(srcroot)
+	$(SHELL) $(srcroot)/move-if-change nltvals.def $(abs_srcdir)/common/nltvals.def
diff --git a/sim/aclocal.m4 b/sim/aclocal.m4
new file mode 100644
index 000000000000..5f59833b91a4
diff --git a/sim/configure.ac b/sim/configure.ac
index 80e1b42d40b2..de5779642c50 100644
--- a/sim/configure.ac
+++ b/sim/configure.ac
@@ -1,13 +1,19 @@
 dnl Process this file with autoconf to produce a configure script.
-AC_INIT(Makefile.in)
-AC_CONFIG_MACRO_DIRS([.. ../config])
+dnl NB: The version here is not used.  If gdb ever changes from generating its
+dnl version at build time to autoconf time (like bfd et al do), we can switch.
+AC_INIT([sim], [0],
+  [https://sourceware.org/bugzilla/enter_bug.cgi?product=gdb&component=sim],
+  [], [https://sourceware.org/gdb/wiki/Sim/])
+
+AC_CANONICAL_SYSTEM
+
+AM_INIT_AUTOMAKE
 
 AC_PROG_CC
 AC_PROG_INSTALL
 AC_CHECK_TOOL(AR, ar)
 AC_CHECK_TOOL(RANLIB, ranlib, :)
 
-AC_CANONICAL_SYSTEM
 AC_ARG_PROGRAM
 AC_PROG_CC
 AC_PROG_CPP
-- 
2.30.0


^ permalink raw reply	[flat|nested] 3+ messages in thread
* [PATCH] sim: testsuite: push $arch out to targets
@ 2021-01-17 16:09 Mike Frysinger via Gdb-patches
  2021-01-18 17:54 ` [PATCH 1/2] sim: switch top level to automake Mike Frysinger via Gdb-patches
  0 siblings, 1 reply; 3+ messages in thread
From: Mike Frysinger via Gdb-patches @ 2021-01-17 16:09 UTC (permalink / raw)
  To: gdb-patches

This is needed to move to automake & its dejagnu-provided logic,
and eventually by the unified sim logic.
---
 sim/configure                           | 2 --
 sim/configure.tgt                       | 1 -
 sim/testsuite/Makefile.in               | 3 ---
 sim/testsuite/aarch64/allinsn.exp       | 4 ++++
 sim/testsuite/arm/allinsn.exp           | 5 +++--
 sim/testsuite/arm/iwmmxt/iwmmxt.exp     | 5 +++--
 sim/testsuite/arm/misc.exp              | 5 +++--
 sim/testsuite/arm/thumb/allthumb.exp    | 5 +++--
 sim/testsuite/arm/xscale/xscale.exp     | 5 +++--
 sim/testsuite/avr/allinsn.exp           | 4 ++++
 sim/testsuite/bfin/allinsn.exp          | 4 ++++
 sim/testsuite/bpf/allinsn.exp           | 4 ++++
 sim/testsuite/cr16/allinsn.exp          | 5 +++--
 sim/testsuite/cr16/misc.exp             | 5 +++--
 sim/testsuite/cris/asm/asm.exp          | 4 ++++
 sim/testsuite/cris/c/c.exp              | 4 ++++
 sim/testsuite/cris/hw/rv-n-cris/rvc.exp | 4 ++++
 sim/testsuite/d10v/allinsn.exp          | 6 ++++--
 sim/testsuite/frv/allinsn.exp           | 6 ++++--
 sim/testsuite/frv/fr400/allinsn.exp     | 6 ++++--
 sim/testsuite/frv/fr500/allinsn.exp     | 6 ++++--
 sim/testsuite/frv/fr550/allinsn.exp     | 6 ++++--
 sim/testsuite/frv/interrupts.exp        | 6 ++++--
 sim/testsuite/frv/misc.exp              | 6 ++++--
 sim/testsuite/frv/parallel.exp          | 6 ++++--
 sim/testsuite/ft32/allinsn.exp          | 4 ++++
 sim/testsuite/h8300/allinsn.exp         | 4 ++++
 sim/testsuite/iq2000/allinsn.exp        | 4 ++++
 sim/testsuite/lm32/allinsn.exp          | 4 ++++
 sim/testsuite/m32c/allinsn.exp          | 4 ++++
 sim/testsuite/m32r/allinsn.exp          | 5 +++--
 sim/testsuite/m32r/misc.exp             | 5 +++--
 sim/testsuite/m68hc11/allinsn.exp       | 4 ++++
 sim/testsuite/mcore/allinsn.exp         | 4 ++++
 sim/testsuite/microblaze/allinsn.exp    | 4 ++++
 sim/testsuite/mips/basic.exp            | 3 +++
 sim/testsuite/mn10300/allinsn.exp       | 4 ++++
 sim/testsuite/moxie/allinsn.exp         | 4 ++++
 sim/testsuite/msp430/allinsn.exp        | 4 ++++
 sim/testsuite/or1k/alltests.exp         | 3 +++
 sim/testsuite/pru/allinsn.exp           | 4 ++++
 sim/testsuite/sh/allinsn.exp            | 4 ++++
 sim/testsuite/v850/allinsns.exp         | 8 ++++----
 43 files changed, 149 insertions(+), 44 deletions(-)

diff --git a/sim/configure b/sim/configure
index 7093cb1f1cf6..92ea56e318a2 100755
--- a/sim/configure
+++ b/sim/configure
@@ -585,7 +585,6 @@ ac_unique_file="Makefile.in"
 enable_option_checking=no
 ac_subst_vars='LTLIBOBJS
 LIBOBJS
-sim_arch
 subdirs
 CFLAGS_FOR_BUILD
 CC_FOR_BUILD
@@ -3904,7 +3903,6 @@ subdirs="$subdirs aarch64"
        ;;
 esac
 
-
   if test "$sim_igen" = yes; then
     subdirs="$subdirs igen"
 
diff --git a/sim/configure.tgt b/sim/configure.tgt
index a48c6966e8ae..800bc3de42f5 100644
--- a/sim/configure.tgt
+++ b/sim/configure.tgt
@@ -108,4 +108,3 @@ case "${target}" in
        sim_igen=yes
        ;;
 esac
-AC_SUBST(sim_arch)
diff --git a/sim/testsuite/Makefile.in b/sim/testsuite/Makefile.in
index 1e4604cea68c..8db77d2d46f2 100644
--- a/sim/testsuite/Makefile.in
+++ b/sim/testsuite/Makefile.in
@@ -29,8 +29,6 @@ target_canonical = @target@
 target_alias = @target_alias@
 program_transform_name = @program_transform_name@
 
-arch = @sim_arch@
-
 SHELL = /bin/sh
 SUBDIRS = @subdirs@
 RPATH_ENVVAR = @RPATH_ENVVAR@
@@ -129,7 +127,6 @@ site.exp: Makefile
 	@echo '# edit the last section' >> $@-t
 	@echo 'set srcdir $(srcdir)' >> $@-t
 	@echo 'set objdir' `pwd` >> $@-t
-	@echo 'set arch $(arch)' >> $@-t
 	@echo 'set build_alias $(build_alias)' >> $@-t
 	@echo 'set build_triplet $(build_canonical)' >> $@-t
 	@echo 'set host_alias $(host_alias)' >> $@-t
diff --git a/sim/testsuite/aarch64/allinsn.exp b/sim/testsuite/aarch64/allinsn.exp
index 54d64784c230..04a234f53577 100644
--- a/sim/testsuite/aarch64/allinsn.exp
+++ b/sim/testsuite/aarch64/allinsn.exp
@@ -1,6 +1,10 @@
 # AArch64 simulator testsuite
 
 if [istarget aarch64*-*] {
+    # Used to locate the `run` program.
+    global arch
+    set arch "aarch64"
+
     # all machines
     set all_machs "aarch64"
 
diff --git a/sim/testsuite/arm/allinsn.exp b/sim/testsuite/arm/allinsn.exp
index 9752da615ac3..89ff96594793 100644
--- a/sim/testsuite/arm/allinsn.exp
+++ b/sim/testsuite/arm/allinsn.exp
@@ -1,8 +1,9 @@
 # ARM simulator testsuite.
 
 if { [istarget arm*-*-*] } {
-    # load support procs (none yet)
-    # load_lib cgen.exp
+    # Used to locate the `run` program.
+    global arch
+    set arch "arm"
 
     # all machines
     set all_machs "xscale"
diff --git a/sim/testsuite/arm/iwmmxt/iwmmxt.exp b/sim/testsuite/arm/iwmmxt/iwmmxt.exp
index 4def69031a90..9710f3670ba7 100644
--- a/sim/testsuite/arm/iwmmxt/iwmmxt.exp
+++ b/sim/testsuite/arm/iwmmxt/iwmmxt.exp
@@ -1,8 +1,9 @@
 # Intel(r) Wireless MMX(tm) technology simulator testsuite.
 
 if { [istarget arm*-*-*] } {
-    # load support procs (none yet)
-    # load_lib cgen.exp
+    # Used to locate the `run` program.
+    global arch
+    set arch "arm"
 
     # all machines
     set all_machs "xscale"
diff --git a/sim/testsuite/arm/misc.exp b/sim/testsuite/arm/misc.exp
index bc36ca87368b..ea6fd3c3c9a0 100644
--- a/sim/testsuite/arm/misc.exp
+++ b/sim/testsuite/arm/misc.exp
@@ -1,8 +1,9 @@
 # Miscellaneous ARM simulator testcases
 
 if { [istarget arm*-*-*] } {
-    # load support procs
-    # load_lib cgen.exp
+    # Used to locate the `run` program.
+    global arch
+    set arch "arm"
 
     # all machines
     set all_machs "arm7tdmi"
diff --git a/sim/testsuite/arm/thumb/allthumb.exp b/sim/testsuite/arm/thumb/allthumb.exp
index 4298663fd813..eca5fa18c719 100644
--- a/sim/testsuite/arm/thumb/allthumb.exp
+++ b/sim/testsuite/arm/thumb/allthumb.exp
@@ -1,8 +1,9 @@
 # ARM simulator testsuite.
 
 if { [istarget arm*-*-*] } {
-    # load support procs (none yet)
-    # load_lib cgen.exp
+    # Used to locate the `run` program.
+    global arch
+    set arch "arm"
 
     # all machines
     set all_machs "arm7tdmi"
diff --git a/sim/testsuite/arm/xscale/xscale.exp b/sim/testsuite/arm/xscale/xscale.exp
index 7c08f11d10d6..20c9df80351c 100644
--- a/sim/testsuite/arm/xscale/xscale.exp
+++ b/sim/testsuite/arm/xscale/xscale.exp
@@ -1,8 +1,9 @@
 # XSCALE simulator testsuite.
 
 if { [istarget arm*-*-*] } {
-    # load support procs (none yet)
-    # load_lib cgen.exp
+    # Used to locate the `run` program.
+    global arch
+    set arch "arm"
 
     # all machines
     set all_machs "xscale"
diff --git a/sim/testsuite/avr/allinsn.exp b/sim/testsuite/avr/allinsn.exp
index 584a93da9305..a5c16b629b76 100644
--- a/sim/testsuite/avr/allinsn.exp
+++ b/sim/testsuite/avr/allinsn.exp
@@ -1,6 +1,10 @@
 # avr simulator testsuite
 
 if [istarget avr-*] {
+    # Used to locate the `run` program.
+    global arch
+    set arch "avr"
+
     # all machines
     set all_machs "avr"
 
diff --git a/sim/testsuite/bfin/allinsn.exp b/sim/testsuite/bfin/allinsn.exp
index aa304eaa9b4a..3d3378171c6d 100644
--- a/sim/testsuite/bfin/allinsn.exp
+++ b/sim/testsuite/bfin/allinsn.exp
@@ -1,6 +1,10 @@
 # Analog Devices Blackfin simulator testsuite
 
 if [istarget bfin-*-elf] {
+    # Used to locate the `run` program.
+    global arch
+    set arch "bfin"
+
     # all machines
     set all_machs "bfin"
 
diff --git a/sim/testsuite/bpf/allinsn.exp b/sim/testsuite/bpf/allinsn.exp
index 2cca77021afe..ffffd8a68928 100644
--- a/sim/testsuite/bpf/allinsn.exp
+++ b/sim/testsuite/bpf/allinsn.exp
@@ -1,6 +1,10 @@
 # eBPF simulator testsuite
 
 if [istarget bpf-unknown-none] {
+    # Used to locate the `run` program.
+    global arch
+    set arch "bpf"
+
     # all machines
     set all_machs "bpf"
 
diff --git a/sim/testsuite/cr16/allinsn.exp b/sim/testsuite/cr16/allinsn.exp
index 852a673c3601..1b6847c78150 100644
--- a/sim/testsuite/cr16/allinsn.exp
+++ b/sim/testsuite/cr16/allinsn.exp
@@ -1,8 +1,9 @@
 # CR16 simulator testsuite.
 
 if [istarget cr16*-*-*] {
-    # load support procs
-    # load_lib cgen.exp
+    # Used to locate the `run` program.
+    global arch
+    set arch "cr16"
 
     # all machines
     set all_machs "cr16"
diff --git a/sim/testsuite/cr16/misc.exp b/sim/testsuite/cr16/misc.exp
index 39dd3a4caa3c..67fa4c2d7d38 100644
--- a/sim/testsuite/cr16/misc.exp
+++ b/sim/testsuite/cr16/misc.exp
@@ -1,8 +1,9 @@
 # Miscellaneous CR16 simulator testcases
 
 if [istarget cr16*-*-*] {
-    # load support procs
-    # load_lib cgen.exp
+    # Used to locate the `run` program.
+    global arch
+    set arch "cr16"
 
     # all machines
     set all_machs "cr16"
diff --git a/sim/testsuite/cris/asm/asm.exp b/sim/testsuite/cris/asm/asm.exp
index 415bbf1082a9..b8c14c8d05cb 100644
--- a/sim/testsuite/cris/asm/asm.exp
+++ b/sim/testsuite/cris/asm/asm.exp
@@ -16,6 +16,10 @@
 # Miscellaneous CRIS simulator testcases in assembly code.
 
 if [istarget cris*-*-*] {
+    # Used to locate the `run` program.
+    global arch
+    set arch "cris"
+
     global ASFLAGS_FOR_TARGET
     # All machines we test and the corresponding assembler option.  Needs
     # update if we build the simulator for crisv0 crisv3 and crisv8 too.
diff --git a/sim/testsuite/cris/c/c.exp b/sim/testsuite/cris/c/c.exp
index 08ea18812ec5..3d493b7c1449 100644
--- a/sim/testsuite/cris/c/c.exp
+++ b/sim/testsuite/cris/c/c.exp
@@ -19,6 +19,10 @@ if ![istarget cris*-*-*] {
     return
 }
 
+# Used to locate the `run` program.
+global arch
+set arch "cris"
+
 set CFLAGS_FOR_TARGET "-O2"
 if [istarget cris-*-*] {
     set mach "crisv10"
diff --git a/sim/testsuite/cris/hw/rv-n-cris/rvc.exp b/sim/testsuite/cris/hw/rv-n-cris/rvc.exp
index 0f9ecec32a26..0a018fa4b881 100644
--- a/sim/testsuite/cris/hw/rv-n-cris/rvc.exp
+++ b/sim/testsuite/cris/hw/rv-n-cris/rvc.exp
@@ -112,6 +112,10 @@ proc slurp_rv { file } {
 # The main test loop.
 
 if [istarget cris*-*-*] {
+    # Used to locate the `run` program.
+    global arch
+    set arch "cris"
+
     global ASFLAGS_FOR_TARGET
     set has_rv_and_cris [sim_has_rv_and_cris]
     global global_as_options
diff --git a/sim/testsuite/d10v/allinsn.exp b/sim/testsuite/d10v/allinsn.exp
index 123509a3b990..e2e44a290920 100644
--- a/sim/testsuite/d10v/allinsn.exp
+++ b/sim/testsuite/d10v/allinsn.exp
@@ -1,8 +1,10 @@
 # d10v simulator testsuite.
 
 if [istarget d10v*-*] {
-    # load support procs (none yet)
-    # load_lib cgen.exp
+    # Used to locate the `run` program.
+    global arch
+    set arch "d10v"
+
     # all machines
     set all_machs "d10v"
 
diff --git a/sim/testsuite/frv/allinsn.exp b/sim/testsuite/frv/allinsn.exp
index b7f9fe2ad06c..2633f30df567 100644
--- a/sim/testsuite/frv/allinsn.exp
+++ b/sim/testsuite/frv/allinsn.exp
@@ -1,8 +1,10 @@
 # FRV simulator testsuite.
 
 if [istarget frv*-*] {
-    # load support procs (none yet)
-    # load_lib cgen.exp
+    # Used to locate the `run` program.
+    global arch
+    set arch "frv"
+
     # all machines
     set all_machs "frv fr500 fr550 fr400 fr405 fr450"
     set cpu_option -mcpu
diff --git a/sim/testsuite/frv/fr400/allinsn.exp b/sim/testsuite/frv/fr400/allinsn.exp
index b1697610403c..ea5846f8fa42 100644
--- a/sim/testsuite/frv/fr400/allinsn.exp
+++ b/sim/testsuite/frv/fr400/allinsn.exp
@@ -1,8 +1,10 @@
 # FRV simulator testsuite.
 
 if [istarget frv*-*] {
-    # load support procs (none yet)
-    # load_lib cgen.exp
+    # Used to locate the `run` program.
+    global arch
+    set arch "frv"
+
     # all machines
     set all_machs "fr400 fr405 fr450 fr550"
     set cpu_option -mcpu
diff --git a/sim/testsuite/frv/fr500/allinsn.exp b/sim/testsuite/frv/fr500/allinsn.exp
index 7d192593efb5..40caa6307060 100644
--- a/sim/testsuite/frv/fr500/allinsn.exp
+++ b/sim/testsuite/frv/fr500/allinsn.exp
@@ -1,8 +1,10 @@
 # FRV simulator testsuite.
 
 if [istarget frv*-*] {
-    # load support procs (none yet)
-    # load_lib cgen.exp
+    # Used to locate the `run` program.
+    global arch
+    set arch "frv"
+
     # all machines
     set all_machs "frv fr500 fr550"
     set cpu_option -mcpu
diff --git a/sim/testsuite/frv/fr550/allinsn.exp b/sim/testsuite/frv/fr550/allinsn.exp
index 1fe17952de1a..8768a6719946 100644
--- a/sim/testsuite/frv/fr550/allinsn.exp
+++ b/sim/testsuite/frv/fr550/allinsn.exp
@@ -1,8 +1,10 @@
 # FRV simulator testsuite.
 
 if [istarget frv*-*] {
-    # load support procs (none yet)
-    # load_lib cgen.exp
+    # Used to locate the `run` program.
+    global arch
+    set arch "frv"
+
     # all machines
     set all_machs "fr550"
     set cpu_option -mcpu
diff --git a/sim/testsuite/frv/interrupts.exp b/sim/testsuite/frv/interrupts.exp
index e31533e10533..d1f7628d962d 100644
--- a/sim/testsuite/frv/interrupts.exp
+++ b/sim/testsuite/frv/interrupts.exp
@@ -1,8 +1,10 @@
 # FRV simulator testsuite.
 
 if [istarget frv*-*] {
-    # load support procs (none yet)
-    # load_lib cgen.exp
+    # Used to locate the `run` program.
+    global arch
+    set arch "frv"
+
     # all machines
     set all_machs "frv fr500 fr550 fr400"
     set cpu_option -mcpu
diff --git a/sim/testsuite/frv/misc.exp b/sim/testsuite/frv/misc.exp
index 4245a81cb60a..d9c80a546000 100644
--- a/sim/testsuite/frv/misc.exp
+++ b/sim/testsuite/frv/misc.exp
@@ -1,8 +1,10 @@
 # Miscellaneous FRV simulator testcases.
 
 if [istarget frv*-*] {
-    # load support procs (none yet)
-    # load_lib cgen.exp
+    # Used to locate the `run` program.
+    global arch
+    set arch "frv"
+
     # all machines
     set all_machs "frv fr500 fr550 fr400 fr405 fr450"
     set cpu_option -mcpu
diff --git a/sim/testsuite/frv/parallel.exp b/sim/testsuite/frv/parallel.exp
index 8101a67afb59..a883b9891d5d 100644
--- a/sim/testsuite/frv/parallel.exp
+++ b/sim/testsuite/frv/parallel.exp
@@ -1,8 +1,10 @@
 # FRV simulator testsuite.
 
 if [istarget frv*-*] {
-    # load support procs (none yet)
-    # load_lib cgen.exp
+    # Used to locate the `run` program.
+    global arch
+    set arch "frv"
+
     # all machines
     set all_machs "frv fr500 fr550 fr400"
     set cpu_option -mcpu
diff --git a/sim/testsuite/ft32/allinsn.exp b/sim/testsuite/ft32/allinsn.exp
index 730b4223632d..50827a592473 100644
--- a/sim/testsuite/ft32/allinsn.exp
+++ b/sim/testsuite/ft32/allinsn.exp
@@ -1,6 +1,10 @@
 # ft32 simulator testsuite
 
 if [istarget ft32-*] {
+    # Used to locate the `run` program.
+    global arch
+    set arch "ft32"
+
     # all machines
     set all_machs "ft32"
 
diff --git a/sim/testsuite/h8300/allinsn.exp b/sim/testsuite/h8300/allinsn.exp
index 68468f6bb106..5355bf58a69d 100644
--- a/sim/testsuite/h8300/allinsn.exp
+++ b/sim/testsuite/h8300/allinsn.exp
@@ -1,6 +1,10 @@
 # Hitachi H8/300 (h, s, sx) simulator testsuite
 
 if {[istarget h8300*-*-*] || [istarget h8sx*-*-*]} then {
+    # Used to locate the `run` program.
+    global arch
+    set arch "h8300"
+
     set all_machs "h8300 h8300h h8300s h8sx"
 
     foreach src [lsort [glob -nocomplain $srcdir/$subdir/*.s]] {
diff --git a/sim/testsuite/iq2000/allinsn.exp b/sim/testsuite/iq2000/allinsn.exp
index 38eee9b277f1..96d58435fb45 100644
--- a/sim/testsuite/iq2000/allinsn.exp
+++ b/sim/testsuite/iq2000/allinsn.exp
@@ -1,6 +1,10 @@
 # iq2000 simulator testsuite
 
 if [istarget iq2000-*] {
+    # Used to locate the `run` program.
+    global arch
+    set arch "iq2000"
+
     # all machines
     set all_machs "iq2000"
 
diff --git a/sim/testsuite/lm32/allinsn.exp b/sim/testsuite/lm32/allinsn.exp
index 61744985f6c8..ae7c141bd643 100644
--- a/sim/testsuite/lm32/allinsn.exp
+++ b/sim/testsuite/lm32/allinsn.exp
@@ -1,6 +1,10 @@
 # lm32 simulator testsuite
 
 if [istarget lm32-*] {
+    # Used to locate the `run` program.
+    global arch
+    set arch "lm32"
+
     # all machines
     set all_machs "lm32"
 
diff --git a/sim/testsuite/m32c/allinsn.exp b/sim/testsuite/m32c/allinsn.exp
index fb5ccca282e1..b09b505972a3 100644
--- a/sim/testsuite/m32c/allinsn.exp
+++ b/sim/testsuite/m32c/allinsn.exp
@@ -2,6 +2,10 @@
 # TODO: Add support for .c tests.
 
 if [istarget m32c*-*-*] {
+    # Used to locate the `run` program.
+    global arch
+    set arch "m32c"
+
     # all machines
     set all_machs "m32c"
 
diff --git a/sim/testsuite/m32r/allinsn.exp b/sim/testsuite/m32r/allinsn.exp
index 8eed80f91d67..a800e78b1b46 100644
--- a/sim/testsuite/m32r/allinsn.exp
+++ b/sim/testsuite/m32r/allinsn.exp
@@ -1,8 +1,9 @@
 # M32R simulator testsuite.
 
 if [istarget m32r*-*-*] {
-    # load support procs
-    # load_lib cgen.exp
+    # Used to locate the `run` program.
+    global arch
+    set arch "m32r"
 
     # all machines
     set all_machs "m32r"
diff --git a/sim/testsuite/m32r/misc.exp b/sim/testsuite/m32r/misc.exp
index 6ed5638ab29b..e571c2eeb69d 100644
--- a/sim/testsuite/m32r/misc.exp
+++ b/sim/testsuite/m32r/misc.exp
@@ -1,8 +1,9 @@
 # Miscellaneous M32R simulator testcases
 
 if [istarget m32r*-*-*] {
-    # load support procs
-    # load_lib cgen.exp
+    # Used to locate the `run` program.
+    global arch
+    set arch "m32r"
 
     # all machines
     set all_machs "m32r"
diff --git a/sim/testsuite/m68hc11/allinsn.exp b/sim/testsuite/m68hc11/allinsn.exp
index db0cbd5d4670..0e9b51ec5934 100644
--- a/sim/testsuite/m68hc11/allinsn.exp
+++ b/sim/testsuite/m68hc11/allinsn.exp
@@ -1,6 +1,10 @@
 # m68hc11 simulator testsuite
 
 if [istarget m68hc11-*] {
+    # Used to locate the `run` program.
+    global arch
+    set arch "m68hc11"
+
     # all machines
     set all_machs "m68hc11"
 
diff --git a/sim/testsuite/mcore/allinsn.exp b/sim/testsuite/mcore/allinsn.exp
index 5921cfc26431..ecc934b20146 100644
--- a/sim/testsuite/mcore/allinsn.exp
+++ b/sim/testsuite/mcore/allinsn.exp
@@ -1,6 +1,10 @@
 # mcore simulator testsuite
 
 if [istarget mcore-*] {
+    # Used to locate the `run` program.
+    global arch
+    set arch "mcore"
+
     # all machines
     set all_machs "mcore"
 
diff --git a/sim/testsuite/microblaze/allinsn.exp b/sim/testsuite/microblaze/allinsn.exp
index f756914292c4..5f5a4475eed4 100644
--- a/sim/testsuite/microblaze/allinsn.exp
+++ b/sim/testsuite/microblaze/allinsn.exp
@@ -1,6 +1,10 @@
 # microblaze simulator testsuite
 
 if [istarget microblaze-*] {
+    # Used to locate the `run` program.
+    global arch
+    set arch "microblaze"
+
     # all machines
     set all_machs "microblaze"
 
diff --git a/sim/testsuite/mips/basic.exp b/sim/testsuite/mips/basic.exp
index f810741dbb74..2eff923c0fc7 100644
--- a/sim/testsuite/mips/basic.exp
+++ b/sim/testsuite/mips/basic.exp
@@ -42,6 +42,9 @@ proc run_sim_tests { name requested_machs { requested_micromips_machs "" } } {
 
 # Only test mips*-*-elf (e.g., no mips*-*-linux)
 if {[istarget mips*-*-elf]} {
+    # Used to locate the `run` program.
+    global arch
+    set arch "mips"
 
     set dspmodels ""
     set mdmxmodels ""
diff --git a/sim/testsuite/mn10300/allinsn.exp b/sim/testsuite/mn10300/allinsn.exp
index f8431e7222ea..7166aefddf30 100644
--- a/sim/testsuite/mn10300/allinsn.exp
+++ b/sim/testsuite/mn10300/allinsn.exp
@@ -1,6 +1,10 @@
 # mn10300 simulator testsuite
 
 if [istarget mn10300-*] {
+    # Used to locate the `run` program.
+    global arch
+    set arch "mn10300"
+
     # all machines
     set all_machs "mn10300"
 
diff --git a/sim/testsuite/moxie/allinsn.exp b/sim/testsuite/moxie/allinsn.exp
index 1a6af8b37d45..241e67576253 100644
--- a/sim/testsuite/moxie/allinsn.exp
+++ b/sim/testsuite/moxie/allinsn.exp
@@ -1,6 +1,10 @@
 # moxie simulator testsuite
 
 if [istarget moxie-*] {
+    # Used to locate the `run` program.
+    global arch
+    set arch "moxie"
+
     # all machines
     set all_machs "moxie"
 
diff --git a/sim/testsuite/msp430/allinsn.exp b/sim/testsuite/msp430/allinsn.exp
index affa8aedc2ad..83030290cce2 100644
--- a/sim/testsuite/msp430/allinsn.exp
+++ b/sim/testsuite/msp430/allinsn.exp
@@ -1,6 +1,10 @@
 # msp430 simulator testsuite
 
 if [istarget msp430-*] {
+    # Used to locate the `run` program.
+    global arch
+    set arch "msp430"
+
     # all machines
     set all_machs "msp430"
 
diff --git a/sim/testsuite/or1k/alltests.exp b/sim/testsuite/or1k/alltests.exp
index dd08fbcf99b4..98c1345d0be5 100644
--- a/sim/testsuite/or1k/alltests.exp
+++ b/sim/testsuite/or1k/alltests.exp
@@ -16,6 +16,9 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 if [istarget or1k*-*-*] {
+    # Used to locate the `run` program.
+    global arch
+    set arch "or1k"
 
     set all_machs "or1k"
 
diff --git a/sim/testsuite/pru/allinsn.exp b/sim/testsuite/pru/allinsn.exp
index d147f731c913..c0d5ce936894 100644
--- a/sim/testsuite/pru/allinsn.exp
+++ b/sim/testsuite/pru/allinsn.exp
@@ -19,6 +19,10 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 if [istarget pru-*] {
+    # Used to locate the `run` program.
+    global arch
+    set arch "pru"
+
     # all machines
     set all_machs "pru"
 
diff --git a/sim/testsuite/sh/allinsn.exp b/sim/testsuite/sh/allinsn.exp
index 40d139299426..235a40c692ab 100644
--- a/sim/testsuite/sh/allinsn.exp
+++ b/sim/testsuite/sh/allinsn.exp
@@ -13,6 +13,10 @@ foreach opt $board_variant_list {
 }
 
 if [istarget sh-*elf] {
+    # Used to locate the `run` program.
+    global arch
+    set arch "sh"
+
     run_sim_test add.s    $all
     run_sim_test and.s    $all
     run_sim_test bandor.s sh
diff --git a/sim/testsuite/v850/allinsns.exp b/sim/testsuite/v850/allinsns.exp
index f60c3d66aa46..4c3bc088ff6b 100644
--- a/sim/testsuite/v850/allinsns.exp
+++ b/sim/testsuite/v850/allinsns.exp
@@ -3,10 +3,11 @@
 if [istarget v850*-*] {
     global opt
 
-    # load support procs (none yet)
-    # load_lib cgen.exp
-    # all machines
+    # Used to locate the `run` program.
+    global arch
+    set arch "v850"
 
+    # all machines
     switch -regexp -- $opt {
 	.*v850e.* {
 	    set all_machs "v850e"
@@ -36,4 +37,3 @@ if [istarget v850*-*] {
 #    }
 #    puts [format "%-30s %s" $var "[set ::$var]"]
 #}
-	
\ No newline at end of file
-- 
2.28.0


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-02-28  8:55 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-02-28  8:55 [PATCH 1/2] sim: switch top level to automake Mike Frysinger via Gdb-patches
2021-02-28  8:55 ` [PATCH 2/2] sim: testsuite: merge into toplevel automake Mike Frysinger via Gdb-patches
  -- strict thread matches above, loose matches on Subject: below --
2021-01-17 16:09 [PATCH] sim: testsuite: push $arch out to targets Mike Frysinger via Gdb-patches
2021-01-18 17:54 ` [PATCH 1/2] sim: switch top level to automake Mike Frysinger via Gdb-patches

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox