2004-07-28 Andrew Cagney <cagney@gnu.org>
[platform/upstream/binutils.git] / gdb / configure.tgt
1 # Mappings from configurations to GDB target definitions.  This is
2 # invoked from the autoconf generated configure script.
3
4 # This file sets the following shell variables:
5 #  gdb_target_cpu       generic name of CPU
6 #  gdb_target           name of GDB target definition to use
7
8 # This file may also modify configdirs.
9
10 # Map target cpu into the config cpu subdirectory name.
11 # The default is $target_cpu.
12
13 case "${target_cpu}" in
14
15 alpha*)                 gdb_target_cpu=alpha ;;
16 arm*)                   gdb_target_cpu=arm ;;
17 avr*)                   gdb_target_cpu=avr ;;
18 hppa*)                  gdb_target_cpu=pa ;;
19 i[34567]86*)            gdb_target_cpu=i386 ;;
20 m68hc11*|m6811*)        gdb_target_cpu=m68hc11 ;;
21 m68*)                   gdb_target_cpu=m68k ;;
22 m88*)                   gdb_target_cpu=m88k ;;
23 mips*)                  gdb_target_cpu=mips ;;
24 powerpc*)               gdb_target_cpu=powerpc ;;
25 sparc*)                 gdb_target_cpu=sparc ;;
26 thumb*)                 gdb_target_cpu=arm ;;
27 s390*)                  gdb_target_cpu=s390 ;;
28 sh*)                    gdb_target_cpu=sh ;;
29 strongarm*)             gdb_target_cpu=arm ;;
30 xscale*)                gdb_target_cpu=arm ;;
31 v850*)                  gdb_target_cpu=v850 ;;
32 x86_64*)                gdb_target_cpu=i386 ;;
33 *)                      gdb_target_cpu=$target_cpu ;;
34
35 esac
36
37 # map target info into gdb names.
38
39 case "${target}" in
40
41 x86_64-*-freebsd*)      gdb_target=fbsd64 ;;
42 *-*-freebsd*)           gdb_target=fbsd ;;
43
44 alpha*-*-osf*)          gdb_target=alpha-osf1 ;;
45 alpha*-*-linux*)        gdb_target=alpha-linux ;;
46 alpha*-*-netbsd*)       gdb_target=nbsd ;;
47 alpha*-*-openbsd*)      gdb_target=nbsd ;;
48 alpha*-*-*)             gdb_target=alpha ;;
49
50 arm*-wince-pe)          gdb_target=wince ;;
51 arm*-*-linux*)          gdb_target=linux
52                         build_gdbserver=yes
53                         ;;
54 arm*-*-netbsd*)         gdb_target=nbsd ;;
55 arm-*-nto*)             gdb_target=nto ;;
56 arm*-*-* | thumb*-*-* | strongarm*-*-*)
57                         gdb_target=embed
58                         configdirs="$configdirs rdi-share"
59                         ;;
60 xscale-*-*)             gdb_target=embed
61                         configdirs="$configdirs rdi-share"
62                         ;;
63
64 avr-*-*)                gdb_target=avr ;;
65
66 cris*)                  gdb_target=cris ;;
67
68 d10v-*-*)               gdb_target=d10v ;;
69
70 h8300-*-*)              gdb_target=h8300 ;;
71
72
73 frv-*-*)                gdb_target=frv ;;
74
75 hppa*64*-*-hpux11*)     gdb_target=hppa64 ;;
76 hppa*-*-hpux*)          gdb_target=hppahpux ;;
77 hppa*-*-hiux*)          gdb_target=hppahpux ;;
78 hppa*-*-linux*)         gdb_target=linux ;;
79 hppa*-*-openbsd*)       gdb_target=obsd ;;
80 hppa*-*-*)              gdb_target=hppa ;;
81
82 i[34567]86-ncr-*)       gdb_target=ncr3000 ;;
83 i[34567]86-*-netbsd* | i[34567]86-*-knetbsd*-gnu)
84                         gdb_target=nbsd ;;
85 i[34567]86-*-openbsd*)  gdb_target=obsd ;;
86 i[34567]86-*-nto*)      gdb_target=nto ;;
87 i[34567]86-*-lynxos*)   gdb_target=i386lynx ;;
88 i[34567]86-*-solaris*)  gdb_target=i386sol2 ;;
89 i[34567]86-*-linux*)    gdb_target=linux
90                         build_gdbserver=yes
91                         ;;
92 i[34567]86-*-gnu*)      gdb_target=i386gnu ;;
93 i[34567]86-*-netware*)  gdb_target=i386
94                         configdirs="${configdirs} nlm" ;;
95 i[34567]86-*-cygwin*)   gdb_target=cygwin  ;;
96 i[34567]86-*-vxworks*)  gdb_target=vxworks ;;
97 i[34567]86-*-*)         gdb_target=i386 ;;
98
99 ia64-*-aix*)            gdb_target=aix ;;
100 ia64-*-linux*)          gdb_target=linux
101                         build_gdbserver=yes
102                         ;;
103 ia64*-*-*)              gdb_target=ia64 ;;
104
105 m32r-*-*)               gdb_target=m32r ;;
106
107 m68hc11*-*-*|m6811*-*-*)        gdb_target=m68hc11 ;;
108
109 m68*-cisco*-*)          gdb_target=cisco ;;
110 m68*-netx-*)            gdb_target=vxworks68 ;;
111 m68*-tandem-*)          gdb_target=st2000 ;;
112 m68*-*-aout*)           gdb_target=monitor ;;
113 m68*-*-coff*)           gdb_target=monitor ;;
114 m68*-*-elf*)            gdb_target=monitor ;;
115 m68*-*-linux*)          gdb_target=linux
116                         build_gdbserver=yes
117                         ;;
118 m68*-*-netbsd*)         gdb_target=nbsd ;;
119 m68*-*-openbsd*)        gdb_target=obsd ;;
120 m68*-*-os68k*)          gdb_target=os68k ;;
121 m68*-*-uclinux*)        gdb_target=monitor ;;
122 m68*-*-vxworks*)        gdb_target=vxworks68 ;;
123
124 m88*-*-openbsd*)        gdb_target=obsd ;;
125
126 mcore*-*-*)             gdb_target=mcore ;;
127
128 mips*-*-pe)             gdb_target=wince ;;
129 mips*-sgi-irix5*)       gdb_target=irix5 ;;
130 mips*-sgi-irix6*)       gdb_target=irix6 ;;
131 mips*-*-linux*)         gdb_target=linux
132                         build_gdbserver=yes
133                         ;;
134 mips*-*-netbsd*)        gdb_target=nbsd ;;
135 mips*-*-vxworks*)       gdb_target=vxmips ;;
136 mips*-*-*)              gdb_target=embed ;;
137
138 mn10300-*-*)            gdb_target=mn10300 ;;
139
140 ns32k-*-netbsd*)        gdb_target=nbsdaout ;;
141
142 powerpc-*-netbsd*)      gdb_target=nbsd ;;
143 powerpc-*-openbsd*)     gdb_target=obsd ;;
144 powerpc-*-aix*)         gdb_target=aix ;;
145 powerpc-*-linux*)       gdb_target=linux
146                         build_gdbserver=yes
147                         ;;
148 powerpc64-*-linux*)     gdb_target=linux ;;
149 powerpc-*-vxworks*)     gdb_target=vxworks ;;
150 powerpc*-*-*)           if test -f ../sim/ppc/Makefile; then
151                           gdb_target=ppc-sim
152                         else
153                           gdb_target=ppc-eabi
154                         fi ;;
155
156 rs6000-*-lynxos*)       gdb_target=rs6000lynx ;;
157 rs6000-*-aix4*)         gdb_target=aix4 ;;
158 rs6000-*-*)             gdb_target=rs6000 ;;
159
160 s390*-*-*)              gdb_target=s390
161                         build_gdbserver=yes
162                         ;;
163
164 sh*-*-pe)               gdb_target=wince ;;
165 sh-*-coff*)             gdb_target=embed ;;
166 sh-*-elf*)              gdb_target=embed ;;
167 # FIXME should that be sh*-*-linux*, perhaps?
168 sh-*-linux*)            gdb_target=linux
169                         build_gdbserver=yes
170                         ;;
171 sh*-*-netbsdelf*)       gdb_target=nbsd ;;
172 sh-*-nto*)              gdb_target=nto ;;
173 sh*)                    gdb_target=embed ;;
174
175 sparc-*-linux*)         gdb_target=linux ;;
176 sparc64-*-linux*)       gdb_target=linux64 ;;
177 sparc-*-netbsd*)        gdb_target=nbsd ;;
178 sparc64-*-netbsd*)      gdb_target=nbsd64 ;;
179 sparc-*-openbsd*)       gdb_target=obsd ;;
180 sparc64-*-openbsd*)     gdb_target=obsd64
181                         gdb_osabi=GDB_OSABI_OPENBSD_ELF
182                         ;;
183 sparc-*-solaris2.[0-6] | sparc-*-solaris2.[0-6].*)
184                         gdb_target=sol2
185                         ;;
186 sparc-*-solaris2* | sparcv9-*-solaris2* | sparc64-*-solaris2*)
187                         gdb_target=sol2-64
188                         ;;
189 sparc-*-vxworks*)       gdb_target=vxworks ;;
190 sparc-*-*)              gdb_target=sparc ;;
191 sparc64-*-*)            gdb_target=sparc64 ;;
192
193 xstormy16-*-*)          gdb_target=xstormy16 ;;
194
195 vax-*-netbsd*)          gdb_target=nbsd ;;
196 vax-*-openbsd*)         gdb_target=nbsd ;;
197 vax-*-*)                gdb_target=vax ;;
198
199 v850*-*-*)              gdb_target=v850
200                         case ${gdb_host} in
201                         cygwin*)
202                                 CONFIG_OBS="${CONFIG_OBS} v850ice.o" ;;
203                         * ) ;;
204                         esac
205                         ;;
206
207 x86_64-*-linux*)        gdb_target=linux64
208                         build_gdbserver=yes
209                         ;;
210 x86_64-*-netbsd*)       gdb_target=nbsd64 ;;
211 x86_64-*-openbsd*)      gdb_target=obsd64 ;;
212
213 esac
214
215 # map target onto default OS ABI
216
217 case "${target}" in
218 *-*-linux*)     gdb_osabi=GDB_OSABI_LINUX ;;
219 *-*-gnu*)       gdb_osabi=GDB_OSABI_HURD ;;
220 *-*-nto*)       gdb_osabi=GDB_OSABI_QNXNTO ;;
221 *-*-solaris*)   gdb_osabi=GDB_OSABI_SOLARIS ;;
222 esac