ddf2445c831c6cd3fac5bf30683cc365390abc32
[external/binutils.git] / ld / configure.tgt
1 # This is the linker target specific file.  This is invoked by the
2 # autoconf generated configure script.  Putting it in a separate shell
3 # file lets us skip running autoconf when modifying target specific
4 # information.
5
6 # This file switches on the shell variable ${targ}, and sets the
7 # following shell variables:
8 #  targ_emul            name of linker emulation to use
9 #  targ_extra_emuls     additional linker emulations to provide
10 #  targ_extra_libpath   additional linker emulations using LIB_PATH
11 #  targ_extra_ofiles    additional objects needed by the emulation
12
13 targ_extra_emuls=
14 targ_extra_ofiles=
15
16 case "${targ}" in
17 arm-epoc-pe)            targ_emul=arm_epoc_pe ;
18                         targ_extra_ofiles="deffilep.o pe-dll.o" ;;
19 arm-*-pe)               targ_emul=armpe ;
20                         targ_extra_ofiles="deffilep.o pe-dll.o" ;;
21 arc-*-elf*)             targ_emul=arcelf ;;
22 d10v-*-*)               targ_emul=d10velf ;;
23 d30v-*-*ext*)           targ_emul=d30v_e; targ_extra_emuls="d30velf d30v_o" ;;
24 d30v-*-*onchip*)        targ_emul=d30v_o; targ_extra_emuls="d30velf d30v_e" ;;
25 d30v-*-*)               targ_emul=d30velf; targ_extra_emuls="d30v_e d30v_o" ;;
26 sparc64-*-aout*)        targ_emul=sparcaout ;;
27 sparc64-*-elf*)         targ_emul=elf64_sparc ;;
28 sparc-sun-sunos4*)      targ_emul=sun4 ;;
29 sparclite*-*-elf)       targ_emul=elf32_sparc ;;
30 sparclite*-*-coff)      targ_emul=coff_sparc ;;
31 sparclite*-fujitsu-*)   targ_emul=sparcaout ;;
32 sparc*-*-aout)          targ_emul=sparcaout ;;
33 sparc*-*-coff)          targ_emul=coff_sparc ;;
34 sparc*-*-elf)           targ_emul=elf32_sparc ;;
35 sparc*-*-sysv4*)        targ_emul=elf32_sparc ;;
36 sparc*-*-linux*aout*)   targ_emul=sparclinux
37                         targ_extra_emuls="elf32_sparc sun4"
38                         tdir_elf32_sparc=`echo ${targ_alias} | sed -e 's/aout//'`
39                         tdir_sun4=sparc-sun-sunos4
40                         ;;
41 sparc64-*-linux-gnu*)   targ_emul=elf64_sparc
42                         targ_extra_emuls="elf32_sparc sparclinux sun4"
43                         tdir_elf32_sparc=`echo ${targ_alias} | sed -e 's/64//'`
44                         tdir_sparclinux=${tdir_elf32_sparc}aout
45                         tdir_sun4=sparc-sun-sunos4
46                         ;;
47 sparc*-*-linux-gnu*)    targ_emul=elf32_sparc
48                         targ_extra_emuls="sparclinux sun4"
49                         tdir_sparclinux=${targ_alias}aout
50                         tdir_sun4=sparc-sun-sunos4
51                         ;;
52 sparc*-*-lynxos*)       targ_emul=sparclynx ;;
53 sparc*-*-netbsd*)       targ_emul=sparcnbsd ;;
54 sparc*-*-solaris2*)     targ_emul=elf32_sparc ;;
55 sparc*-wrs-vxworks*)    targ_emul=sparcaout ;;
56 sparc*-*-rtems*)        targ_emul=sparcaout ;;
57 i960-wrs-vxworks5.0*)   targ_emul=gld960 ;;
58 i960-wrs-vxworks5*)     targ_emul=gld960coff ;;
59 i960-wrs-vxworks*)      targ_emul=gld960 ;;
60 i960-*-coff)            targ_emul=gld960coff ;;
61 i960-intel-nindy)       targ_emul=gld960 ;;
62 i960-*-rtems*)          targ_emul=gld960coff ;;
63 i960-*-elf*)            targ_emul=elf32_i960 ;;
64 m32r-*-*)               targ_emul=m32relf ;;
65 m68*-sun-sunos[34]*)    targ_emul=sun3 ;;
66 m68*-wrs-vxworks*)      targ_emul=sun3 ;;
67 m68*-ericsson-ose)      targ_emul=sun3 ;;
68 m68*-apple-aux*)        targ_emul=m68kaux ;;
69 *-tandem-none)          targ_emul=st2000 ;;
70 i[3456]86-*-vsta)       targ_emul=vsta ;;
71 i[3456]86-go32-rtems*)  targ_emul=i386go32 ;;
72 i[3456]86-*-go32)       targ_emul=i386go32 ;;
73 i[3456]86-*-msdosdjgpp*) targ_emul=i386go32 ;;
74 i[3456]86-*-aix*)       targ_emul=i386coff ;;
75 i[3456]86-*-sco*)       targ_emul=i386coff ;;
76 i[3456]86-*-isc*)       targ_emul=i386coff ;;
77 i[3456]86-*-lynxos*)    targ_emul=i386lynx ;;
78 i[3456]86-*-coff)       targ_emul=i386coff ;;
79 i[3456]86-*-rtemself*)  targ_emul=elf_i386 ;;
80 i[3456]86-*-rtems*)     targ_emul=i386coff ;;
81 i[3456]86-*-bsd)        targ_emul=i386bsd ;;
82 i[3456]86-*-bsd386)     targ_emul=i386bsd ;;
83 i[3456]86-*-bsdi*)      targ_emul=i386bsd ;;
84 i[3456]86-*-aout)       targ_emul=i386aout ;;
85 i[3456]86-*-linux*aout*)        targ_emul=i386linux
86                         targ_extra_emuls=elf_i386
87                         tdir_elf_i386=`echo ${targ_alias} | sed -e 's/aout//'`
88                         ;;
89 i[3456]86-*-linuxoldld) targ_emul=i386linux; targ_extra_emuls=elf_i386 ;;
90 i[3456]86-*-linux-gnu*) targ_emul=elf_i386
91                         targ_extra_emuls=i386linux
92                         tdir_i386linux=${targ_alias}aout
93                         ;;
94 i[3456]86-*-sysv4*)     targ_emul=elf_i386 ;;
95 i[3456]86-*-solaris2*)  targ_emul=elf_i386 ;;
96 i[3456]86-*-unixware)   targ_emul=elf_i386 ;;
97 i[3456]86-*-solaris*)   targ_emul=elf_i386 ;;
98 i[3456]86-*-netbsd*)    targ_emul=i386nbsd ;;
99 i[3456]86-*-netware)    targ_emul=i386nw ;;
100 i[3456]86-*-elf*)       targ_emul=elf_i386 ;;
101 i[3456]86-*-freebsdaout* | i[3456]86-*-freebsd[12].* | i[3456]86-*-freebsd[12])
102                         targ_emul=i386bsd ;;
103 i[3456]86-*-freebsd*)   targ_emul=elf_i386 ;;
104 i[3456]86-*-sysv*)      targ_emul=i386coff ;;
105 i[3456]86-*-ptx*)       targ_emul=i386coff ;;
106 i[3456]86-*-mach*)      targ_emul=i386mach ;;
107 i[3456]86-*-gnu*)       targ_emul=elf_i386 ;;
108 i[3456]86-*-msdos*)     targ_emul=i386msdos; targ_extra_emuls=i386aout ;;
109 i[3456]86-*-moss*)      targ_emul=i386moss; targ_extra_emuls=i386msdos ;;
110 i[3456]86-*-winnt*)     targ_emul=i386pe ;
111                         targ_extra_ofiles="deffilep.o pe-dll.o" ;;
112 i[3456]86-*-pe)         targ_emul=i386pe ;
113                         targ_extra_ofiles="deffilep.o pe-dll.o" ;;
114 i[3456]86-*-cygwin*)    targ_emul=i386pe ;
115                         targ_extra_ofiles="deffilep.o pe-dll.o" ;;
116 i[3456]86-*-mingw32*)   targ_emul=i386pe ;
117                         targ_extra_ofiles="deffilep.o pe-dll.o" ;;
118 i[3456]86-*-interix*)   targ_emul=i386pe_posix;
119                         targ_extra_ofiles="deffilep.o pe-dll.o" ;;
120 i[3456]86-*-beospe*)    targ_emul=i386beos ;;
121 i[3456]86-*-beos*)      targ_emul=elf_i386_be ;;
122 i[3456]86-*-vxworks*)   targ_emul=i386aout ;;
123 m8*-*-*)                targ_emul=m88kbcs ;;
124 a29k-*-udi)             targ_emul=sa29200 ;;
125 a29k-*-ebmon)           targ_emul=ebmon29k ;;
126 a29k-*-*)               targ_emul=a29k ;;
127 #  arm-*-riscix*)               targ_emul=riscix ;;
128 arm-*-aout | armel-*-aout) targ_emul=armaoutl ;;
129 armeb-*-aout)           targ_emul=armaoutb ;;
130 arm-*-coff)             targ_emul=armcoff ;;
131 arm-*-elf)              targ_emul=armelf ;;
132 arm-*-oabi)             targ_emul=armelf_oabi ;;
133 arm*-*-linux-gnu*)      targ_emul=armelf_linux; targ_extra_emuls="armelf_linux26 armelf" ;;
134 arm*-*-uclinux*)        targ_emul=armelf_linux; targ_extra_emuls=armelf ;;
135 thumb-*-linux-gnu* | thumb-*-uclinux*)  targ_emul=armelf_linux; targ_extra_emuls=armelf ;;
136 strongarm-*-coff)       targ_emul=armcoff ;;
137 strongarm-*-elf)        targ_emul=armelf ;;
138 thumb-*-coff)           targ_emul=armcoff ;;
139 thumb-*-elf)            targ_emul=armelf ;;
140 thumb-*-oabi)           targ_emul=armelf_oabi ;;
141 thumb-epoc-pe)          targ_emul=arm_epoc_pe ;
142                         targ_extra_ofiles="deffilep.o pe-dll.o" ;;
143 thumb-*-pe)             targ_emul=armpe ;
144                         targ_extra_ofiles="deffilep.o pe-dll.o" ;;
145 h8300-*-hms* | h8300-*-coff*)
146                         targ_emul=h8300; targ_extra_emuls="h8300h h8300s"
147                         ;;
148 h8500-*-hms* | h8500-*-coff*)
149                         targ_emul=h8500
150                         targ_extra_emuls="h8500s h8500b h8500m h8500c"
151                         ;;
152 sh-*-elf* | sh-*-rtemself*)
153                         targ_emul=shelf
154                         targ_extra_emuls="shlelf sh shl"
155                         ;;
156 sh-*-*|sh-*-rtems*)     targ_emul=sh; targ_extra_emuls=shl ;;
157 m68k-sony-*)            targ_emul=news ;;
158 m68k-hp-bsd*)           targ_emul=hp300bsd ;;
159 m68*-motorola-sysv*)    targ_emul=delta68 ;;
160 m68*-*-aout)            targ_emul=m68kaout ;;
161 m68*-*-coff)            targ_emul=m68kcoff ;;
162 m68*-*-elf)             targ_emul=m68kelf ;;
163 m68*-*-hpux*)           targ_emul=hp3hpux ;;
164 m68k-*-linux*aout*)     targ_emul=m68klinux
165                         targ_extra_emuls=m68kelf
166                         tdir_m68kelf=`echo ${targ_alias} | sed -e 's/aout//'`
167                         ;;
168 m68k-*-linux-gnu*)      targ_emul=m68kelf
169                         targ_extra_emuls=m68klinux
170                         tdir_m68klinux=`echo ${targ_alias} | sed -e 's/linux/linuxaout/'`
171                         ;;
172 m68*-*-gnu*)            targ_emul=m68kelf ;;
173 m68*-*-lynxos*)         targ_emul=m68klynx ;;
174 m68*-hp*-netbsd*)       targ_emul=m68k4knbsd ;;
175 m68*-*-netbsd*)         targ_emul=m68knbsd ;;
176 m68*-*-psos*)           targ_emul=m68kpsos ;;
177 m68*-*-rtems*)          targ_emul=m68kcoff ;;
178 hppa*-*-*elf*)          targ_emul=hppaelf ;;
179 hppa*-*-linux-gnu*)     targ_emul=hppaelf ;;
180 hppa*-*-lites*)         targ_emul=hppaelf ;;
181 hppa*-*-rtems*)         targ_emul=hppaelf ;;
182 vax-dec-ultrix* | vax-dec-bsd*) targ_emul=vax ;;
183 mips*-dec-ultrix*)      targ_emul=mipslit ;;
184 mips*-dec-osf*)         targ_emul=mipslit ;;
185 mips*-sgi-irix5*)       targ_emul=elf32bsmip ;;
186 mips*-sgi-irix6*)       targ_emul=elf32bmipn32
187                         targ_extra_emuls="elf32bsmip elf64bmip"
188                         ;;
189 mips*-sgi-irix*)        targ_emul=mipsbig ;;
190 mips*el-*-ecoff*)       targ_emul=mipsidtl ;;
191 mips*-*-ecoff*)         targ_emul=mipsidt ;;
192 mips*-dec-bsd*)         targ_emul=mipsbsd ;;
193 mips*-dec-netbsd*)      targ_emul=elf32lmip ;;
194 mips*-*-bsd*)           targ_emul=mipsbig ;;
195 mips*vr4300el-*-elf*)   targ_emul=elf32l4300 ;;
196 mips*vr4300-*-elf*)     targ_emul=elf32b4300 ;;
197 mips*vr4100el-*-elf*)   targ_emul=elf32l4300 ;;
198 mips*vr4100-*-elf*)     targ_emul=elf32b4300 ;;
199 mips*vr5000el-*-elf*)   targ_emul=elf32l4300 ;;
200 mips*vr5000-*-elf*)     targ_emul=elf32b4300 ;;
201 mips*el-*-elf*)         targ_emul=elf32elmip ;;
202 mips*-*-elf*)           targ_emul=elf32ebmip ;;
203 mips*el-*-rtems*)       targ_emul=elf32elmip ;;
204 mips*-*-rtems*)         targ_emul=elf32ebmip ;;
205 mips*el-*-vxworks*)     targ_emul=elf32elmip ;;
206 mips*-*-vxworks*)       targ_emul=elf32ebmip ;;
207 mips*el-*-linux-gnu*)   targ_emul=elf32lsmip
208                         targ_extra_emuls="elf32bsmip mipslit mipsbig"
209                         ;;
210 mips*-*-linux-gnu*)     targ_emul=elf32bsmip
211                         targ_extra_emuls="elf32lsmip mipsbig mipslit"
212                         ;;
213 mips*-*-lnews*)         targ_emul=mipslnews ;;
214 mn10200-*-*)            targ_emul=mn10200 ;;
215 mn10300-*-*)            targ_emul=mn10300 ;;
216 alpha*-*-linuxecoff*)   targ_emul=alpha targ_extra_emuls=elf64alpha
217                         tdir_elf64alpha=`echo ${targ_alias} | sed -e 's/ecoff//'`
218                         ;;
219 alpha*-*-linux-gnu*)    targ_emul=elf64alpha targ_extra_emuls=alpha
220                         tdir_alpha=`echo ${targ_alias} | sed -e 's/linux/linuxecoff/'`
221                         ;;
222 alpha*-*-osf*)          targ_emul=alpha ;;
223 alpha*-*-gnu*)          targ_emul=elf64alpha ;;
224 alpha*-*-netware*)      targ_emul=alpha ;;
225 alpha*-*-netbsd*)       targ_emul=elf64alpha ;;
226 z8k-*-coff)             targ_emul=z8002; targ_extra_emuls=z8001 ;;
227 ns32k-pc532-mach* | ns32k-pc532-ux*)    targ_emul=pc532macha ;;
228 ns32k-pc532-netbsd* | ns32k-pc532-lites*) targ_emul=ns32knbsd ;;
229 powerpc-*-linux-gnu*)   targ_emul=elf32ppclinux; targ_extra_emuls=elf32ppc;
230                         targ_extra_libpath=elf32ppc ;;
231 powerpc-*-elf* | powerpc-*-eabi* | powerpc-*-sysv* \
232   | powerpc-*-netbsd* | powerpc-*-vxworks*)
233         targ_emul=elf32ppc ;;
234 powerpcle-*-elf* | powerpcle-*-eabi* | powerpcle-*-solaris* \
235   | powerpcle-*-sysv* | powerpcle-*-vxworks*)
236         targ_emul=elf32lppc ;;
237 powerpcle-*-rtems*)     targ_emul=elf32leppc ;;
238 powerpc-*-rtems*)       targ_emul=elf32ppc ;;
239 powerpc-*-macos*)       targ_emul=ppcmacos ;;
240 powerpc-*-netware*)     targ_emul=ppcnw ;;
241 powerpcle-*-pe)         targ_emul=ppcpe ;;
242 powerpcle-*-winnt*)     targ_emul=ppcpe ;;
243 powerpcle-*-cygwin*)   targ_emul=ppcpe ;;
244 powerpc-*-aix*)         targ_emul=aixppc ;;
245 powerpc-*-beos*)        targ_emul=aixppc ;;
246 rs6000-*-aix*)          targ_emul=aixrs6 ;;
247 tic30-*-*aout*)         targ_emul=tic30aout ;;
248 tic30-*-*coff*)         targ_emul=tic30coff ;;
249 tic80-*-*)              targ_emul=tic80coff ;;
250 v850-*-*)               targ_emul=v850 ;;
251 v850e-*-*)              targ_emul=v850 ;;
252 v850ea-*-*)             targ_emul=v850 ;;
253 w65-*-*)                targ_emul=w65 ;;
254 fr30-*-*)               targ_emul=elf32fr30 ;;
255 mcore-*-pe)             targ_emul=mcorepe ;
256                         targ_extra_ofiles="deffilep.o pe-dll.o" ;;
257 mcore-*-elf)            targ_emul=elf32mcore ;;
258 *-*-aout)               targ_emul=${target_cpu}-${target_vendor} ;;
259 *-*-coff)               targ_emul=${target_cpu}-${target_vendor} ;;
260 *-*-netware)            targ_emul=${target_cpu}-nw ;;
261 *-*-ieee*)              targ_emul=vanilla ;;
262
263 *)
264   echo 2>&1 "*** ld does not support target ${targ}"
265   echo 2>&1 "*** see ld/configure.tgt for supported targets"
266   exit 1
267
268 esac