1# Mapping of configurations into GDB host definitions.  This is
2# invoked from the autoconf generated configure script.
3
4# This file sets the following shell variables:
5#  gdb_host_cpu			generic name of host's CPU
6#  gdb_host			name of GDB host definition to use
7#  gdb_host_float_format	host's float floatformat, or 0
8#  gdb_host_double_format	host's double floatformat, or 0
9#  gdb_host_long_double_format	host's long double floatformat, or 0
10#  gdb_host_obs			host-specific .o files to include
11
12# Map host cpu into the config cpu subdirectory name.
13# The default is $host_cpu.
14
15case $host in
16 arm*-*-netbsdelf* | \
17 i[34567]86-*-netbsdelf* | \
18 m68*-*-netbsdelf* | \
19 sparc-*-netbsdelf* | \
20 vax-*-netbsdelf*)
21    ;;
22 *-*-irix* | \
23 *-*-solaris2.[01] | *-*-solaris2.[2-9]* | *-*-solaris2.10* | \
24 alpha*-*-osf* | \
25 alpha*-*-freebsd* | \
26 alpha*-*-kfreebsd*-gnu | \
27 arm*-*-netbsd* | \
28 hppa*-*-hiux* | \
29 i[34567]86-ncr-* | \
30 i[34567]86-*-dgux* | \
31 i[34567]86-*-lynxos* | \
32 i[34567]86-*-netbsd* | \
33 i[34567]86-*-openbsd[0-2].* | i[34567]86-*-openbsd3.[0-3] | \
34 i[34567]86-*-sco3.2v5* | \
35 i[34567]86-*-sco3.2v4* | \
36 i[34567]86-*-sco* | \
37 i[34567]86-*-sysv4.2* | \
38 i[34567]86-*-sysv4* | \
39 i[34567]86-*-sysv5* | \
40 i[34567]86-*-unixware2* | \
41 i[34567]86-*-unixware* | \
42 i[34567]86-*-sysv* | \
43 i[34567]86-*-isc* | \
44 m68*-*-netbsd* | \
45 sparc-*-netbsd* | \
46 rs6000-*-lynxos* | \
47 vax-*-bsd* | \
48 vax-*-netbsd* | \
49 vax-*-ultrix* | \
50 hppa*-*-hpux* | \
51 ia64-*-hpux* | \
52 null)
53    echo "*** Configuration $host is obsolete." >&2
54    echo "*** Support has been REMOVED." >&2
55    exit 1
56    ;;
57esac
58
59case "${host_cpu}" in
60
61aarch64*)		gdb_host_cpu=aarch64 ;;
62alpha*)			gdb_host_cpu=alpha ;;
63arm*)			gdb_host_cpu=arm ;;
64hppa*)			gdb_host_cpu=pa ;;
65i[34567]86*)		gdb_host_cpu=i386 ;;
66m68*)			gdb_host_cpu=m68k ;;
67mips*)			gdb_host_cpu=mips ;;
68powerpc* | rs6000)	gdb_host_cpu=powerpc ;;
69sparcv9 | sparc64)	gdb_host_cpu=sparc ;;
70s390*)			gdb_host_cpu=s390 ;;
71sh*)			gdb_host_cpu=sh ;;
72tilegx*)		gdb_host_cpu=tilegx ;;
73x86_64*)		gdb_host_cpu=i386 ;;
74m32r*)			gdb_host_cpu=m32r ;;
75xtensa*)		gdb_host_cpu=xtensa ;;
76*)			gdb_host_cpu=$host_cpu ;;
77
78esac
79
80# map host info into gdb names.
81
82case "${host}" in
83
84*-*-darwin*)		gdb_host=darwin ;;
85
86aarch64*-*-linux*)	gdb_host=linux ;;
87aarch64*-*-netbsd*)	gdb_host=nbsd ;;
88aarch64*-*-freebsd*)	gdb_host=fbsd ;;
89
90alpha*-*-linux*)	gdb_host=alpha-linux ;;
91alpha*-*-netbsd* | alpha*-*-knetbsd*-gnu)
92			gdb_host=nbsd ;;
93alpha*-*-openbsd*)	gdb_host=nbsd ;;
94
95arm*-*-freebsd*)	gdb_host=fbsd ;;
96arm*-*-linux*)		gdb_host=linux ;;
97arm*-*-netbsdelf* | arm*-*-knetbsd*-gnu)
98			gdb_host=nbsdelf ;;
99arm*-*-openbsd*)	gdb_host=nbsdelf ;;
100
101hppa*-*-linux*)		gdb_host=linux ;;
102hppa*-*-netbsd*)	gdb_host=nbsd ;;
103hppa*-*-openbsd*)	gdb_host=obsd ;;
104
105i[34567]86-*-freebsd* | i[34567]86-*-kfreebsd*-gnu)
106			gdb_host=fbsd ;;
107i[34567]86-*-netbsdelf* | i[34567]86-*-knetbsd*-gnu)
108			gdb_host=nbsdelf ;;
109i[34567]86-*-go32*)	gdb_host=go32 ;;
110i[34567]86-*-mingw32*)	gdb_host=mingw
111			gdb_host_obs=mingw-hdep.o
112			;;
113i[34567]86-*-msdosdjgpp*) gdb_host=go32 ;;
114i[34567]86-*-linux*)	gdb_host=linux ;;
115i[34567]86-*-gnu*)	gdb_host=i386gnu ;;
116i[3456]86-*-nto*) 	gdb_host=nto ;;
117i[34567]86-*-openbsd*)	gdb_host=obsd ;;
118i[34567]86-*-solaris2* | x86_64-*-solaris2*)
119			gdb_host=sol2 ;;
120i[34567]86-*-cygwin*)	gdb_host=cygwin ;;
121
122ia64-*-linux*)		gdb_host=linux ;;
123
124m68*-*-linux*)		gdb_host=linux ;;
125m68*-*-netbsdelf* | m68*-*-knetbsd*-gnu | m5407-*-netbsdelf*)
126			gdb_host=nbsdelf ;;
127m68*-*-openbsd*)	gdb_host=obsd ;;
128
129m88*-*-openbsd*)	gdb_host=obsd ;;
130
131mips*-*-linux*)		gdb_host=linux ;;
132mips*-*-netbsd* | mips*-*-knetbsd*-gnu)
133			gdb_host=nbsd ;;
134mips*-*-freebsd*)	gdb_host=fbsd ;;
135mips64*-*-openbsd*)	gdb_host=obsd64 ;;
136
137powerpc-*-aix* | rs6000-*-* | powerpc64-*-aix*)
138			gdb_host=aix ;;
139powerpc*-*-freebsd*)	gdb_host=fbsd ;;
140powerpc-*-netbsd* | powerpc-*-knetbsd*-gnu)
141			gdb_host=nbsd ;;
142powerpc64-*-netbsd* | powerpc64-*-knetbsd*-gnu)
143			gdb_host=ppc64-nbsd ;;
144powerpc-*-openbsd*)	gdb_host=obsd ;;
145
146powerpc64*-*-linux*)	gdb_host=ppc64-linux ;;
147powerpc*-*-linux*)	gdb_host=linux ;;
148
149riscv*-*-freebsd*)	gdb_host=fbsd ;;
150riscv*-*-netbsd*)	gdb_host=nbsd ;;
151riscv*-*-linux*)	gdb_host=linux ;;
152
153s390*-*-linux*)		gdb_host=linux ;;
154
155sh*-*-netbsdelf* | sh*-*-knetbsd*-gnu)
156			gdb_host=nbsd ;;
157sh*-*-openbsd*)		gdb_host=nbsd ;;
158
159sparc64-*-freebsd* | sparc64-*-kfreebsd*-gnu)
160			gdb_host=fbsd ;;
161sparc-*-linux*)		gdb_host=linux ;;
162sparc64-*-linux*)	gdb_host=linux64 ;;
163sparc-*-netbsdelf* | sparc-*-knetbsd*-gnu)
164			gdb_host=nbsdelf ;;
165sparc64-*-netbsd* | sparc64-*-knetbsd*-gnu)
166			gdb_host=nbsd64 ;;
167sparc-*-openbsd*)	gdb_host=nbsdelf ;;
168sparc64-*-openbsd*)	gdb_host=obsd64 ;;
169sparc-*-solaris2* | sparcv9-*-solaris2* | sparc64-*-solaris2*)
170			gdb_host=sol2
171			;;
172
173tilegx-*-linux*)	gdb_host=linux ;;
174
175vax-*-netbsdelf* | vax-*-knetbsd*-gnu)
176			gdb_host=nbsdelf ;;
177vax-*-openbsd*)		gdb_host=obsd ;;
178
179x86_64-*-linux*)	gdb_host=linux64 ;;
180x86_64-*-freebsd* | x86_64-*-kfreebsd*-gnu)
181			gdb_host=fbsd64 ;;
182x86_64-*-netbsd* | x86_64-*-knetbsd*-gnu)
183			gdb_host=nbsd64 ;;
184x86_64-*-openbsd*)	gdb_host=obsd64 ;;
185x86_64-*-mingw*)        gdb_host=mingw64
186			gdb_host_obs=mingw-hdep.o
187			;;
188x86_64-*-cygwin*)	gdb_host=cygwin64 ;;
189m32r*-*-linux*)          gdb_host=linux ;;
190
191xtensa*-*-linux*)	gdb_host=linux ;;
192
193esac
194
195
196
197# Map the host/cpu onto the floatformat correspondong to C's "float",
198# "double" and "long double" types.
199
200case "${host}" in
201i[34567]86-*-*|x86_64-*-*)
202	gdb_host_float_format="&floatformat_ieee_single_little"
203	gdb_host_double_format="&floatformat_ieee_double_little"
204	gdb_host_long_double_format="&floatformat_i387_ext"
205	;;
206hppa*-*-linux*)
207	gdb_host_float_format="&floatformat_ieee_single_big"
208	gdb_host_double_format="&floatformat_ieee_double_big"
209	gdb_host_long_double_format="&floatformat_ieee_double_big"
210	;;
211m68*-*-*)
212	gdb_host_float_format="&floatformat_ieee_single_big"
213	gdb_host_double_format="&floatformat_ieee_double_big"
214	gdb_host_long_double_format="&floatformat_m68881_ext"
215	;;
216*)
217	gdb_host_float_format=0
218	gdb_host_double_format=0
219	gdb_host_long_double_format=0
220	;;
221esac
222