--- ld/configure.tgt.orig 2014-10-14 09:32:04.000000000 +0200 +++ ld/configure.tgt 2016-10-25 12:19:00.247859000 +0200 @@ -49,12 +49,20 @@ targ_extra_emuls="aarch64elf aarch64elf32 aarch64elf32b armelfb armelf" ;; aarch64-*-elf) targ_emul=aarch64elf targ_extra_emuls="aarch64elf32 aarch64elf32b aarch64elfb armelf armelfb" ;; +aarch64-*-bsdsunix*) targ_emul=aarch64bsdsux + targ_extra_emuls="aarch64bsdsuxb aarch64elf" ;; +aarch64-*-freebsd*) targ_emul=aarch64fbsd + targ_extra_emuls="aarch64fbsdb aarch64elf" ;; aarch64_be-*-linux*) targ_emul=aarch64linuxb targ_extra_libpath="aarch64linux aarch64linux32 aarch64linux32b armelfb_linux_eabi armelf_linux_eabi" targ_extra_emuls="aarch64elfb aarch64elf aarch64elf32 aarch64elf32b armelfb armelf $targ_extra_libpath" ;; aarch64-*-linux*) targ_emul=aarch64linux targ_extra_libpath="aarch64linuxb aarch64linux32 aarch64linux32b armelfb_linux_eabi armelf_linux_eabi" targ_extra_emuls="aarch64elf aarch64elf32 aarch64elf32b aarch64elfb armelf armelfb $targ_extra_libpath" ;; +alpha*-*-bsdsunix* | alpha*-*-kbsdsunix*-gnu) + targ_emul=elf64alpha_bsdsux + targ_extra_emuls="elf64alpha alpha" + tdir_alpha=`echo ${targ_alias} | sed -e 's/bsdsunix/bsdsunixecoff/'` ;; alpha*-*-freebsd* | alpha*-*-kfreebsd*-gnu) targ_emul=elf64alpha_fbsd targ_extra_emuls="elf64alpha alpha" @@ -81,6 +89,11 @@ arm-*-aout | armel-*-aout) targ_emul=armaoutl ;; armeb-*-aout) targ_emul=armaoutb ;; arm-*-coff) targ_emul=armcoff ;; +arm*b-*-bsdsunix*) targ_emul=armelfb_bsdsux + targ_extra_emuls="armelf_bsdsux armelf" ;; +arm*-*-bsdsunix* | arm-*-kbsdsunix*-gnu) + targ_emul=armelf_bsdsux + targ_extra_emuls="armelfb_bsdsux armelf" ;; arm*b-*-freebsd*) targ_emul=armelfb_fbsd targ_extra_emuls="armelf_fbsd armelf" ;; arm*-*-freebsd* | arm-*-kfreebsd*-gnu) @@ -296,6 +309,17 @@ targ_extra_emuls="i386bsd" ;; x86_64-*-dragonfly*) targ_emul=elf_x86_64 targ_extra_emuls="elf_i386 elf_l1om elf_k1om" ;; +i[3-7]86-*-bsdsunix*) + targ_emul=elf_i386_bsdsux + targ_extra_emuls="elf_i386 i386bsd" ;; +x86_64-*-bsdsunix*) + targ_emul=elf_x86_64_bsdsux + targ_extra_emuls="elf_i386_bsdsux elf_x86_64 elf32_x86_64 elf_i386 elf_l1om elf_l1om_bsdsux elf_k1om elf_k1om_bsdsux" + targ_extra_libpath="elf_i386_bsdsux elf32_x86_64" + tdir_elf_i386_bsdsux=`echo ${targ_alias} \ + | sed -e 's/x86_64/i386/'` + tdir_elf_i386=`echo ${targ_alias} \ + | sed -e 's/x86_64/i386/'` ;; i[3-7]86-*-freebsd* | i[3-7]86-*-kfreebsd*-gnu) targ_emul=elf_i386_fbsd targ_extra_emuls="elf_i386 i386bsd" ;; @@ -363,6 +387,9 @@ i960-*-elf*) targ_emul=elf32_i960 ;; ia64-*-elf*) targ_emul=elf64_ia64 ;; +ia64-*-bsdsunix* | ia64-*-kbsdsunix*-gnu) + targ_emul=elf64_ia64_bsdsux + targ_extra_emuls="elf64_ia64" ;; ia64-*-freebsd* | ia64-*-kfreebsd*-gnu) targ_emul=elf64_ia64_fbsd targ_extra_emuls="elf64_ia64" ;; @@ -504,6 +531,22 @@ targ_emul=elf32btsmip_fbsd targ_extra_emuls="elf32ltsmip elf32btsmip elf32ltsmipn32 elf32btsmipn32 elf64ltsmip elf64btsmip elf32ltsmip_fbsd elf32btsmipn32_fbsd elf32ltsmipn32_fbsd elf64ltsmip_fbsd elf64btsmip_fbsd" targ_extra_libpath=$targ_extra_emuls ;; +mips64*el-*-bsdsunix* | mips64*el-*-kbsdsunix*-gnu) + targ_emul=elf32ltsmipn32_bsdsux + targ_extra_emuls="elf32ltsmip elf32btsmip elf32ltsmipn32 elf32btsmipn32 elf64ltsmip elf64btsmip elf32ltsmip_bsdsux elf32btsmip_bsdsux elf32btsmipn32_bsdsux elf64ltsmip_bsdsux elf64btsmip_bsdsux" + targ_extra_libpath=$targ_extra_emuls ;; +mips64*-*-bsdsunix* | mips64*-*-kbsdsunix*-gnu) + targ_emul=elf32btsmipn32_bsdsux + targ_extra_emuls="elf32ltsmip elf32btsmip elf32ltsmipn32 elf32btsmipn32 elf64ltsmip elf64btsmip elf32ltsmip_bsdsux elf32btsmip_bsdsux elf32ltsmipn32_bsdsux elf64ltsmip_bsdsux elf64btsmip_bsdsux" + targ_extra_libpath=$targ_extra_emuls ;; +mips*el-*-bsdsunix* | mips*el-*-kbsdsunix*-gnu) + targ_emul=elf32ltsmip_bsdsux + targ_extra_emuls="elf32ltsmip elf32btsmip elf32ltsmipn32 elf32btsmipn32 elf64ltsmip elf64btsmip elf32ltsmipn32_bsdsux elf32btsmip_bsdsux elf32btsmipn32_bsdsux elf64ltsmip_bsdsux elf64btsmip_bsdsux" + targ_extra_libpath=$targ_extra_emuls ;; +mips*-*-bsdsunix* | mips*-*-kbsdsunix*-gnu) + targ_emul=elf32btsmip_bsdsux + targ_extra_emuls="elf32ltsmip elf32btsmip elf32ltsmipn32 elf32btsmipn32 elf64ltsmip elf64btsmip elf32ltsmip_bsdsux elf32btsmipn32_bsdsux elf32ltsmipn32_bsdsux elf64ltsmip_bsdsux elf64btsmip_bsdsux" + targ_extra_libpath=$targ_extra_emuls ;; mips*-*-sysv4*) targ_emul=elf32btsmip ;; mmix-*-*) targ_emul=mmo @@ -541,6 +584,18 @@ pjl*-*-*) targ_emul=pjlelf ; targ_extra_emuls="elf_i386" ;; pj*-*-*) targ_emul=pjelf ;; +powerpc-*-bsdsunix* | powerpc-*-kbsdsunix*-gnu) + targ_emul=elf32ppc_bsdsux + targ_extra_emuls="elf32ppc elf32ppcsim" + targ_extra_libpath=elf32ppc; + tdir_elf32ppcsim=`echo ${targ_alias} | sed -e 's/ppc/ppcsim/'` ;; +powerpc64-*-bsdsunix*) + targ_emul=elf64ppc_bsdsux + targ_extra_emuls="elf64ppc elf32ppc_bsdsux elf32ppc" + targ_extra_libpath="elf32ppc_bsdsux elf32ppc" + tdir_elf32ppc=`echo "${targ_alias}" | sed -e 's/64//'` + tdir_elf32ppc_bsdsux=$tdir_elf32ppc + ;; powerpc-*-freebsd* | powerpc-*-kfreebsd*-gnu) targ_emul=elf32ppc_fbsd targ_extra_emuls="elf32ppc elf32ppcsim" @@ -680,6 +735,11 @@ sparc*-*-elf) targ_emul=elf32_sparc ;; sparc*-*-sysv4*) targ_emul=elf32_sparc ;; sparc*-*-vxworks*) targ_emul=elf32_sparc_vxworks ;; +sparc64-*-bsdsunix* | sparcv9-*-bsdsunix* | sparc64-*-kbsdsunix*-gnu | sparcv9-*-kbsdsunix*-gnu) + targ_emul=elf64_sparc_bsdsux + targ_extra_emuls="elf64_sparc elf32_sparc" + targ_extra_libpath=$targ_extra_emuls + tdir_elf32_sparc=`echo ${targ_alias} | sed -e 's/64//'` ;; sparc64-*-freebsd* | sparcv9-*-freebsd* | sparc64-*-kfreebsd*-gnu | sparcv9-*-kfreebsd*-gnu) targ_emul=elf64_sparc_fbsd targ_extra_emuls="elf64_sparc elf32_sparc" @@ -788,6 +848,10 @@ NATIVE_LIB_DIRS='/lib /usr/lib /usr/pkg/lib /usr/local/lib' ;; +*-*-bsdsunix*) + NATIVE_LIB_DIRS='/lib /usr/lib /usr/local/lib' + ;; + *-*-freebsd*) NATIVE_LIB_DIRS='/lib /usr/lib /usr/local/lib' ;;