--- bfd/config.bfd.orig 2014-10-14 08:32:02.000000000 +0100 +++ bfd/config.bfd 2015-09-03 19:44:36.000000000 +0100 @@ -615,7 +620,7 @@ targ_selvecs="i386_elf32_vec i386_aout_bsd_vec" targ_underscore=yes ;; - i[3-7]86-*-openbsd*) + i[3-7]86-*-openbsd* | i[3-7]86-*-bitrig*) targ_defvec=i386_elf32_vec targ_selvecs=i386_aout_nbsd_vec ;; @@ -666,7 +671,7 @@ targ_selvecs="i386_elf32_fbsd_vec i386_coff_vec i386_pei_vec x86_64_pei_vec i386_elf32_vec x86_64_elf64_vec l1om_elf64_vec l1om_elf64_fbsd_vec k1om_elf64_vec k1om_elf64_fbsd_vec" want64=true ;; - x86_64-*-netbsd* | x86_64-*-openbsd*) + x86_64-*-netbsd* | x86_64-*-openbsd* | x86_64-*-bitrig*) targ_defvec=x86_64_elf64_vec targ_selvecs="i386_elf32_vec i386_aout_nbsd_vec i386_coff_vec i386_pei_vec x86_64_pei_vec l1om_elf64_vec k1om_elf64_vec" want64=true --- bfd/configure.orig 2014-12-23 14:22:04.000000000 +0000 +++ bfd/configure 2015-09-03 19:44:36.000000000 +0100 @@ -14175,7 +14175,7 @@ x86_64-*-linux*) CORE_HEADER='"hosts/x86-64linux.h"' ;; - x86_64-*-netbsd* | x86_64-*-openbsd*) + x86_64-*-netbsd* | x86_64-*-openbsd* | x86_64-*-bitrig*) COREFILE=netbsd-core.lo ;; esac --- bfd/configure.ac.orig 2014-10-14 08:32:02.000000000 +0100 +++ bfd/configure.ac 2015-09-03 19:44:36.000000000 +0100 @@ -311,7 +311,7 @@ TRAD_HEADER='"hosts/i386bsd.h"' ;; changequote(,)dnl - i[3-7]86-*-netbsd* | i[3-7]86-*-knetbsd*-gnu | i[3-7]86-*-openbsd*) + i[3-7]86-*-netbsd* | i[3-7]86-*-knetbsd*-gnu | i[3-7]86-*-openbsd* | i[3-7]86-*-bitrig*) changequote([,])dnl COREFILE=netbsd-core.lo ;; @@ -485,7 +485,7 @@ x86_64-*-linux*) CORE_HEADER='"hosts/x86-64linux.h"' ;; - x86_64-*-netbsd* | x86_64-*-openbsd*) + x86_64-*-netbsd* | x86_64-*-openbsd* | x86_64-*-bitrig*) COREFILE=netbsd-core.lo ;; esac --- gas/configure.tgt.orig 2014-10-14 08:32:03.000000000 +0100 +++ gas/configure.tgt 2015-09-03 19:44:36.000000000 +0100 @@ -231,6 +232,7 @@ i386-*-openbsd[0-2].* | \ i386-*-openbsd3.[0-2]) fmt=aout em=nbsd ;; i386-*-openbsd*) fmt=elf em=nbsd ;; + i386-*-bitrig*) fmt=elf em=nbsd ;; i386-*-linux*aout*) fmt=aout em=linux ;; i386-*-linux*oldld) fmt=aout em=linux ;; i386-*-linux*coff*) fmt=coff em=linux ;; --- ld/configure.tgt.orig 2014-10-14 08:32:04.000000000 +0100 +++ ld/configure.tgt 2015-09-03 19:44:36.000000000 +0100 @@ -282,6 +283,11 @@ *) tdir_elf_i386=`echo ${tdir_elf_i386} | \ sed -e 's/netbsd/netbsdelf/'`;; esac ;; +i[3-7]86-*-bitrig*) targ_emul=i386nbsd + targ_extra_emuls=elf_i386 ;; +x86_64-*-bitrig*) targ_emul=elf_x86_64 + targ_extra_emuls="elf_i386 i386nbsd elf_l1om elf_k1om" + ;; i[3-7]86-*-netware) targ_emul=i386nw ;; i[3-7]86-*-elf*) targ_emul=elf_i386 ;; x86_64-*-elf*) targ_emul=elf_x86_64