summaryrefslogtreecommitdiffstats
path: root/gdb/configure.in
diff options
context:
space:
mode:
authorFred Fish <fnf@specifix.com>1993-03-23 01:01:49 +0000
committerFred Fish <fnf@specifix.com>1993-03-23 01:01:49 +0000
commit1a0edbc7d7bf551740b2cc44552f7adf7e45ec88 (patch)
treed9c96951d85f1cfb555021296f52f61c34163b24 /gdb/configure.in
parente0fd5860a1e0ff76be778fdb372f496d9452da01 (diff)
downloadppe42-binutils-1a0edbc7d7bf551740b2cc44552f7adf7e45ec88.tar.gz
ppe42-binutils-1a0edbc7d7bf551740b2cc44552f7adf7e45ec88.zip
* config/{a29k, arm, convex, gould, h8300, i386, i860, i960, m68k,
m88k, mips, none, ns32k, pa, pyr, romp, rs6000, sparc, tahoe, vax, z8k}: New directories to hold cpu specific configuration files. Naming follows gcc convention. * config/{*.mt, *.mh}: All target and host makefile fragment config files moved to an appropriate config/<cpu> subdirectory. * nm-*, xm-*, tm-*: All native, host, and target files, which get linked to nm.h, xm.h, and tm.h respectively by configure, moved to appropriate config/<cpu> subdirectory. * nm-sysv4.h, xm-sysv4.h, tm-sysv4.h, tm-sunos.h, nm-trash.h: Native, host, and target files that are common across more than one cpu architecture and included by one of the configured native, host, or target files, get moved to config directory. * Makefile.in (INCLUDE_CFLAGS): Add -I${srcdir}/config to pick up native, host, or target include files moved to one of the config subdirectories, and that are included by other files. * Makefile.in (alldeps.mak): Modify to account for new config directory structure. * alldeps.mak, depend: Update for new config directory structure. * config/*/[ntx]m-*.h: Modify all files that include other [ntx]m-*.h files to use path relative to gdb/config. I.E. "a29k/tm-ultra3.h" includes "a29k/tm-29k.h" rather than just "tm-29k.h". * remote-eb.c (tm-29k.h): Include a29k/tm-29k.h. * mipsread.c (tm-mips.h): Include mips/tm-mips.h. * i860-pinsn.c (tm-i860.h): Include i860/tm-i860.h. * configure.in: Default gdb_host_cpu to host_cpu, and remap the ones where the default is not unique or different than the config subdirectory name. Similarly, handle gdb_target_cpu. Modify configure.in as appropriate to make use of gdb_host_cpu and gdb_target_cpu to find makefile fragments and make links.
Diffstat (limited to 'gdb/configure.in')
-rw-r--r--gdb/configure.in71
1 files changed, 58 insertions, 13 deletions
diff --git a/gdb/configure.in b/gdb/configure.in
index a26090a140..61d2bd4a27 100644
--- a/gdb/configure.in
+++ b/gdb/configure.in
@@ -4,6 +4,21 @@ srctrigger=main.c
# per-host:
+# Map host cpu into the config cpu subdirectory name.
+# The default is $host_cpu.
+
+case "${host_cpu}" in
+
+c[12]) gdb_host_cpu=convex ;;
+hppa*) gdb_host_cpu=pa ;;
+i[34]86) gdb_host_cpu=i386 ;;
+m68*) gdb_host_cpu=m68k ;;
+np1) gdb_host_cpu=gould ;;
+pyramid) gdb_host_cpu=pyr ;;
+*) gdb_host_cpu=$host_cpu ;;
+
+esac
+
# map host info into gdb names.
case "${host}" in
@@ -88,16 +103,34 @@ vax-*-ultrix*) gdb_host=vaxult ;;
esac
-if [ ! -f ${srcdir}/config/${gdb_host}.mh ]; then
+if [ ! -f ${srcdir}/config/${gdb_host_cpu}/${gdb_host}.mh ]; then
echo '***' "Gdb does not support host ${host}" 1>&2
exit 1
fi
# We really shouldn't depend on there being a space after XM_FILE= ...
-hostfile=`awk '$1 == "XM_FILE=" { print $2 }' <${srcdir}/config/${gdb_host}.mh`
+hostfile=`awk '$1 == "XM_FILE=" { print $2 }' <${srcdir}/config/${gdb_host_cpu}/${gdb_host}.mh`
# per-target:
+# Map target cpu into the config cpu subdirectory name.
+# The default is $target_cpu.
+
+case "${target_cpu}" in
+
+c[12]) gdb_target_cpu=convex ;;
+hppa*) gdb_target_cpu=pa ;;
+i[34]86) gdb_target_cpu=i386 ;;
+m68*) gdb_target_cpu=m68k ;;
+np1) gdb_target_cpu=gould ;;
+pn) gdb_target_cpu=gould ;;
+pyramid) gdb_target_cpu=pyr ;;
+*) gdb_target_cpu=$target_cpu ;;
+
+esac
+
+# map target info into gdb names.
+
case "${target}" in
a29k-*-aout) gdb_target=a29k ;;
@@ -209,25 +242,25 @@ vax-*-*) gdb_target=vax ;;
z8k-unknown-sim) gdb_target=z8ksim ;;
esac
-if [ ! -f ${srcdir}/config/${gdb_target}.mt ]; then
+if [ ! -f ${srcdir}/config/${gdb_target_cpu}/${gdb_target}.mt ]; then
echo '***' "Gdb does not support target ${target}" 1>&2
exit 1
fi
if [ -z "${removing}" ] ; then
- cat ${srcdir}/config/${gdb_host}.mh ${srcdir}/config/${gdb_target}.mt | awk '$1 == "#msg" {
+ cat ${srcdir}/config/${gdb_host_cpu}/${gdb_host}.mh ${srcdir}/config/${gdb_target_cpu}/${gdb_target}.mt | awk '$1 == "#msg" {
print substr($0,6)}'
fi
# We really shouldn't depend on there being a space after TM_FILE= ...
-targetfile=`awk '$1 == "TM_FILE=" { print $2 }' <${srcdir}/config/${gdb_target}.mt`
+targetfile=`awk '$1 == "TM_FILE=" { print $2 }' <${srcdir}/config/${gdb_target_cpu}/${gdb_target}.mt`
if [ "${target}" = "${host}" ] ; then
- nativefile=`awk '$1 == "NAT_FILE=" { print $2 }' <${srcdir}/config/${gdb_host}.mh`
+ nativefile=`awk '$1 == "NAT_FILE=" { print $2 }' <${srcdir}/config/${gdb_host_cpu}/${gdb_host}.mh`
fi
-host_makefile_frag=config/${gdb_host}.mh
-target_makefile_frag=config/${gdb_target}.mt
+host_makefile_frag=config/${gdb_host_cpu}/${gdb_host}.mh
+target_makefile_frag=config/${gdb_target_cpu}/${gdb_target}.mt
# If hostfile (XM_FILE) and/or targetfile (TM_FILE) and/or nativefile
# (NAT_FILE) is not set in the ?config/* file, we don't make the
@@ -239,22 +272,34 @@ files=
links=
rm -f xm.h
if [ "${hostfile}" != "" ]; then
- files="${files} ${hostfile}"
+ if [ -f ${srcdir}/config/${hostfile} ]; then
+ files="${files} config/${hostfile}"
+ else
+ files="${files} config/${gdb_host_cpu}/${hostfile}"
+ fi
links="${links} xm.h"
fi
rm -f tm.h
if [ "${targetfile}" != "" ]; then
- files="${files} ${targetfile}"
+ if [ -f ${srcdir}/config/${targetfile} ]; then
+ files="${files} config/${targetfile}"
+ else
+ files="${files} config/${gdb_target_cpu}/${targetfile}"
+ fi
links="${links} tm.h"
fi
-rm -f nat.h
+rm -f nm.h
if [ "${nativefile}" != "" ]; then
- files="${files} ${nativefile}"
+ if [ -f ${srcdir}/config/${nativefile} ]; then
+ files="${files} config/${nativefile}"
+ else
+ files="${files} config/${gdb_host_cpu}/${nativefile}"
+ fi
links="${links} nm.h"
# temporary scaffolding until all hosts have the host/target/native
# split in place.
else
- files="${files} nm-trash.h"
+ files="${files} config/nm-trash.h"
links="${links} nm.h"
fi
OpenPOWER on IntegriCloud