configure.tgt 34 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880
  1. # configure.tgt
  2. #
  3. # Copyright (C) 2013-2015 Free Software Foundation, Inc.
  4. #
  5. # This file is free software; you can redistribute it and/or modify
  6. # it under the terms of the GNU General Public License as published by
  7. # the Free Software Foundation; either version 3 of the License, or
  8. # (at your option) any later version.
  9. #
  10. # This program is distributed in the hope that it will be useful,
  11. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  13. # GNU General Public License for more details.
  14. #
  15. # You should have received a copy of the GNU General Public License
  16. # along with this program; see the file COPYING3. If not see
  17. # <http://www.gnu.org/licenses/>.
  18. # This is the linker target specific file. This is invoked by the
  19. # autoconf generated configure script. Putting it in a separate shell
  20. # file lets us skip running autoconf when modifying target specific
  21. # information.
  22. # This file switches on the shell variable ${targ}, and sets the
  23. # following shell variables:
  24. # targ_emul name of linker emulation to use
  25. # targ_extra_emuls additional linker emulations to provide
  26. # targ_extra_libpath additional linker emulations using LIB_PATH
  27. # targ_extra_ofiles additional host-compiled objects needed by the emulation
  28. # targ64_extra_emuls additional linker emulations to provide if
  29. # --enable-64-bit-bfd is given or if host is 64 bit.
  30. # targ64_extra_libpath additional linker emulations using LIB_PATH if
  31. # --enable-64-bit-bfd is given or if host is 64 bit.
  32. # NATIVE_LIB_DIRS library directories to search on this host
  33. # (if we are a native or sysrooted linker)
  34. targ_extra_emuls=
  35. targ_extra_libpath=
  36. targ_extra_ofiles=
  37. targ64_extra_emuls=
  38. targ64_extra_libpath=
  39. # Please try to keep this table in alphabetic order - it makes it
  40. # much easier to lookup a specific archictecture. Naturally any
  41. # architecture variants should be kept together even if their names
  42. # break the alpha sorting.
  43. case "${targ}" in
  44. aarch64_be-*-elf) targ_emul=aarch64elfb
  45. targ_extra_emuls="aarch64elf aarch64elf32 aarch64elf32b armelfb armelf" ;;
  46. aarch64-*-elf) targ_emul=aarch64elf
  47. targ_extra_emuls="aarch64elf32 aarch64elf32b aarch64elfb armelf armelfb" ;;
  48. aarch64-*-freebsd*) targ_emul=aarch64fbsd
  49. targ_extra_emuls="aarch64fbsdb aarch64elf" ;;
  50. aarch64_be-*-linux*) targ_emul=aarch64linuxb
  51. targ_extra_libpath="aarch64linux aarch64linux32 aarch64linux32b armelfb_linux_eabi armelf_linux_eabi"
  52. targ_extra_emuls="aarch64elfb aarch64elf aarch64elf32 aarch64elf32b armelfb armelf $targ_extra_libpath" ;;
  53. aarch64-*-linux*) targ_emul=aarch64linux
  54. targ_extra_libpath="aarch64linuxb aarch64linux32 aarch64linux32b armelfb_linux_eabi armelf_linux_eabi"
  55. targ_extra_emuls="aarch64elf aarch64elf32 aarch64elf32b aarch64elfb armelf armelfb $targ_extra_libpath" ;;
  56. alpha*-*-freebsd* | alpha*-*-kfreebsd*-gnu)
  57. targ_emul=elf64alpha_fbsd
  58. targ_extra_emuls="elf64alpha alpha"
  59. tdir_alpha=`echo ${targ_alias} | sed -e 's/freebsd/freebsdecoff/'` ;;
  60. alpha*-*-linux*ecoff*) targ_emul=alpha targ_extra_emuls=elf64alpha
  61. tdir_elf64alpha=`echo ${targ_alias} | sed -e 's/ecoff//'` ;;
  62. alpha*-*-linux-*) targ_emul=elf64alpha targ_extra_emuls=alpha
  63. tdir_alpha=`echo ${targ_alias} | sed -e 's/linux\(-gnu\)*/linux\1ecoff/'` ;;
  64. alpha*-*-osf*) targ_emul=alpha ;;
  65. alpha*-*-gnu*) targ_emul=elf64alpha ;;
  66. alpha*-*-netware*) targ_emul=alpha ;;
  67. alpha*-*-netbsd*) targ_emul=elf64alpha_nbsd ;;
  68. alpha*-*-openbsd*) targ_emul=elf64alpha ;;
  69. alpha*-*-*vms*) targ_emul=alphavms
  70. ;;
  71. arc*-*-elf*) targ_emul=arcelf
  72. targ_extra_emuls="arcelf_prof arclinux arclinux_prof arcv2elf arcv2elfx"
  73. ;;
  74. arc*-*-linux-uclibc*) targ_emul=arclinux
  75. targ_extra_emuls="arclinux_prof arcelf arcelf_prof arcv2elf arcv2elfx"
  76. ;;
  77. arm-epoc-pe) targ_emul=arm_epoc_pe ; targ_extra_ofiles="deffilep.o pe-dll.o" ;;
  78. arm*-*-cegcc*) targ_emul=arm_wince_pe ; targ_extra_ofiles="deffilep.o pe-dll.o"
  79. LIB_PATH='${tooldir}/lib/w32api' ;;
  80. arm-wince-pe | arm-*-wince | arm*-*-mingw32ce*)
  81. targ_emul=arm_wince_pe ; targ_extra_ofiles="deffilep.o pe-dll.o" ;;
  82. arm-*-pe) targ_emul=armpe ; targ_extra_ofiles="deffilep.o pe-dll.o" ;;
  83. arm-*-aout | armel-*-aout) targ_emul=armaoutl ;;
  84. armeb-*-aout) targ_emul=armaoutb ;;
  85. arm-*-coff) targ_emul=armcoff ;;
  86. arm*b-*-freebsd*) targ_emul=armelfb_fbsd
  87. targ_extra_emuls="armelf_fbsd armelf" ;;
  88. arm*-*-freebsd* | arm-*-kfreebsd*-gnu)
  89. targ_emul=armelf_fbsd
  90. targ_extra_emuls="armelfb_fbsd armelf" ;;
  91. armeb-*-netbsdelf*) targ_emul=armelfb_nbsd;
  92. targ_extra_emuls="armelf_nbsd armelf armnbsd" ;;
  93. arm-*-netbsdelf*) targ_emul=armelf_nbsd;
  94. targ_extra_emuls="armelfb_nbsd armelf armnbsd" ;;
  95. arm-*-netbsd*) targ_emul=armnbsd;
  96. targ_extra_emuls="armelf armelf_nbsd armelfb_nbsd" ;;
  97. arm-*-nto*) targ_emul=armnto ;;
  98. arm-*-openbsd*) targ_emul=armnbsd ;;
  99. arm-*-rtems*) targ_emul=armelf ;;
  100. armeb-*-elf | armeb-*-eabi*)
  101. targ_emul=armelfb ;;
  102. arm-*-elf | arm*-*-eabi*)
  103. targ_emul=armelf ;;
  104. arm*-*-symbianelf*) targ_emul=armsymbian;;
  105. arm-*-kaos*) targ_emul=armelf ;;
  106. arm9e-*-elf) targ_emul=armelf ;;
  107. arm*b-*-linux-*eabi*) targ_emul=armelfb_linux_eabi
  108. targ_extra_emuls=armelf_linux_eabi
  109. targ_extra_libpath=$targ_extra_emuls
  110. ;;
  111. arm*b-*-linux-*) targ_emul=armelfb_linux
  112. targ_extra_emuls="armelfb armelf armelf_linux"
  113. targ_extra_libpath="armelf_linux"
  114. ;;
  115. arm*-*-linux-*eabi*) targ_emul=armelf_linux_eabi
  116. targ_extra_emuls=armelfb_linux_eabi
  117. targ_extra_libpath=$targ_extra_emuls
  118. ;;
  119. arm*-*-linux-*) targ_emul=armelf_linux
  120. targ_extra_emuls="armelf armelfb armelfb_linux"
  121. targ_extra_libpath="armelfb_linux"
  122. ;;
  123. arm*b-*-nacl*) targ_emul=armelfb_nacl
  124. targ_extra_emuls="armelf_nacl elf_i386_nacl"
  125. targ_extra_libpath=$targ_extra_emuls
  126. targ64_extra_emuls="elf32_x86_64_nacl elf_x86_64_nacl"
  127. targ64_extra_libpath=$targ64_extra_emuls
  128. ;;
  129. arm*-*-nacl*) targ_emul=armelf_nacl
  130. targ_extra_emuls="armelfb_nacl elf_i386_nacl"
  131. targ_extra_libpath=$targ_extra_emuls
  132. targ64_extra_emuls="elf32_x86_64_nacl elf_x86_64_nacl"
  133. targ64_extra_libpath=$targ64_extra_emuls
  134. ;;
  135. arm*-*-uclinux*eabi*) targ_emul=armelf_linux_eabi
  136. targ_extra_emuls=armelfb_linux_eabi
  137. targ_extra_libpath=$targ_extra_emuls
  138. ;;
  139. arm*-*-uclinux*) targ_emul=armelf_linux
  140. targ_extra_emuls="armelf armelfb armelfb_linux"
  141. targ_extra_libpath="armelfb_linux"
  142. ;;
  143. arm-*-vxworks) targ_emul=armelf_vxworks ;;
  144. arm*-*-conix*) targ_emul=armelf ;;
  145. avr-*-*) targ_emul=avr2
  146. targ_extra_emuls="avr1 avr25 avr3 avr31 avr35 avr4 avr5 avr51 avr6 avrxmega1 avrxmega2 avrxmega3 avrxmega4 avrxmega5 avrxmega6 avrxmega7 avrtiny"
  147. ;;
  148. bfin-*-elf) targ_emul=elf32bfin;
  149. targ_extra_emuls="elf32bfinfd"
  150. targ_extra_libpath=$targ_extra_emuls
  151. ;;
  152. bfin-*-rtems*) targ_emul=elf32bfin;
  153. targ_extra_emuls="elf32bfinfd"
  154. targ_extra_libpath=$targ_extra_emuls
  155. ;;
  156. bfin-*-uclinux*) targ_emul=elf32bfin;
  157. targ_extra_emuls="elf32bfinfd"
  158. targ_extra_libpath=$targ_extra_emuls
  159. ;;
  160. bfin-*-linux-uclibc*) targ_emul=elf32bfinfd;
  161. targ_extra_emuls="elf32bfin"
  162. targ_extra_libpath=$targ_extra_emuls
  163. ;;
  164. cr16-*-elf*) targ_emul=elf32cr16 ;;
  165. cr16c-*-elf*) targ_emul=elf32cr16c
  166. ;;
  167. cris-*-*aout*) targ_emul=crisaout
  168. targ_extra_emuls="criself crislinux"
  169. targ_extra_libpath=$targ_extra_emuls ;;
  170. cris-*-linux-* | crisv32-*-linux-*)
  171. targ_emul=crislinux ;;
  172. cris-*-* | crisv32-*-*) targ_emul=criself
  173. targ_extra_emuls="crisaout crislinux"
  174. targ_extra_libpath=$targ_extra_emuls
  175. ;;
  176. crx-*-elf*) targ_emul=elf32crx
  177. ;;
  178. d10v-*-*) targ_emul=d10velf ;;
  179. d30v-*-*ext*) targ_emul=d30v_e; targ_extra_emuls="d30velf d30v_o" ;;
  180. d30v-*-*onchip*) targ_emul=d30v_o; targ_extra_emuls="d30velf d30v_e" ;;
  181. d30v-*-*) targ_emul=d30velf; targ_extra_emuls="d30v_e d30v_o"
  182. ;;
  183. dlx-*-elf*) targ_emul=elf32_dlx
  184. ;;
  185. epiphany-*-elf) targ_emul=elf32epiphany
  186. targ_extra_emuls="elf32epiphany_4x4"
  187. ;;
  188. fido*-*-elf*) targ_emul=m68kelf ;;
  189. fr30-*-*) targ_emul=elf32fr30
  190. ;;
  191. frv-*-*linux*) targ_emul=elf32frvfd ;;
  192. frv-*-*) targ_emul=elf32frv ; targ_extra_emuls="elf32frvfd"
  193. ;;
  194. moxie-*-moxiebox*) targ_emul=moxiebox
  195. ;;
  196. moxie-*-*) targ_emul=elf32moxie
  197. ;;
  198. h8300-*-hms* | h8300-*-coff* | h8300-*-rtemscoff*)
  199. targ_emul=h8300; targ_extra_emuls="h8300h h8300s h8300hn h8300sn h8300sx h8300sxn" ;;
  200. h8300-*-elf* | h8300-*-rtems*)
  201. targ_emul=h8300elf;
  202. targ_extra_emuls="h8300helf h8300self h8300hnelf h8300snelf h8300sxelf h8300sxnelf" ;;
  203. h8300-*-linux*)
  204. targ_emul=h8300elf_linux;
  205. targ_extra_emuls="h8300helf_linux h8300self_linux h8300sxelf_linux" ;;
  206. h8500-*-hms* | h8500-*-coff* | h8500-*-rtems*)
  207. targ_emul=h8500
  208. targ_extra_emuls="h8500s h8500b h8500m h8500c"
  209. ;;
  210. hppa*64*-*-linux-*) targ_emul=hppa64linux ;;
  211. hppa*64*-hpux*) targ_emul=elf64hppa ;;
  212. hppa*-*-linux-*) targ_emul=hppalinux ;;
  213. hppa*-*-*elf*) targ_emul=hppaelf ;;
  214. hppa*-*-lites*) targ_emul=hppaelf ;;
  215. hppa*-*-netbsd*) targ_emul=hppanbsd ;;
  216. hppa*-*-openbsd*) targ_emul=hppaobsd
  217. ;;
  218. i370-*-elf* | i370-*-linux-*) targ_emul=elf32i370
  219. ;;
  220. i[3-7]86-*-nto-qnx*) targ_emul=i386nto ;;
  221. i[3-7]86-*-vsta) targ_emul=vsta ;;
  222. i[3-7]86-*-go32) targ_emul=i386go32 ;;
  223. i[3-7]86-*-msdosdjgpp*) targ_emul=i386go32 ;;
  224. i[3-7]86-*-aix*) targ_emul=i386coff ;;
  225. i[3-7]86-*-sco*) targ_emul=i386coff ;;
  226. i[3-7]86-*-isc*) targ_emul=i386coff ;;
  227. i[3-7]86-*-lynxos*) targ_emul=i386lynx ;;
  228. i[3-7]86-*-coff) targ_emul=i386coff ;;
  229. i[3-7]86-*-rtems*) targ_emul=elf_i386
  230. targ_extra_emuls=elf_iamcu ;;
  231. i[3-7]86-*-aros*) targ_emul=elf_i386
  232. targ_extra_emuls=elf_iamcu ;;
  233. i[3-7]86-*-rdos*) targ_emul=elf_i386
  234. targ_extra_emuls=elf_iamcu ;;
  235. x86_64-*-rdos*) targ_emul=elf64rdos ;;
  236. x86_64-*-cloudabi*) targ_emul=elf_x86_64_cloudabi ;;
  237. i[3-7]86-*-bsd) targ_emul=i386bsd ;;
  238. i[3-7]86-*-bsd386) targ_emul=i386bsd ;;
  239. i[3-7]86-*-bsdi*) targ_emul=i386bsd ;;
  240. i[3-7]86-*-aout) targ_emul=i386aout ;;
  241. i[3-7]86-*-linux*aout*) targ_emul=i386linux
  242. targ_extra_emuls="elf_i386 elf_iamcu"
  243. tdir_elf_iamcu=`echo ${targ_alias} | sed -e 's/aout//'`
  244. tdir_elf_i386=`echo ${targ_alias} | sed -e 's/aout//'` ;;
  245. i[3-7]86-*-linux*oldld) targ_emul=i386linux
  246. targ_extra_emuls="elf_i386 elf_iamcu" ;;
  247. i[3-7]86-*-linux-*) targ_emul=elf_i386
  248. targ_extra_emuls="i386linux elf_iamcu"
  249. targ64_extra_emuls="elf_x86_64 elf32_x86_64 elf_l1om elf_k1om"
  250. targ64_extra_libpath=elf_x86_64
  251. targ_extra_libpath=elf32_x86_64
  252. tdir_i386linux=${targ_alias}aout ;;
  253. x86_64-*-linux-gnux32) targ_emul=elf32_x86_64
  254. targ_extra_emuls="elf_x86_64 elf_i386 elf_iamcu i386linux elf_l1om elf_k1om"
  255. targ_extra_libpath="elf_i386 elf_iamcu elf_x86_64 elf_l1om elf_k1om"
  256. tdir_i386linux=`echo ${targ_alias}aout | sed -e 's/x86_64/i386/' -e 's/-linux-gnux32/-linux-gnu/'`
  257. tdir_elf_iamcu=`echo ${targ_alias} | sed -e 's/x86_64/i386/' -e 's/-linux-gnux32/-linux-gnu/'`
  258. tdir_elf_i386=`echo ${targ_alias} | sed -e 's/x86_64/i386/' -e 's/-linux-gnux32/-linux-gnu/'` ;;
  259. x86_64-*-linux-*) targ_emul=elf_x86_64
  260. targ_extra_emuls="elf32_x86_64 elf_i386 elf_iamcu i386linux elf_l1om elf_k1om"
  261. targ_extra_libpath="elf_i386 elf32_x86_64 elf_l1om elf_k1om"
  262. tdir_i386linux=`echo ${targ_alias}aout | sed -e 's/x86_64/i386/'`
  263. tdir_elf_i386=`echo ${targ_alias} | sed -e 's/x86_64/i386/'` ;;
  264. i[3-7]86-*-sysv[45]*) targ_emul=elf_i386
  265. targ_extra_emuls=elf_iamcu ;;
  266. i[3-7]86-*-solaris2*) targ_emul=elf_i386_sol2
  267. targ_extra_emuls="elf_i386_ldso elf_i386 elf_iamcu elf_x86_64_sol2 elf_x86_64 elf_l1om elf_k1om"
  268. targ_extra_libpath=$targ_extra_emuls
  269. ;;
  270. x86_64-*-solaris2*)
  271. targ_emul=elf_x86_64_sol2
  272. targ_extra_emuls="elf_x86_64 elf_i386_sol2 elf_i386_ldso elf_i386 elf_iamcu elf_l1om elf_k1om"
  273. targ_extra_libpath=$targ_extra_emuls
  274. tdir_elf_i386=`echo ${targ_alias} | sed -e 's/x86_64/i386/'` ;;
  275. i[3-7]86-*-unixware) targ_emul=elf_i386
  276. targ_extra_emuls=elf_iamcu ;;
  277. i[3-7]86-*-solaris*) targ_emul=elf_i386_ldso
  278. targ_extra_emuls="elf_i386"
  279. targ_extra_libpath=$targ_extra_emuls
  280. ;;
  281. i[3-7]86-*-netbsdelf* | \
  282. i[3-7]86-*-netbsd*-gnu* | \
  283. i[3-7]86-*-knetbsd*-gnu)
  284. targ_emul=elf_i386
  285. targ_extra_emuls="elf_iamcu i386nbsd" ;;
  286. i[3-7]86-*-netbsdpe*) targ_emul=i386pe
  287. targ_extra_ofiles="deffilep.o pe-dll.o" ;;
  288. i[3-7]86-*-netbsd*) targ_emul=i386nbsd
  289. targ_extra_emuls=elf_i386 ;;
  290. x86_64-*-netbsd*) targ_emul=elf_x86_64
  291. targ_extra_emuls="elf_i386 elf_iamcu i386nbsd elf_l1om elf_k1om"
  292. tdir_elf_iamcu=`echo ${targ_alias} | \
  293. sed -e 's/x86_64/i386/'`
  294. case "${tdir_elf_iamcu}" in
  295. *-netbsdelf*) ;;
  296. *) tdir_elf_iamcu=`echo ${tdir_elf_iamcu} | \
  297. sed -e 's/netbsd/netbsdelf/'`;;
  298. esac
  299. tdir_elf_i386=`echo ${targ_alias} | \
  300. sed -e 's/x86_64/i386/'`
  301. case "${tdir_elf_i386}" in
  302. *-netbsdelf*) ;;
  303. *) tdir_elf_i386=`echo ${tdir_elf_i386} | \
  304. sed -e 's/netbsd/netbsdelf/'`;;
  305. esac ;;
  306. i[3-7]86-*-netware) targ_emul=i386nw ;;
  307. i[3-7]86-*-elfiamcu) targ_emul=elf_iamcu
  308. targ_extra_emuls=elf_i386 ;;
  309. i[3-7]86-*-elf*) targ_emul=elf_i386
  310. targ_extra_emuls=elf_iamcu ;;
  311. x86_64-*-elf*) targ_emul=elf_x86_64
  312. targ_extra_emuls="elf_i386 elf_iamcu elf32_x86_64 elf_l1om elf_k1om"
  313. targ_extra_libpath="elf_i386 elf_iamcu elf32_x86_64 elf_l1om elf_k1om"
  314. tdir_elf_i386=`echo ${targ_alias} | sed -e 's/x86_64/i386/'`
  315. ;;
  316. i[3-7]86-*-kaos*) targ_emul=elf_i386 ;;
  317. i[3-7]86-*-freebsdaout* | i[3-7]86-*-freebsd[12].* | i[3-7]86-*-freebsd[12])
  318. targ_emul=i386bsd ;;
  319. i[3-7]86-*-dragonfly*) targ_emul=elf_i386
  320. targ_extra_emuls="elf_iamcu i386bsd" ;;
  321. x86_64-*-dragonfly*) targ_emul=elf_x86_64
  322. targ_extra_emuls="elf_i386 elf_iamcu elf_l1om elf_k1om" ;;
  323. i[3-7]86-*-freebsd* | i[3-7]86-*-kfreebsd*-gnu)
  324. targ_emul=elf_i386_fbsd
  325. targ_extra_emuls="elf_i386 elf_iamcu i386bsd" ;;
  326. x86_64-*-freebsd* | x86_64-*-kfreebsd*-gnu)
  327. targ_emul=elf_x86_64_fbsd
  328. targ_extra_emuls="elf_i386_fbsd elf_x86_64 elf_i386 elf_iamcu elf_l1om elf_l1om_fbsd elf_k1om elf_k1om_fbsd"
  329. targ_extra_libpath="elf_i386_fbsd"
  330. tdir_elf_i386_fbsd=`echo ${targ_alias} \
  331. | sed -e 's/x86_64/i386/'`
  332. tdir_elf_iamcu=`echo ${targ_alias} \
  333. | sed -e 's/x86_64/i386/'`
  334. tdir_elf_i386=`echo ${targ_alias} \
  335. | sed -e 's/x86_64/i386/'` ;;
  336. i[3-7]86-*-sysv*) targ_emul=i386coff ;;
  337. i[3-7]86-*-ptx*) targ_emul=i386coff ;;
  338. i[3-7]86-*-mach*) targ_emul=i386mach ;;
  339. i[3-7]86-*-gnu*) targ_emul=elf_i386
  340. targ_extra_emuls=elf_iamcu ;;
  341. i[3-7]86-*-msdos*) targ_emul=i386msdos; targ_extra_emuls=i386aout ;;
  342. i[3-7]86-*-moss*) targ_emul=i386moss; targ_extra_emuls=i386msdos ;;
  343. i[3-7]86-*-winnt*) targ_emul=i386pe ;
  344. targ_extra_ofiles="deffilep.o pe-dll.o" ;;
  345. i[3-7]86-*-pe) targ_emul=i386pe ;
  346. targ_extra_ofiles="deffilep.o pe-dll.o" ;;
  347. i[3-7]86-*-cygwin*) targ_emul=i386pe ;
  348. targ_extra_ofiles="deffilep.o pe-dll.o" ;
  349. test "$targ" != "$host" && LIB_PATH='${tooldir}/lib/w32api' ;;
  350. i[3-7]86-*-mingw32*) targ_emul=i386pe ;
  351. targ_extra_ofiles="deffilep.o pe-dll.o" ;;
  352. x86_64-*-pe | x86_64-*-pep) targ_emul=i386pep ;
  353. targ_extra_emuls=i386pe ;
  354. targ_extra_ofiles="deffilep.o pep-dll.o pe-dll.o" ;;
  355. x86_64-*-cygwin) targ_emul=i386pep ;
  356. targ_extra_emuls=i386pe
  357. targ_extra_ofiles="deffilep.o pep-dll.o pe-dll.o"
  358. test "$targ" != "$host" && LIB_PATH='${tooldir}/lib/w32api' ;;
  359. x86_64-*-mingw*) targ_emul=i386pep ;
  360. targ_extra_emuls=i386pe
  361. targ_extra_ofiles="deffilep.o pep-dll.o pe-dll.o" ;;
  362. x86_64-w64-minwin64*) targ_emul=i386pep ;
  363. targ_extra_emuls=i386pe
  364. targ_extra_ofiles="deffilep.o pep-dll.o pe-dll.o" ;;
  365. i[3-7]86-*-interix*) targ_emul=i386pe_posix;
  366. targ_extra_ofiles="deffilep.o pe-dll.o" ;;
  367. i[3-7]86-*-beospe*) targ_emul=i386beos ;;
  368. i[3-7]86-*-beos*) targ_emul=elf_i386_be ;;
  369. i[3-7]86-*-vxworks*) targ_emul=elf_i386_vxworks ;;
  370. i[3-7]86-*-chaos) targ_emul=elf_i386_chaos
  371. ;;
  372. i[3-7]86-*-nacl*) targ_emul=elf_i386_nacl
  373. targ_extra_emuls="armelf_nacl armelfb_nacl"
  374. targ_extra_libpath=$targ_extra_emuls
  375. targ64_extra_emuls="elf32_x86_64_nacl elf_x86_64_nacl"
  376. targ64_extra_libpath=$targ64_extra_emuls
  377. ;;
  378. x86_64-*-nacl*) targ_emul=elf32_x86_64_nacl
  379. targ_extra_emuls="elf_i386_nacl elf_x86_64_nacl armelf_nacl armelfb_nacl"
  380. targ_extra_libpath=$targ_extra_emuls
  381. tdir_elf_i386_nacl=`echo ${targ_alias} | sed -e 's/x86_64/i386/'`
  382. ;;
  383. i860-*-coff) targ_emul=coff_i860 ;;
  384. i860-stardent-sysv4* | i860-stardent-elf*)
  385. targ_emul=elf32_i860
  386. ;;
  387. i960-wrs-vxworks5.0*) targ_emul=gld960 ;;
  388. i960-wrs-vxworks5*) targ_emul=gld960coff ;;
  389. i960-wrs-vxworks*) targ_emul=gld960 ;;
  390. i960-*-coff) targ_emul=gld960coff ;;
  391. i960-intel-nindy) targ_emul=gld960 ;;
  392. i960-*-rtems*) targ_emul=gld960coff ;;
  393. i960-*-elf*) targ_emul=elf32_i960
  394. ;;
  395. ia64-*-elf*) targ_emul=elf64_ia64 ;;
  396. ia64-*-freebsd* | ia64-*-kfreebsd*-gnu)
  397. targ_emul=elf64_ia64_fbsd
  398. targ_extra_emuls="elf64_ia64" ;;
  399. ia64-*-netbsd*) targ_emul=elf64_ia64 ;;
  400. ia64-*-linux*) targ_emul=elf64_ia64 ;;
  401. ia64-*-*vms*) targ_emul=elf64_ia64_vms ;;
  402. ia64-*-aix*) targ_emul=elf64_aix
  403. ;;
  404. ip2k-*-elf) targ_emul=elf32ip2k
  405. ;;
  406. iq2000-*-elf) targ_emul=elf32iq2000 ; targ_extra_emuls="elf32iq10"
  407. ;;
  408. lm32-*-*linux*) targ_emul=elf32lm32fd ;;
  409. lm32-*-*) targ_emul=elf32lm32 ; targ_extra_emuls="elf32lm32fd"
  410. ;;
  411. m32c-*-elf | m32c-*-rtems*)
  412. targ_emul=elf32m32c
  413. ;;
  414. m32r*le-*-elf*) targ_emul=m32rlelf ;;
  415. m32r*-*-elf* | m32r*-*-rtems*)
  416. targ_emul=m32relf ;;
  417. m32r*le-*-linux-*) targ_emul=m32rlelf_linux ;;
  418. m32r*-*-linux-*) targ_emul=m32relf_linux
  419. ;;
  420. m68hc11-*-*|m6811-*-*) targ_emul=m68hc11elf
  421. targ_extra_emuls="m68hc11elfb m68hc12elf m68hc12elfb" ;;
  422. m68hc12-*-*|m6812-*-*) targ_emul=m68hc12elf
  423. targ_extra_emuls="m68hc12elfb m68hc11elf m68hc11elfb" ;;
  424. m68*-sun-sunos[34]*) targ_emul=sun3 ;;
  425. m68*-wrs-vxworks*) targ_emul=sun3 ;;
  426. m68*-ericsson-ose) targ_emul=sun3 ;;
  427. m68*-apple-aux*) targ_emul=m68kaux ;;
  428. m68k-sony-*) targ_emul=news ;;
  429. m68k-hp-bsd*) targ_emul=hp300bsd ;;
  430. m68*-motorola-sysv*) targ_emul=delta68 ;;
  431. m68*-*-aout) targ_emul=m68kaout ;;
  432. m68*-*-coff) targ_emul=m68kcoff ;;
  433. m68*-*-elf) targ_emul=m68kelf ;;
  434. m68*-*-hpux*) targ_emul=hp3hpux ;;
  435. m68k-*-linux*aout*) targ_emul=m68klinux
  436. targ_extra_emuls=m68kelf
  437. tdir_m68kelf=`echo ${targ_alias} | sed -e 's/aout//'` ;;
  438. m68k-*-linux-*) targ_emul=m68kelf
  439. targ_extra_emuls=m68klinux
  440. tdir_m68klinux=`echo ${targ_alias} | sed -e 's/linux/linuxaout/'` ;;
  441. m68k-*-uclinux*) targ_emul=m68kelf ;;
  442. m68*-*-gnu*) targ_emul=m68kelf ;;
  443. m68*-*-netbsd*4k*) targ_emul=m68k4knbsd
  444. targ_extra_emuls="m68knbsd m68kelfnbsd" ;;
  445. m68*-*-netbsdelf*) targ_emul=m68kelfnbsd
  446. targ_extra_emuls="m68knbsd m68k4knbsd" ;;
  447. m68*-*-netbsdaout* | m68*-*-netbsd*)
  448. targ_emul=m68knbsd
  449. targ_extra_emuls="m68kelfnbsd m68k4knbsd" ;;
  450. m68*-*-psos*) targ_emul=m68kpsos ;;
  451. m68*-*-rtemscoff*) targ_emul=m68kcoff ;;
  452. m68*-*-rtems*) targ_emul=m68kelf
  453. ;;
  454. m8*-*-*) targ_emul=m88kbcs
  455. ;;
  456. mcore-*-pe) targ_emul=mcorepe ;
  457. targ_extra_ofiles="deffilep.o pe-dll.o" ;;
  458. mcore-*-elf) targ_emul=elf32mcore
  459. ;;
  460. mep-*-elf) targ_emul=elf32mep ;;
  461. metag-*-*) targ_emul=elf32metag ;;
  462. microblazeel*-linux*) targ_emul="elf32mbel_linux"
  463. targ_extra_emuls="elf32mb_linux"
  464. ;;
  465. microblaze*-linux*) targ_emul="elf32mb_linux"
  466. targ_extra_emuls="elf32mbel_linux"
  467. ;;
  468. microblazeel*) targ_emul=elf32microblazeel
  469. targ_extra_emuls=elf32microblaze
  470. ;;
  471. microblaze*) targ_emul=elf32microblaze
  472. targ_extra_emuls=elf32microblazeel
  473. ;;
  474. mips*-sgi-irix5*) targ_emul=elf32bsmip ;;
  475. mips*-sgi-irix6*) targ_emul=elf32bmipn32
  476. targ_extra_emuls="elf32bsmip elf64bmip"
  477. targ_extra_libpath=$targ_extra_emuls ;;
  478. mips*el-*-netbsd*) targ_emul=elf32ltsmip
  479. targ_extra_emuls="elf32btsmip elf64ltsmip elf64btsmip"
  480. ;;
  481. mips*-*-netbsd*) targ_emul=elf32btsmip
  482. targ_extra_emuls="elf32ltsmip elf64btsmip elf64ltsmip"
  483. ;;
  484. mips*vr4300el-*-elf*) targ_emul=elf32l4300 ;;
  485. mips*vr4300-*-elf*) targ_emul=elf32b4300 ;;
  486. mips*vr4100el-*-elf*) targ_emul=elf32l4300 ;;
  487. mips*vr4100-*-elf*) targ_emul=elf32b4300 ;;
  488. mips*vr5000el-*-elf*) targ_emul=elf32l4300 ;;
  489. mips*vr5000-*-elf*) targ_emul=elf32b4300 ;;
  490. mips*el-sde-elf*) targ_emul=elf32ltsmip
  491. targ_extra_emuls="elf32btsmip elf32ltsmipn32 elf64ltsmip elf32btsmipn32 elf64btsmip" ;;
  492. mips*-sde-elf* | mips*-mti-elf* | mips*-img-elf*)
  493. targ_emul=elf32btsmip
  494. targ_extra_emuls="elf32ltsmip elf32btsmipn32 elf64btsmip elf32ltsmipn32 elf64ltsmip" ;;
  495. mips64*el-ps2-elf*) targ_emul=elf32lr5900n32
  496. targ_extra_emuls="elf32lr5900"
  497. targ_extra_libpath=$targ_extra_emuls ;;
  498. mips*el-ps2-elf*) targ_emul=elf32lr5900
  499. targ_extra_emuls="elf32lr5900n32"
  500. targ_extra_libpath=$targ_extra_emuls ;;
  501. mips*el-*-elf*) targ_emul=elf32elmip ;;
  502. mips*-*-elf*) targ_emul=elf32ebmip ;;
  503. mips*-*-rtems*) targ_emul=elf32ebmip ;;
  504. mips*el-*-vxworks*) targ_emul=elf32elmipvxworks
  505. targ_extra_emuls="elf32ebmipvxworks" ;;
  506. mips*-*-vxworks*) targ_emul=elf32ebmipvxworks
  507. targ_extra_emuls="elf32elmipvxworks" ;;
  508. mips*-*-windiss) targ_emul=elf32mipswindiss ;;
  509. mips64*el-*-linux-*) targ_emul=elf32ltsmipn32
  510. targ_extra_emuls="elf32btsmipn32 elf32ltsmip elf32btsmip elf64ltsmip elf64btsmip"
  511. targ_extra_libpath=$targ_extra_emuls ;;
  512. mips64*-*-linux-*) targ_emul=elf32btsmipn32
  513. targ_extra_emuls="elf32ltsmipn32 elf32btsmip elf32ltsmip elf64btsmip elf64ltsmip"
  514. targ_extra_libpath=$targ_extra_emuls ;;
  515. mips*el-*-linux-*) targ_emul=elf32ltsmip
  516. targ_extra_emuls="elf32btsmip elf32ltsmipn32 elf64ltsmip elf32btsmipn32 elf64btsmip"
  517. targ_extra_libpath=$targ_extra_emuls ;;
  518. mips*-*-linux-*) targ_emul=elf32btsmip
  519. targ_extra_emuls="elf32ltsmip elf32btsmipn32 elf64btsmip elf32ltsmipn32 elf64ltsmip"
  520. targ_extra_libpath=$targ_extra_emuls ;;
  521. mips64*el-*-freebsd* | mips64*el-*-kfreebsd*-gnu)
  522. targ_emul=elf32ltsmipn32_fbsd
  523. targ_extra_emuls="elf32ltsmip elf32btsmip elf32ltsmipn32 elf32btsmipn32 elf64ltsmip elf64btsmip elf32ltsmip_fbsd elf32btsmip_fbsd elf32btsmipn32_fbsd elf64ltsmip_fbsd elf64btsmip_fbsd"
  524. targ_extra_libpath=$targ_extra_emuls ;;
  525. mips64*-*-freebsd* | mips64*-*-kfreebsd*-gnu)
  526. targ_emul=elf32btsmipn32_fbsd
  527. targ_extra_emuls="elf32ltsmip elf32btsmip elf32ltsmipn32 elf32btsmipn32 elf64ltsmip elf64btsmip elf32ltsmip_fbsd elf32btsmip_fbsd elf32ltsmipn32_fbsd elf64ltsmip_fbsd elf64btsmip_fbsd"
  528. targ_extra_libpath=$targ_extra_emuls ;;
  529. mips*el-*-freebsd* | mips*el-*-kfreebsd*-gnu)
  530. targ_emul=elf32ltsmip_fbsd
  531. targ_extra_emuls="elf32ltsmip elf32btsmip elf32ltsmipn32 elf32btsmipn32 elf64ltsmip elf64btsmip elf32ltsmipn32_fbsd elf32btsmip_fbsd elf32btsmipn32_fbsd elf64ltsmip_fbsd elf64btsmip_fbsd"
  532. targ_extra_libpath=$targ_extra_emuls ;;
  533. mips*-*-freebsd* | mips*-*-kfreebsd*-gnu)
  534. targ_emul=elf32btsmip_fbsd
  535. targ_extra_emuls="elf32ltsmip elf32btsmip elf32ltsmipn32 elf32btsmipn32 elf64ltsmip elf64btsmip elf32ltsmip_fbsd elf32btsmipn32_fbsd elf32ltsmipn32_fbsd elf64ltsmip_fbsd elf64btsmip_fbsd"
  536. targ_extra_libpath=$targ_extra_emuls ;;
  537. mips*-*-sysv4*) targ_emul=elf32btsmip
  538. ;;
  539. mmix-*-*) targ_emul=mmo
  540. targ_extra_emuls=elf64mmix
  541. ;;
  542. am34-*-linux*) targ_emul=elf32am33lin ;;
  543. am33_2.0-*-linux*) targ_emul=elf32am33lin ;;
  544. mn10200-*-*) targ_emul=mn10200 ;;
  545. mn10300-*-*) targ_emul=mn10300
  546. ;;
  547. mt-*elf) targ_emul=elf32mt
  548. ;;
  549. msp430-*-*) targ_emul=msp430elf
  550. targ_extra_emuls="msp430X"
  551. ;;
  552. nds32*le-*-elf*) targ_emul=nds32elf
  553. targ_extra_emuls="nds32elf16m nds32belf nds32belf16m"
  554. ;;
  555. nds32*be-*-elf*) targ_emul=nds32belf
  556. targ_extra_emuls="nds32elf nds32elf16m nds32belf16m"
  557. ;;
  558. nds32*le-*-linux-gnu*) targ_emul=nds32elf_linux ;;
  559. nds32*be-*-linux-gnu*) targ_emul=nds32belf_linux ;;
  560. nios2*-*-linux*) targ_emul=nios2linux ;;
  561. nios2*-*-*) targ_emul=nios2elf ;;
  562. ns32k-pc532-mach* | ns32k-pc532-ux*) targ_emul=pc532macha ;;
  563. ns32k-*-netbsd* | ns32k-pc532-lites*) targ_emul=ns32knbsd
  564. ;;
  565. or1k-*-elf | or1knd-*-elf) targ_emul=elf32or1k ;;
  566. or1k-*-linux* | or1knd-*-linux*) targ_emul=elf32or1k_linux ;;
  567. or1k-*-rtems* | or1knd-*-rtems*) targ_emul=elf32or1k
  568. ;;
  569. pdp11-*-*) targ_emul=pdp11
  570. ;;
  571. pjl*-*-*) targ_emul=pjlelf
  572. targ_extra_emuls="elf_i386 elf_iamcu" ;;
  573. pj*-*-*) targ_emul=pjelf
  574. ;;
  575. powerpc-*-freebsd* | powerpc-*-kfreebsd*-gnu)
  576. targ_emul=elf32ppc_fbsd
  577. targ_extra_emuls="elf32ppc elf32ppcsim"
  578. targ_extra_libpath=elf32ppc;
  579. tdir_elf32ppcsim=`echo ${targ_alias} | sed -e 's/ppc/ppcsim/'` ;;
  580. powerpc64-*-freebsd*)
  581. targ_emul=elf64ppc_fbsd
  582. targ_extra_emuls="elf64ppc elf32ppc_fbsd elf32ppc"
  583. targ_extra_libpath="elf32ppc_fbsd elf32ppc"
  584. tdir_elf32ppc=`echo "${targ_alias}" | sed -e 's/64//'`
  585. tdir_elf32ppc_fbsd=$tdir_elf32ppc
  586. ;;
  587. powerpc-*-vxworks*)
  588. targ_emul=elf32ppcvxworks
  589. targ_extra_emuls="elf32ppc elf32ppclinux elf32ppcsim" ;;
  590. powerpc*-*-elf* | powerpc*-*-eabi* | powerpc*-*-sysv* \
  591. | powerpc*-*-linux* | powerpc*-*-netbsd* | powerpc*-*-openbsd* \
  592. | powerpc*-*-solaris* | powerpc*-*-kaos* | powerpc*-*-vxworks*)
  593. case "${targ}" in
  594. *64*) targ_emul=elf64ppc
  595. targ_extra_emuls="elf32ppc elf32ppclinux elf32ppcsim"
  596. targ_extra_libpath="elf32ppc elf32ppclinux"
  597. td=tdir_elf32ppc
  598. case "${targ}" in
  599. powerpc*le-*) td=tdir_elf32lppc;;
  600. esac
  601. eval ${td}=`echo "${targ_alias}" | sed -e 's/64//'`
  602. eval ${td}linux=\$${td}
  603. eval ${td}sim=\$${td}
  604. ;;
  605. *linux*) targ_emul=elf32ppclinux
  606. targ_extra_emuls="elf32ppc elf32ppcsim"
  607. targ_extra_libpath=elf32ppc
  608. targ64_extra_emuls=elf64ppc
  609. targ64_extra_libpath=elf64ppc
  610. ;;
  611. *) targ_emul=elf32ppc
  612. targ_extra_emuls="elf32ppclinux elf32ppcsim"
  613. targ_extra_libpath=elf32ppclinux
  614. targ64_extra_emuls=elf64ppc
  615. targ64_extra_libpath=elf64ppc
  616. ;;
  617. esac
  618. case "${targ}" in
  619. powerpc*le-*)
  620. for z in targ_emul targ_extra_emuls targ_extra_libpath targ64_extra_emuls targ64_extra_libpath
  621. do
  622. eval ${z}=\"`eval echo \\$${z} | sed -e 's/ppc/lppc/g'`\"
  623. done
  624. esac ;;
  625. powerpc-*-nto*) targ_emul=elf32ppcnto ;;
  626. powerpcle-*-nto*) targ_emul=elf32lppcnto ;;
  627. powerpc-*-rtems*) targ_emul=elf32ppc ;;
  628. powerpc-*-macos*) targ_emul=ppcmacos ;;
  629. powerpc-*-netware*) targ_emul=ppcnw ;;
  630. powerpcle-*-pe | powerpcle-*-winnt* | powerpcle-*-cygwin*)
  631. targ_emul=ppcpe
  632. targ_extra_ofiles="deffilep.o pe-dll.o" ;;
  633. powerpc-*-aix[5-9]*) targ_emul=aix5ppc ;;
  634. powerpc-*-aix*) targ_emul=aixppc ;;
  635. powerpc-*-beos*) targ_emul=aixppc ;;
  636. powerpc-*-windiss*) targ_emul=elf32ppcwindiss ;;
  637. powerpc-*-lynxos*) targ_emul=ppclynx ;;
  638. rs6000-*-aix[5-9]*) targ_emul=aix5rs6 ;;
  639. rs6000-*-aix*) targ_emul=aixrs6
  640. ;;
  641. rl78-*-*) targ_emul=elf32rl78 ;;
  642. rx-*-*) targ_emul=elf32rx ;;
  643. s390x-*-linux*) targ_emul=elf64_s390
  644. targ_extra_emuls=elf_s390
  645. targ_extra_libpath=$targ_extra_emuls
  646. tdir_elf_s390=`echo ${targ_alias} | sed -e 's/s390x/s390/'` ;;
  647. s390x-*-tpf*) targ_emul=elf64_s390
  648. tdir_elf_s390=`echo ${targ_alias} | sed -e 's/s390x/s390/'` ;;
  649. s390-*-linux*) targ_emul=elf_s390
  650. targ64_extra_emuls=elf64_s390
  651. targ64_extra_libpath=elf64_s390
  652. tdir_elf64_s390=`echo ${targ_alias} | sed -e 's/s390/s390x/'`
  653. ;;
  654. score-*-elf) targ_emul=score7_elf
  655. targ_extra_emuls=score3_elf ;;
  656. sh-*-linux*) targ_emul=shlelf_linux
  657. targ_extra_emuls="shelf_linux shlelf_fd shelf_fd"
  658. targ_extra_libpath=shelf_linux ;;
  659. sh64eb-*-linux*) targ_emul=shelf32_linux
  660. targ_extra_emuls="shlelf32_linux" ;;
  661. sh64-*-linux*) targ_emul=shlelf32_linux
  662. targ_extra_emuls="shelf32_linux"
  663. targ_extra_libpath=shelf32_linux ;;
  664. sh*eb-*-linux*) targ_emul=shelf_linux
  665. targ_extra_emuls="shelf_fd" ;;
  666. sh*-*-linux*) targ_emul=shlelf_linux
  667. targ_extra_emuls="shlelf_fd" ;;
  668. sh5le-*-netbsd*) targ_emul=shlelf32_nbsd
  669. targ_extra_emuls="shelf32_nbsd shelf64_nbsd shlelf64_nbsd shelf_nbsd shlelf_nbsd" ;;
  670. sh5-*-netbsd*) targ_emul=shelf32_nbsd
  671. targ_extra_emuls="shlelf32_nbsd shelf64_nbsd shlelf64_nbsd shelf_nbsd shlelf_nbsd" ;;
  672. sh64le-*-netbsd*) targ_emul=shlelf64_nbsd
  673. targ_extra_emuls="shelf64_nbsd shelf32_nbsd shlelf32_nbsd shelf_nbsd shlelf_nbsd" ;;
  674. sh64-*-netbsd*) targ_emul=shelf64_nbsd
  675. targ_extra_emuls="shlelf64_nbsd shelf32_nbsd shlelf32_nbsd shelf_nbsd shlelf_nbsd" ;;
  676. sh*l*-*-netbsdelf*) targ_emul=shlelf_nbsd
  677. targ_extra_emuls=shelf_nbsd ;;
  678. sh*-*-netbsdelf*) targ_emul=shelf_nbsd
  679. targ_extra_emuls=shlelf_nbsd ;;
  680. sh*-*-symbianelf*) targ_emul=shlsymbian ;;
  681. shle*-*-elf* | sh[1234]*le*-*-elf | shle*-*-kaos*)
  682. targ_emul=shlelf
  683. targ_extra_emuls="shelf shl sh" ;;
  684. sh-*-rtemscoff*) targ_emul=sh; targ_extra_emuls=shl ;;
  685. sh-*-elf* | sh[1234]*-*-elf | sh-*-rtems* | sh-*-kaos*)
  686. targ_emul=shelf
  687. targ_extra_emuls="shlelf sh shl" ;;
  688. sh-*-uclinux* | sh[12]-*-uclinux*)
  689. targ_emul=shelf_uclinux
  690. targ_extra_emuls="shelf shlelf sh shl shelf_fd shlelf_fd" ;;
  691. sh-*-vxworks) targ_emul=shelf_vxworks
  692. targ_extra_emuls=shlelf_vxworks ;;
  693. sh-*-nto*) targ_emul=shelf_nto
  694. targ_extra_emuls=shlelf_nto ;;
  695. sh-*-pe) targ_emul=shpe ;
  696. targ_extra_ofiles="deffilep.o pe-dll.o" ;;
  697. sh-*-*) targ_emul=sh; targ_extra_emuls=shl ;;
  698. sh64le-*-elf*) targ_emul=shlelf
  699. targ_extra_emuls="shelf shlelf32 shelf32 shlelf64 shelf64"
  700. targ_extra_libpath=$targ_extra_emuls ;;
  701. sh64-*-elf*) targ_emul=shelf
  702. targ_extra_emuls="shlelf shelf32 shlelf32 shelf64 shlelf64"
  703. targ_extra_libpath=$targ_extra_emuls ;;
  704. sparc64-*-aout*) targ_emul=sparcaout ;;
  705. sparc64-*-elf*) targ_emul=elf64_sparc ;;
  706. sparc64-*-rtems*) targ_emul=elf64_sparc ;;
  707. sparc-sun-sunos4*) targ_emul=sun4 ;;
  708. sparclite*-*-elf) targ_emul=elf32_sparc ;;
  709. sparclite*-*-coff) targ_emul=coff_sparc ;;
  710. sparclite*-fujitsu-*) targ_emul=sparcaout ;;
  711. sparc*-*-aout) targ_emul=sparcaout ;;
  712. sparc*-*-coff) targ_emul=coff_sparc ;;
  713. sparc*-*-elf) targ_emul=elf32_sparc ;;
  714. sparc*-*-sysv4*) targ_emul=elf32_sparc ;;
  715. sparc*-*-vxworks*) targ_emul=elf32_sparc_vxworks ;;
  716. sparc64-*-freebsd* | sparcv9-*-freebsd* | sparc64-*-kfreebsd*-gnu | sparcv9-*-kfreebsd*-gnu)
  717. targ_emul=elf64_sparc_fbsd
  718. targ_extra_emuls="elf64_sparc elf32_sparc"
  719. targ_extra_libpath=$targ_extra_emuls
  720. tdir_elf32_sparc=`echo ${targ_alias} | sed -e 's/64//'` ;;
  721. sparc*-*-linux*aout*) targ_emul=sparclinux
  722. targ_extra_emuls="elf32_sparc sun4"
  723. tdir_elf32_sparc=`echo ${targ_alias} | sed -e 's/aout//'`
  724. tdir_sun4=sparc-sun-sunos4 ;;
  725. sparc64-*-linux-*) targ_emul=elf64_sparc
  726. targ_extra_emuls="elf32_sparc sparclinux sun4"
  727. targ_extra_libpath=elf32_sparc
  728. tdir_elf32_sparc=`echo ${targ_alias} | sed -e 's/64//'`
  729. tdir_sparclinux=${tdir_elf32_sparc}aout
  730. tdir_sun4=sparc-sun-sunos4 ;;
  731. sparc*-*-linux-*) targ_emul=elf32_sparc
  732. targ_extra_emuls="sparclinux elf64_sparc sun4"
  733. targ_extra_libpath=elf64_sparc
  734. tdir_sparclinux=${targ_alias}aout
  735. tdir_elf64_sparc=`echo ${targ_alias} | sed -e 's/32//'`
  736. tdir_sun4=sparc-sun-sunos4 ;;
  737. sparc64-*-netbsd* | sparc64-*-openbsd*)
  738. targ_emul=elf64_sparc
  739. targ_extra_emuls="elf32_sparc" ;;
  740. sparc*-*-netbsd*elf*) targ_emul=elf32_sparc ;;
  741. sparc*-*-netbsd*) targ_emul=sparcnbsd ;;
  742. sparc-*-solaris2.[0-6] | sparc-*-solaris2.[0-6].*)
  743. targ_emul=elf32_sparc_sol2
  744. targ_extra_emuls=elf32_sparc ;;
  745. sparc-*-solaris2*) targ_emul=elf32_sparc_sol2
  746. targ_extra_emuls="elf32_sparc elf64_sparc_sol2 elf64_sparc"
  747. targ_extra_libpath=$targ_extra_emuls
  748. tdir_elf64_sparc=`echo ${targ_alias} | sed -e 's/32//'` ;;
  749. sparcv9-*-solaris2* | sparc64-*-solaris2*)
  750. targ_emul=elf64_sparc_sol2
  751. targ_extra_emuls="elf64_sparc elf32_sparc_sol2 elf32_sparc"
  752. targ_extra_libpath=$targ_extra_emuls
  753. tdir_elf32_sparc=`echo ${targ_alias} | sed -e 's/64//'` ;;
  754. sparc*-*-solaris2*) targ_emul=elf32_sparc ;;
  755. sparc*-wrs-vxworks*) targ_emul=sparcaout ;;
  756. sparc-*-rtems*) targ_emul=elf32_sparc
  757. ;;
  758. spu-*-elf*) targ_emul=elf32_spu ;;
  759. tic30-*-*aout*) targ_emul=tic30aout ;;
  760. tic30-*-*coff*) targ_emul=tic30coff ;;
  761. tic4x-*-* | c4x-*-*) targ_emul=tic4xcoff ; targ_extra_emuls="tic3xcoff tic3xcoff_onchip" ;;
  762. tic54x-*-* | c54x*-*-*) targ_emul=tic54xcoff ;;
  763. tic6x-*-elf) targ_emul=elf32_tic6x_elf_le
  764. targ_extra_emuls="elf32_tic6x_elf_be elf32_tic6x_le elf32_tic6x_be"
  765. targ_extra_libpath=$targ_extra_emuls
  766. ;;
  767. tic6x-*-uclinux) targ_emul=elf32_tic6x_linux_le
  768. targ_extra_emuls="elf32_tic6x_linux_be elf32_tic6x_le elf32_tic6x_be"
  769. targ_extra_libpath=$targ_extra_emuls
  770. ;;
  771. tic80-*-*) targ_emul=tic80coff
  772. ;;
  773. tilegx-*-*) targ_emul=elf64tilegx
  774. targ_extra_emuls="elf64tilegx_be elf32tilegx elf32tilegx_be"
  775. targ_extra_libpath=$targ_extra_emuls ;;
  776. tilegxbe-*-*) targ_emul=elf64tilegx_be
  777. targ_extra_emuls="elf64tilegx elf32tilegx elf32tilegx_be"
  778. targ_extra_libpath=$targ_extra_emuls ;;
  779. tilepro-*-*) targ_emul=elf32tilepro ;;
  780. ft32-*-*) targ_emul=elf32ft32
  781. ;;
  782. v850*-*-*) targ_emul=v850_rh850
  783. targ_extra_emuls=v850
  784. ;;
  785. vax-dec-ultrix* | vax-dec-bsd*) targ_emul=vax ;;
  786. vax-*-netbsdelf*) targ_emul=elf32vax
  787. targ_extra_emuls=vaxnbsd ;;
  788. vax-*-netbsdaout* | vax-*-netbsd*)
  789. targ_emul=vaxnbsd
  790. targ_extra_emuls=elf32vax ;;
  791. vax-*-linux-*) targ_emul=elf32vax
  792. ;;
  793. visium-*-elf) targ_emul=elf32visium
  794. ;;
  795. w65-*-*) targ_emul=w65
  796. ;;
  797. xc16x-*-elf) targ_emul=elf32xc16x
  798. targ_extra_emuls="elf32xc16xl elf32xc16xs"
  799. ;;
  800. xstormy16-*-*) targ_emul=elf32xstormy16
  801. ;;
  802. xtensa*-*-*) targ_emul=elf32xtensa
  803. ;;
  804. xgate-*-*) targ_emul=xgateelf
  805. ;;
  806. z80-*-coff) targ_emul=z80
  807. ;;
  808. z8k-*-coff) targ_emul=z8002; targ_extra_emuls=z8001
  809. ;;
  810. *-*-ieee*) targ_emul=vanilla
  811. ;;
  812. *-tandem-none) targ_emul=st2000
  813. ;;
  814. *)
  815. echo 2>&1 "*** ld does not support target ${targ}"
  816. echo 2>&1 "*** see ld/configure.tgt for supported targets"
  817. exit 1
  818. esac
  819. NATIVE_LIB_DIRS='/usr/local/lib /lib /usr/lib'
  820. case "${target}" in
  821. *-*-dragonfly*)
  822. NATIVE_LIB_DIRS='/lib /usr/lib /usr/pkg/lib /usr/local/lib'
  823. ;;
  824. *-*-freebsd*)
  825. NATIVE_LIB_DIRS='/lib /usr/lib /usr/local/lib'
  826. ;;
  827. hppa*64*-*-hpux11*)
  828. NATIVE_LIB_DIRS=/usr/lib/pa20_64
  829. ;;
  830. i[3-7]86-*-sysv4*)
  831. NATIVE_LIB_DIRS='/usr/local/lib /usr/ccs/lib /lib /usr/lib'
  832. ;;
  833. i[3-7]86-*-solaris*)
  834. NATIVE_LIB_DIRS='/usr/local/lib /usr/ccs/lib /lib /usr/lib'
  835. ;;
  836. i[3-7]86-pc-interix*)
  837. NATIVE_LIB_DIRS='/usr/local/lib $$INTERIX_ROOT/usr/lib /lib /usr/lib'
  838. ;;
  839. ia64-*-aix*)
  840. NATIVE_LIB_DIRS='/usr/local/lib /usr/lib/ia64l64 /lib /usr/lib'
  841. ;;
  842. sparc*-*-solaris2*)
  843. NATIVE_LIB_DIRS='/usr/local/lib /usr/ccs/lib /lib /usr/lib'
  844. ;;
  845. spu-*-elf*)
  846. # This allows to build a pair of PPU/SPU toolchains with common sysroot.
  847. NATIVE_LIB_DIRS='/lib'
  848. ;;
  849. i[03-9x]86-*-cygwin* | x86_64-*-cygwin*)
  850. NATIVE_LIB_DIRS='/usr/lib /usr/lib/w32api'
  851. ;;
  852. *-*-linux*)
  853. ;;
  854. *-*-netbsd*)
  855. ;;
  856. alpha*-*-*)
  857. NATIVE_LIB_DIRS='/usr/local/lib /usr/ccs/lib /lib /usr/lib'
  858. ;;
  859. esac