--- ld/configure.tgt.orig 2016-10-06 23:17:58.613189000 +0200 +++ ld/configure.tgt 2016-10-06 23:59:56.725506000 +0200 @@ -52,6 +52,8 @@ targ_extra_emuls="aarch64elf32 aarch64elf32b aarch64elfb armelf armelfb" ;; aarch64-*-cloudabi*) targ_emul=aarch64cloudabi targ_extra_emuls=aarch64cloudabib ;; +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 @@ -60,6 +62,10 @@ 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" @@ -90,6 +96,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) @@ -329,6 +340,25 @@ targ_extra_emuls="elf_iamcu i386bsd" ;; x86_64-*-dragonfly*) targ_emul=elf_x86_64 targ_extra_emuls="elf_i386 elf_iamcu elf_l1om elf_k1om" ;; +i[3-7]86-*-bsdsunix* | i[3-7]86-*-kbsdsunix*-gnu) + 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 elf_i386 elf_l1om elf_l1om_bsdsux elf_k1om elf_k1om_bsdsux" + targ_extra_libpath="elf_i386_bsdsux" + 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/'` ;; +amd64-*-bsdsunix*) + targ_emul=elf_x86_64_bsdsux + targ_extra_emuls="elf_i386_bsdsux elf_x86_64 elf_i386 elf_l1om elf_l1om_bsdsux elf_k1om elf_k1om_bsdsux" + targ_extra_libpath="elf_i386_bsdsux" + 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 elf_iamcu i386bsd" ;; @@ -399,6 +429,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" ;; @@ -541,6 +574,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 @@ -578,6 +627,18 @@ targ_extra_emuls="elf_i386 elf_iamcu" ;; 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" @@ -722,6 +783,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" @@ -834,6 +900,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' ;;