Commit | Line | Data |
---|---|---|
50d2bb5b | 1 | configdirs="doc" |
912e0732 RP |
2 | srcname="GDB" |
3 | srctrigger=main.c | |
bc028766 RP |
4 | target_dependent=true |
5 | ||
0df06ca0 RP |
6 | # per-host: |
7 | ||
6c815bbe RP |
8 | # map host info into gdb names. |
9 | ||
10 | case "${host_cpu}" in | |
11 | ||
12 | m68k) | |
13 | case "${host_vendor}" in | |
14 | att) gdb_host=3b1 ;; | |
15 | altos) | |
16 | case "${host_os}" in | |
17 | gas) gdb_host=altosgas ;; | |
18 | *) gdb_host=altos ;; | |
19 | esac | |
20 | ;; | |
afe4ca15 JG |
21 | |
22 | cbm) | |
23 | case ${host_os} in | |
24 | amigados) gdb_host=amigados ;; | |
ee1ad69c | 25 | sysv4*) gdb_host=amix ;; |
afe4ca15 JG |
26 | esac |
27 | ;; | |
28 | ||
6c815bbe RP |
29 | hp) |
30 | case ${host_os} in | |
31 | hpux) gdb_host=hp300hpux ;; | |
32 | bsd) gdb_host=hp300bsd ;; | |
33 | esac | |
34 | ;; | |
35 | ||
36 | isi) gdb_host=isi ;; | |
37 | sony) gdb_host=news ;; | |
38 | sun) | |
39 | case "${host_os}" in | |
40 | sunos3) gdb_host=sun3os3 ;; | |
41 | sunos4) gdb_host=sun3os4 ;; | |
42 | *) gdb_host=sun3 ;; | |
43 | esac | |
44 | ;; | |
45 | esac | |
46 | ;; | |
47 | ||
48 | m68000) | |
49 | case "${host_vendor}" in | |
50 | sun) | |
51 | case "${host_os}" in | |
52 | sunos3) gdb_host=sun2os3 ;; | |
53 | sunos4) gdb_host=sun2os4 ;; | |
54 | *) gdb_host=sun2 ;; | |
55 | esac | |
56 | esac | |
57 | ;; | |
58 | ||
59 | sparc) | |
60 | case "${host_os}" in | |
61 | sunos3) gdb_host=sun4os3 ;; | |
62 | sunos4) gdb_host=sun4os4 ;; | |
63 | *) gdb_host=sun4 ;; | |
64 | esac | |
65 | ;; | |
66 | ||
67 | m68030) | |
68 | case "${host_vendor}" in | |
69 | sony) gdb_host=news1000 ;; | |
70 | esac | |
71 | ;; | |
72 | ||
73 | mips) | |
74 | case "${host_vendor}" in | |
75 | sony) gdb_host=bigmips ;; | |
5d2cfefe | 76 | dec) gdb_host=decstation ;; |
6c815bbe | 77 | little) gdb_host=littlemips ;; |
625453dc | 78 | sgi) gdb_host=irix3 ;; |
6c815bbe RP |
79 | esac |
80 | ;; | |
81 | ||
be9a2362 FF |
82 | i860) |
83 | gdb_host=stratus | |
84 | ;; | |
85 | ||
6c815bbe RP |
86 | i386) |
87 | case "${host_vendor}" in | |
88 | sun) gdb_host=sun386 ;; | |
89 | sco) gdb_host=i386sco ;; | |
90 | sequent) gdb_host=symmetry ;; | |
91 | *) | |
92 | case "${host_os}" in | |
6c815bbe | 93 | sysv32) gdb_host=i386v32 ;; |
ee1ad69c FF |
94 | sysv4*) gdb_host=i386v4 ;; |
95 | sysv*) gdb_host=i386v ;; | |
92732c27 | 96 | scosysv*) gdb_host=i386sco ;; |
6617b94e | 97 | mach) gdb_host=i386mach ;; |
6c815bbe RP |
98 | esac |
99 | ;; | |
100 | esac | |
101 | ;; | |
102 | ||
103 | c1 | c2) gdb_host=convex ;; | |
104 | ||
105 | ns32k) | |
106 | case "${host_vendor}" in | |
107 | umax) gdb_host=umax ;; | |
108 | esac | |
109 | ;; | |
110 | ||
0476df73 | 111 | romp) |
473f3318 JG |
112 | gdb_host=rtbsd |
113 | ;; | |
114 | ||
b90c4f33 JG |
115 | rs6000) |
116 | gdb_host=rs6000 | |
117 | ;; | |
118 | ||
473f3318 JG |
119 | a29k) |
120 | gdb_host=ultra3 | |
121 | ;; | |
122 | ||
8c7ae4a2 SC |
123 | m88k) |
124 | case "${host_vendor}" in | |
125 | motorola) | |
126 | gdb_host=delta88 ;; | |
127 | *) | |
128 | gdb_host=m88k ;; | |
129 | esac | |
130 | ;; | |
131 | ||
132 | arm | vax | merlin | none | np1 | pn | pyramid | tahoe) | |
473f3318 JG |
133 | gdb_host=${host_cpu} |
134 | ;; | |
6c815bbe RP |
135 | |
136 | ### unhandled hosts | |
137 | #altosgas | |
138 | #i386v-g | |
139 | #i386v32-g | |
140 | ||
141 | esac | |
142 | ||
8c7ae4a2 | 143 | |
bc028766 | 144 | if [ ! -f ${srcdir}/config/mh-${gdb_host} ]; then |
6c815bbe | 145 | echo '***' "Gdb does not support host ${host}" 1>&2 |
912e0732 RP |
146 | exit 1 |
147 | fi | |
148 | ||
bdf3621b | 149 | # We really shouldn't depend on there being a space after XM_FILE= ... |
bc028766 | 150 | hostfile=`awk '$1 == "XM_FILE=" { print $2 }' <${srcdir}/config/mh-${gdb_host}` |
912e0732 | 151 | |
0df06ca0 | 152 | # per-target: |
912e0732 | 153 | |
6c815bbe RP |
154 | case "${target_cpu}" in |
155 | ||
156 | m68k) | |
157 | case "${target_vendor}" in | |
158 | att) gdb_target=3b1 ;; | |
159 | altos) gdb_target=altos ;; | |
afe4ca15 JG |
160 | cbm) |
161 | case ${target_os} in | |
162 | amigados) gdb_host=amigados ;; | |
ee1ad69c | 163 | sysv4*) gdb_target=amix ;; |
afe4ca15 JG |
164 | esac |
165 | ;; | |
6c815bbe RP |
166 | hp) |
167 | case "${target_os}" in | |
168 | bsd) gdb_target=hp300bsd ;; | |
169 | hpux) gdb_target=hp300hpux ;; | |
170 | esac | |
171 | ;; | |
172 | sun) | |
173 | case "${target_os}" in | |
174 | sunos3) gdb_target=sun3os3 ;; | |
175 | sunos4) gdb_target=sun3os4 ;; | |
176 | *) gdb_target=sun3 ;; | |
177 | esac | |
178 | ;; | |
179 | wrs) gdb_target=vxworks68 ;; | |
180 | isi) gdb_target=isi ;; | |
181 | sony) gdb_target=news ;; | |
182 | esac | |
183 | ;; | |
184 | ||
185 | m68000) | |
186 | case "${target_vendor}" in | |
187 | sun) | |
188 | case "${target_os}" in | |
189 | sunos3) gdb_target=sun2os3 ;; | |
190 | sunos4) gdb_target=sun2os4 ;; | |
191 | *) gdb_target=sun2 ;; | |
192 | esac | |
193 | esac | |
194 | ;; | |
195 | ||
196 | m68030) | |
197 | case "${target_vendor}" in | |
198 | sony) gdb_target=news1000 ;; | |
199 | esac | |
200 | ;; | |
201 | ||
8c7ae4a2 | 202 | none | arm | tahoe | vax | np1 | pn | np1 | pn | pyramid | merlin) |
6c815bbe | 203 | gdb_target=${target_cpu} ;; |
6c815bbe | 204 | |
8c7ae4a2 SC |
205 | m88k) |
206 | case "${target_vendor}" in | |
207 | motorola) gdb_target=delta88 ;; | |
208 | *) gdb_target=dgux ;; | |
209 | esac | |
210 | ;; | |
473f3318 JG |
211 | a29k) |
212 | case "${target_os}" in | |
f74ff50f | 213 | none|aout|coff) gdb_target=a29k ;; |
473f3318 JG |
214 | sym1) gdb_target=ultra3 ;; |
215 | kern) gdb_target=a29k-kern ;; | |
44e4e473 | 216 | ebmon) gdb_target=a29k;; |
473f3318 JG |
217 | esac |
218 | ;; | |
219 | ||
6c815bbe RP |
220 | mips) |
221 | case "${target_vendor}" in | |
222 | sony) gdb_target=bigmips ;; | |
5d2cfefe | 223 | dec) gdb_target=decstation ;; |
6c815bbe | 224 | little) gdb_target=littlemips ;; |
625453dc | 225 | sgi) gdb_target=irix3 ;; |
6c815bbe RP |
226 | esac |
227 | ;; | |
228 | ||
229 | c1 | c2) gdb_target=convex ;; | |
230 | ||
6c815bbe RP |
231 | sparc) |
232 | case "${target_vendor}" in | |
233 | sun) | |
234 | case "${target_os}" in | |
235 | sunos3) gdb_target=sun4os3 ;; | |
236 | sunos4) gdb_target=sun4os4 ;; | |
237 | *) gdb_target=sun4 ;; | |
238 | esac | |
239 | ;; | |
240 | esac | |
241 | ;; | |
242 | ||
ce7730d6 | 243 | h8300) |
8174b2af | 244 | gdb_target=h8300hms |
ce7730d6 | 245 | ;; |
6c815bbe | 246 | |
be9a2362 FF |
247 | i860) gdb_target=stratus |
248 | ;; | |
249 | ||
6c815bbe RP |
250 | i386) |
251 | case "${target_vendor}" in | |
69e87de2 RP |
252 | sco) gdb_target=i386sco ;; |
253 | sun) gdb_target=sun386 ;; | |
6c815bbe RP |
254 | sequent) gdb_target=symmetry ;; |
255 | *) | |
256 | case "${target_os}" in | |
6c815bbe | 257 | sysv32) gdb_target=i386v32 ;; |
92732c27 | 258 | scosysv3*) gdb_target=i386v32 ;; |
ee1ad69c FF |
259 | sysv4*) gdb_target=i386v4 ;; |
260 | sysv*) gdb_target=i386v ;; | |
6617b94e | 261 | mach) gdb_target=i386mach ;; |
2b61280a JG |
262 | coff) gdb_target=i386v ;; |
263 | aout) gdb_target=i386aout ;; | |
6c815bbe RP |
264 | esac |
265 | esac | |
266 | ;; | |
267 | ||
268 | i960) | |
269 | case "${target_vendor}" in | |
69e87de2 RP |
270 | bout | wrs) gdb_target=vxworks960 ;; |
271 | coff | intel) gdb_target=nindy960 ;; | |
6c815bbe RP |
272 | esac |
273 | ;; | |
274 | ||
275 | ns32k) | |
276 | case "${target_vendor}" in | |
277 | utek) gdb_target=umax ;; | |
278 | esac | |
279 | ;; | |
280 | ||
b90c4f33 JG |
281 | rs6000) |
282 | gdb_target=rs6000 | |
283 | ;; | |
284 | ||
6c815bbe RP |
285 | ### unhandled targets |
286 | # altosgas | |
287 | # i386v-g | |
288 | # i386v32-g | |
289 | ||
290 | esac | |
291 | ||
bc028766 | 292 | if [ ! -f ${srcdir}/config/mt-${gdb_target} ]; then |
6c815bbe | 293 | echo '***' "Gdb does not support target ${target}" 1>&2 |
912e0732 RP |
294 | exit 1 |
295 | fi | |
296 | ||
297 | if [ -z "${removing}" ] ; then | |
f7fde1e0 | 298 | cat ${srcdir}/config/mh-${gdb_host} ${srcdir}/config/mt-${gdb_target} | awk '$1 == "#msg" { |
912e0732 RP |
299 | print substr($0,6)}' |
300 | fi | |
301 | ||
bdf3621b | 302 | # We really shouldn't depend on there being a space after TM_FILE= ... |
bc028766 | 303 | targetfile=`awk '$1 == "TM_FILE=" { print $2 }' <${srcdir}/config/mt-${gdb_target}` |
912e0732 | 304 | |
3978d059 JG |
305 | host_makefile_frag=config/mh-${gdb_host} |
306 | target_makefile_frag=config/mt-${gdb_target} | |
912e0732 | 307 | |
bdf3621b | 308 | # If hostfile (XM_FILE) and/or targetfile (TM_FILE) is not set in the |
dc0c3f64 JG |
309 | # ?config/* file, we don't make the corresponding links. But we have |
310 | # to remove the xm.h files and tm.h files anyway, e.g. when switching | |
311 | # from "configure host" to "configure none". | |
bdf3621b JG |
312 | files= |
313 | links= | |
dc0c3f64 | 314 | rm -f xm.h |
bdf3621b JG |
315 | if [ "${hostfile}" != "" ]; then |
316 | files="${files} ${hostfile}" | |
317 | links="${links} xm.h" | |
318 | fi | |
dc0c3f64 | 319 | rm -f tm.h |
bdf3621b JG |
320 | if [ "${targetfile}" != "" ]; then |
321 | files="${files} ${targetfile}" | |
322 | links="${links} tm.h" | |
323 | fi | |
324 | ||
325 | # post-target: | |
912e0732 | 326 | |
bdf3621b JG |
327 | case ${srcdir} in |
328 | .) | |
329 | ;; | |
330 | *) | |
331 | grep -s "source ${srcdir}/.gdbinit" .gdbinit 2>/dev/null || \ | |
332 | echo "source ${srcdir}/.gdbinit" >> .gdbinit | |
333 | esac | |
334 | ||
dc0c3f64 | 335 | cat ${srcdir}/alldeps.mak ${srcdir}/depend >>Makefile |