# following shell variables:
# targ_emul name of linker emulation to use
# targ_extra_emuls additional linker emulations to provide
+# targ_extra_libpath additional linker emulations using LIB_PATH
# targ_extra_ofiles additional objects needed by the emulation
targ_extra_emuls=
i[3456]86-*-netbsd*) targ_emul=i386nbsd ;;
i[3456]86-*-netware) targ_emul=i386nw ;;
i[3456]86-*-elf*) targ_emul=elf_i386 ;;
-i[3456]86-*-freebsdelf*) targ_emul=elf_i386 ;;
-i[3456]86-*-freebsd*) targ_emul=i386bsd ;;
+i[3456]86-*-freebsdaout* | i[3456]86-*-freebsd[12].* | i[3456]86-*-freebsd[12])
+ targ_emul=i386bsd ;;
+i[3456]86-*-freebsd*) targ_emul=elf_i386 ;;
i[3456]86-*-sysv*) targ_emul=i386coff ;;
i[3456]86-*-ptx*) targ_emul=i386coff ;;
i[3456]86-*-mach*) targ_emul=i386mach ;;
targ_extra_ofiles="deffilep.o pe-dll.o" ;;
i[3456]86-*-mingw32*) targ_emul=i386pe ;
targ_extra_ofiles="deffilep.o pe-dll.o" ;;
+i[3456]86-*-interix*) targ_emul=i386pe_posix;
+ targ_extra_ofiles="deffilep.o pe-dll.o" ;;
i[3456]86-*-beospe*) targ_emul=i386beos ;;
i[3456]86-*-beos*) targ_emul=elf_i386_be ;;
+i[3456]86-*-vxworks*) targ_emul=i386aout ;;
m8*-*-*) targ_emul=m88kbcs ;;
a29k-*-udi) targ_emul=sa29200 ;;
a29k-*-ebmon) targ_emul=ebmon29k ;;
arm-*-aout | armel-*-aout) targ_emul=armaoutl ;;
armeb-*-aout) targ_emul=armaoutb ;;
arm-*-coff) targ_emul=armcoff ;;
+arm-*-netbsd*) targ_emul=armnbsd ;;
arm-*-elf) targ_emul=armelf ;;
-arm-*-oabi) targ_emul=armelf_oabi ;;
-arm*-*-linux-gnu*) targ_emul=armelf_linux; targ_extra_emuls="armelf_linux26 armelf";;
+arm-*-oabi) targ_emul=armelf_oabi ;;
+arm*-*-linux-gnu*) targ_emul=armelf_linux; targ_extra_emuls="armelf_linux26 armelf" ;;
+arm*-*-uclinux*) targ_emul=armelf_linux; targ_extra_emuls=armelf ;;
+arm*-*-conix*) targ_emul=armelf ;;
+thumb-*-linux-gnu* | thumb-*-uclinux*) targ_emul=armelf_linux; targ_extra_emuls=armelf ;;
strongarm-*-coff) targ_emul=armcoff ;;
strongarm-*-elf) targ_emul=armelf ;;
thumb-*-coff) targ_emul=armcoff ;;
m68*-*-netbsd*) targ_emul=m68knbsd ;;
m68*-*-psos*) targ_emul=m68kpsos ;;
m68*-*-rtems*) targ_emul=m68kcoff ;;
+hppa*w*-*) targ_emul=elf64hppa ;;
hppa*-*-*elf*) targ_emul=hppaelf ;;
+hppa*-*-linux-gnu*) targ_emul=hppaelf ;;
hppa*-*-lites*) targ_emul=hppaelf ;;
hppa*-*-rtems*) targ_emul=hppaelf ;;
vax-dec-ultrix* | vax-dec-bsd*) targ_emul=vax ;;
mips*-dec-ultrix*) targ_emul=mipslit ;;
mips*-dec-osf*) targ_emul=mipslit ;;
-mips*-sgi-irix[56]*) targ_emul=elf32bsmip ;;
+mips*-sgi-irix5*) targ_emul=elf32bsmip ;;
+mips*-sgi-irix6*) targ_emul=elf32bmipn32
+ targ_extra_emuls="elf32bsmip elf64bmip"
+ ;;
mips*-sgi-irix*) targ_emul=mipsbig ;;
mips*el-*-ecoff*) targ_emul=mipsidtl ;;
mips*-*-ecoff*) targ_emul=mipsidt ;;
mips*-*-elf*) targ_emul=elf32ebmip ;;
mips*el-*-rtems*) targ_emul=elf32elmip ;;
mips*-*-rtems*) targ_emul=elf32ebmip ;;
+mips*el-*-vxworks*) targ_emul=elf32elmip ;;
mips*-*-vxworks*) targ_emul=elf32ebmip ;;
mips*el-*-linux-gnu*) targ_emul=elf32lsmip
targ_extra_emuls="elf32bsmip mipslit mipsbig"
z8k-*-coff) targ_emul=z8002; targ_extra_emuls=z8001 ;;
ns32k-pc532-mach* | ns32k-pc532-ux*) targ_emul=pc532macha ;;
ns32k-pc532-netbsd* | ns32k-pc532-lites*) targ_emul=ns32knbsd ;;
-powerpc-*-linux-gnu*) targ_emul=elf32ppclinux; targ_extra_emuls=elf32ppc;;
+powerpc-*-linux-gnu*) targ_emul=elf32ppclinux; targ_extra_emuls=elf32ppc;
+ targ_extra_libpath=elf32ppc ;;
+pjl*-*-*) targ_emul=pjlelf ; targ_extra_emuls="elf_i386" ;;
+pj*-*-*) targ_emul=pjelf ;;
powerpc-*-elf* | powerpc-*-eabi* | powerpc-*-sysv* \
| powerpc-*-netbsd* | powerpc-*-vxworks*)
targ_emul=elf32ppc ;;