--- binutils-2.26/bfd/config.bfd.orig 2016-02-29 14:15:53.000000000 +1100 +++ binutils-2.26/bfd/config.bfd 2016-02-29 15:52:38.000000000 +1100 @@ -169,7 +169,7 @@ # START OF targmatch.h #ifdef BFD64 - aarch64-*-elf) + aarch64-*-elf | aarch64-*-rtems*) targ_defvec=aarch64_elf64_le_vec targ_selvecs="aarch64_elf64_be_vec aarch64_elf32_le_vec aarch64_elf32_be_vec arm_elf32_le_vec arm_elf32_be_vec" want64=true @@ -675,7 +675,7 @@ targ_selvecs="i386_elf32_vec iamcu_elf32_vec l1om_elf64_vec k1om_elf64_vec" want64=true ;; - x86_64-*-elf*) + x86_64-*-elf* | x86_64-*-rtems*) targ_defvec=x86_64_elf64_vec targ_selvecs="i386_elf32_vec iamcu_elf32_vec x86_64_elf32_vec l1om_elf64_vec k1om_elf64_vec" want64=true --- binutils-2.26/gas/configure.tgt.orig 2016-02-29 16:06:25.000000000 +1100 +++ binutils-2.26/gas/configure.tgt 2016-02-29 16:00:55.000000000 +1100 @@ -6,12 +6,12 @@ # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3 of the License, or # (at your option) any later version. -# +# # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -# +# # You should have received a copy of the GNU General Public License # along with this program; see the file COPYING3. If not see # . @@ -120,7 +120,7 @@ generic_target=${cpu_type}-$vendor-$os # Note: This table is alpha-sorted, please try to keep it that way. case ${generic_target} in - aarch64*-*-elf) fmt=elf;; + aarch64*-*-elf | aarch64-*-rtems*) fmt=elf;; aarch64*-*-linux*) fmt=elf em=linux ;; alpha-*-*vms*) fmt=evax ;; @@ -354,7 +354,7 @@ moxie-*-uclinux) fmt=elf em=linux ;; moxie-*-moxiebox*) fmt=elf endian=little ;; moxie-*-*) fmt=elf ;; - + mt-*-elf) fmt=elf bfd_gas=yes ;; msp430-*-*) fmt=elf ;; @@ -463,7 +463,7 @@ visium-*-elf) fmt=elf ;; xstormy16-*-*) fmt=elf ;; - + xgate-*-*) fmt=elf ;; xtensa*-*-*) fmt=elf ;; --- binutils-2.26/ld/configure.tgt.orig 2016-02-29 15:49:14.000000000 +1100 +++ binutils-2.26/ld/configure.tgt 2016-02-29 15:51:59.000000000 +1100 @@ -47,7 +47,8 @@ case "${targ}" in aarch64_be-*-elf) targ_emul=aarch64elfb targ_extra_emuls="aarch64elf aarch64elf32 aarch64elf32b armelfb armelf" ;; -aarch64-*-elf) targ_emul=aarch64elf +aarch64-*-elf | aarch64-*-rtems*) + targ_emul=aarch64elf targ_extra_emuls="aarch64elf32 aarch64elf32b aarch64elfb armelf armelfb" ;; aarch64-*-cloudabi*) targ_emul=aarch64cloudabi targ_extra_emuls=aarch64cloudabib ;; @@ -314,7 +315,8 @@ targ_extra_emuls=elf_i386 ;; i[3-7]86-*-elf*) targ_emul=elf_i386 targ_extra_emuls=elf_iamcu ;; -x86_64-*-elf*) targ_emul=elf_x86_64 +x86_64-*-elf* | x86_64-*-rtems*) + targ_emul=elf_x86_64 targ_extra_emuls="elf_i386 elf_iamcu elf32_x86_64 elf_l1om elf_k1om" targ_extra_libpath="elf_i386 elf_iamcu elf32_x86_64 elf_l1om elf_k1om" tdir_elf_i386=`echo ${targ_alias} | sed -e 's/x86_64/i386/'`