aboutsummaryrefslogtreecommitdiff
path: root/sim/testsuite/configure
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2010-04-26 16:23:24 +0000
committerMike Frysinger <vapier@gentoo.org>2010-04-26 16:23:24 +0000
commit119da4656825919121f24aac638a7022066ef56c (patch)
treee9af8b16367e3968f1e7f3d0c011821790cb784d /sim/testsuite/configure
parent64af4c92f8369e30c0205efe8dff12938cbeb235 (diff)
downloadgdb-119da4656825919121f24aac638a7022066ef56c.zip
gdb-119da4656825919121f24aac638a7022066ef56c.tar.gz
gdb-119da4656825919121f24aac638a7022066ef56c.tar.bz2
sim: unify target->subdir handling for default tests
The testsuite subdir has a note about unifying the target->subdir logic, so do just that. The end goal here is to have `make check` work out of the box without having to delve into dejagnu internals. The target-specific logic is split out of the top level configure.ac file and into a dedicated configure.tgt similar to other subprojects (gdb and ld and etc...) with the difference that this file has to be included at the m4 level instead of the shell level. This is necessary only because autoconf requires AC_CONFIG_SUBDIRS be given a string literal and not a variable value. Then the toplevel and the testsuite configure files pull this in, the sim subdir gets expanded into testsuite/site.exp, and the default sim run code uses this info to set the sim path to the local compiled run file if it hasn't already been specified. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Diffstat (limited to 'sim/testsuite/configure')
-rwxr-xr-xsim/testsuite/configure116
1 files changed, 110 insertions, 6 deletions
diff --git a/sim/testsuite/configure b/sim/testsuite/configure
index 03db937..da7967e 100755
--- a/sim/testsuite/configure
+++ b/sim/testsuite/configure
@@ -554,7 +554,7 @@ ac_unique_file="common/bits-tst.c"
enable_option_checking=no
ac_subst_vars='LTLIBOBJS
LIBOBJS
-arch
+sim_arch
subdirs
target_os
target_vendor
@@ -1808,14 +1808,118 @@ subdirs="$subdirs frv-elf"
;;
esac
-# Compute the target architecture.
-# FIXME: Will need to canonicalize some values.
-# FIXME: Should be in generally accessable place.
-case $target in
- *) arch=${target_cpu} ;;
+
+# WHEN ADDING ENTRIES TO THIS MATRIX:
+
+# Make sure that the left side always has two dashes. Otherwise you
+# can get spurious matches. Even for unambiguous cases, do this as a
+# convention, else the table becomes a real mess to understand and
+# maintain.
+
+
+
+sim_testsuite=no
+sim_common=yes
+sim_igen=no
+sim_arch=
+case "${target}" in
+ arm*-*-* | thumb*-*-* | strongarm*-*-* | xscale-*-*)
+ sim_arch=arm
+ sim_testsuite=yes
+ ;;
+ avr*-*-*)
+ sim_arch=avr
+ ;;
+ cr16*-*-*)
+ sim_arch=cr16
+ sim_testsuite=yes
+ ;;
+ cris-*-* | crisv32-*-*)
+ sim_arch=cris
+ sim_testsuite=yes
+ ;;
+ d10v-*-*)
+ sim_arch=d10v
+ ;;
+ frv-*-*)
+ sim_arch=frv
+ sim_testsuite=yes
+ ;;
+ h8300*-*-*)
+ sim_arch=h8300
+ sim_testsuite=yes
+ ;;
+ iq2000-*-*)
+ sim_arch=iq2000
+ sim_testsuite=yes
+ ;;
+ lm32-*-*)
+ sim_arch=lm32
+ sim_testsuite=yes
+ ;;
+ m32c-*-*)
+ sim_arch=m32c
+ ;;
+ m32r-*-*)
+ sim_arch=m32r
+ sim_testsuite=yes
+ ;;
+ m68hc11-*-*|m6811-*-*)
+ sim_arch=m68hc11
+ sim_testsuite=yes
+ ;;
+ mcore-*-*)
+ sim_arch=mcore
+ sim_testsuite=yes
+ ;;
+ microblaze-*-*)
+ sim_arch=microblaze
+ sim_testsuite=yes
+ ;;
+ mips*-*-*)
+ sim_arch=mips
+ sim_testsuite=yes
+ sim_igen=yes
+ ;;
+ mn10300*-*-*)
+ sim_arch=mn10300
+ sim_igen=yes
+ ;;
+ moxie-*-*)
+ sim_arch=moxie
+ sim_testsuite=yes
+ ;;
+ rx-*-*)
+ sim_arch=rx
+ ;;
+ sh64*-*-*)
+ sim_arch=sh64
+ sim_testsuite=yes
+ ;;
+ sh*-*-*)
+ sim_arch=sh
+ sim_testsuite=yes
+ ;;
+ sparc-*-rtems*|sparc-*-elf*)
+ sim_arch=erc32
+ sim_testsuite=yes
+ ;;
+ powerpc*-*-*)
+ sim_arch=ppc
+ ;;
+ v850*-*-*)
+ sim_arch=v850
+ sim_igen=yes
+ sim_testsuite=yes
+ ;;
+ *)
+ # No simulator subdir, so the subdir "common" isn't needed.
+ sim_common=no
+ ;;
esac
+
ac_config_files="$ac_config_files Makefile"
cat >confcache <<\_ACEOF