6 # map host info into gdb names.
11 case "${host_vendor}" in
15 gas) gdb_host=altosgas ;;
22 amigados) gdb_host=amigados ;;
23 svr4) gdb_host=amix ;;
29 hpux) gdb_host=hp300hpux ;;
30 bsd) gdb_host=hp300bsd ;;
35 sony) gdb_host=news ;;
38 sunos3) gdb_host=sun3os3 ;;
39 sunos4) gdb_host=sun3os4 ;;
47 case "${host_vendor}" in
50 sunos3) gdb_host=sun2os3 ;;
51 sunos4) gdb_host=sun2os4 ;;
59 sunos3) gdb_host=sun4os3 ;;
60 sunos4) gdb_host=sun4os4 ;;
66 case "${host_vendor}" in
67 sony) gdb_host=news1000 ;;
72 case "${host_vendor}" in
73 sony) gdb_host=bigmips ;;
74 dec) gdb_host=decstation ;;
75 little) gdb_host=littlemips ;;
76 sgi) gdb_host=irix3 ;;
81 case "${host_vendor}" in
82 sun) gdb_host=sun386 ;;
83 sco) gdb_host=i386sco ;;
84 sequent) gdb_host=symmetry ;;
87 sysv) gdb_host=i386v ;;
88 sysv32) gdb_host=i386v32 ;;
89 mach) gdb_host=i386mach ;;
95 c1 | c2) gdb_host=convex ;;
98 case "${host_vendor}" in
99 umax) gdb_host=umax ;;
111 arm | vax | m88k | merlin | none | np1 | pn | pyramid | tahoe)
122 if [ ! -f xconfig/${gdb_host} ]; then
123 echo '***' "Gdb does not support host ${host}" 1>&2
127 # We really shouldn't depend on there being a space after XM_FILE= ...
128 hostfile=`awk '$1 == "XM_FILE=" { print $2 }' <xconfig/${gdb_host}`
132 case "${target_cpu}" in
135 case "${target_vendor}" in
136 att) gdb_target=3b1 ;;
137 altos) gdb_target=altos ;;
140 amigados) gdb_host=amigados ;;
141 svr4) gdb_target=amix ;;
145 case "${target_os}" in
146 bsd) gdb_target=hp300bsd ;;
147 hpux) gdb_target=hp300hpux ;;
151 case "${target_os}" in
152 sunos3) gdb_target=sun3os3 ;;
153 sunos4) gdb_target=sun3os4 ;;
154 *) gdb_target=sun3 ;;
157 wrs) gdb_target=vxworks68 ;;
158 isi) gdb_target=isi ;;
159 sony) gdb_target=news ;;
164 case "${target_vendor}" in
166 case "${target_os}" in
167 sunos3) gdb_target=sun2os3 ;;
168 sunos4) gdb_target=sun2os4 ;;
169 *) gdb_target=sun2 ;;
175 case "${target_vendor}" in
176 sony) gdb_target=news1000 ;;
180 none | arm | tahoe | vax | np1 | pn | np1 | pn | pyramid | merlin | m88k)
181 gdb_target=${target_cpu} ;;
184 case "${target_os}" in
185 none|aout|coff) gdb_target=a29k ;;
186 sym1) gdb_target=ultra3 ;;
187 kern) gdb_target=a29k-kern ;;
188 ebmon) gdb_target=a29k;;
193 case "${target_vendor}" in
194 sony) gdb_target=bigmips ;;
195 dec) gdb_target=decstation ;;
196 little) gdb_target=littlemips ;;
197 sgi) gdb_target=irix3 ;;
201 c1 | c2) gdb_target=convex ;;
204 case "${target_vendor}" in
206 case "${target_os}" in
207 sunos3) gdb_target=sun4os3 ;;
208 sunos4) gdb_target=sun4os4 ;;
209 *) gdb_target=sun4 ;;
217 case "${target_vendor}" in
218 sco) gdb_target=i386sco ;;
219 sun) gdb_target=sun386 ;;
220 sequent) gdb_target=symmetry ;;
221 coff) gdb_target=i386v ;;
222 aout) gdb_target=i386v ;;
224 case "${target_os}" in
225 sysv) gdb_target=i386v ;;
226 sysv32) gdb_target=i386v32 ;;
227 mach) gdb_target=i386mach ;;
233 case "${target_vendor}" in
234 bout | wrs) gdb_target=vxworks960 ;;
235 coff | intel) gdb_target=nindy960 ;;
240 case "${target_vendor}" in
241 utek) gdb_target=umax ;;
245 ### unhandled targets
252 if [ ! -f tconfig/${gdb_target} ]; then
253 echo '***' "Gdb does not support target ${target}" 1>&2
257 if [ -z "${removing}" ] ; then
258 cat xconfig/${gdb_host} tconfig/${gdb_target} | awk '$1 == "#msg" {
262 # We really shouldn't depend on there being a space after TM_FILE= ...
263 targetfile=`awk '$1 == "TM_FILE=" { print $2 }' <tconfig/${gdb_target}`
265 host_makefile_frag=xconfig/${gdb_host}
266 target_makefile_frag=tconfig/${gdb_target}
268 # If hostfile (XM_FILE) and/or targetfile (TM_FILE) is not set in the
269 # ?config/* file, we don't make the corresponding links. But we have
270 # to remove the xm.h files and tm.h files anyway, e.g. when switching
271 # from "configure host" to "configure none".
275 if [ "${hostfile}" != "" ]; then
276 files="${files} ${hostfile}"
277 links="${links} xm.h"
280 if [ "${targetfile}" != "" ]; then
281 files="${files} ${targetfile}"
282 links="${links} tm.h"
291 grep -s "source ${srcdir}/.gdbinit" .gdbinit 2>/dev/null || \
292 echo "source ${srcdir}/.gdbinit" >> .gdbinit
295 cat ${srcdir}/alldeps.mak ${srcdir}/depend >>Makefile