This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: Add support for Redox on i386 and x86_64
- From: Jeremy Soller <jackpot51 at gmail dot com>
- To: Alan Modra <amodra at gmail dot com>
- Cc: Nick Clifton <nickc at redhat dot com>, binutils at sourceware dot org
- Date: Wed, 4 Jan 2017 07:50:05 -0700
- Subject: Re: Add support for Redox on i386 and x86_64
- Authentication-results: sourceware.org; auth=none
- References: <CAPp=RpEL4mNJo7e0q_3vJaMJ_Ln4VQr_wDxyrYAbSP9A6QZ1bQ@mail.gmail.com> <011d0a50-4bfa-87f7-c9ce-519a2490f241@redhat.com> <20170104130434.GK31129@bubble.grove.modra.org>
I have rebased the patch here, removing the accidental cleanup in
gdb/configure.tgt, and using the already updated config.sub
diff --git a/bfd/config.bfd b/bfd/config.bfd
index 6b93b51..eac2369 100644
--- a/bfd/config.bfd
+++ b/bfd/config.bfd
@@ -754,6 +754,11 @@ case "${targ}" in
targ_selvecs="iamcu_elf32_vec i386_aout_linux_vec i386_pei_vec"
targ64_selvecs="x86_64_elf64_vec x86_64_elf32_vec x86_64_pei_vec
l1om_elf64_vec k1om_elf64_vec"
;;
+ i[3-7]86-*-redox*)
+ targ_defvec=i386_elf32_vec
+ targ_selvecs=
+ targ64_selvecs=x86_64_elf64_vec
+ ;;
i[3-7]86-*-nacl*)
targ_defvec=i386_elf32_nacl_vec
targ_selvecs="arm_elf32_nacl_be_vec arm_elf32_nacl_le_vec"
@@ -801,6 +806,11 @@ case "${targ}" in
targ_selvecs="i386_elf32_vec iamcu_elf32_vec x86_64_elf32_vec
i386_aout_linux_vec i386_pei_vec x86_64_pei_vec l1om_elf64_vec
k1om_elf64_vec"
want64=true
;;
+ x86_64-*-redox*)
+ targ_defvec=x86_64_elf64_vec
+ targ_selvecs=i386_elf32_vec
+ want64=true
+ ;;
x86_64-*-nacl*)
targ_defvec=x86_64_elf32_nacl_vec
targ_selvecs="i386_elf32_nacl_vec x86_64_elf64_nacl_vec
arm_elf32_nacl_be_vec arm_elf32_nacl_le_vec"
diff --git a/gas/configure.tgt b/gas/configure.tgt
index 2514015..7f5333f 100644
--- a/gas/configure.tgt
+++ b/gas/configure.tgt
@@ -250,6 +250,7 @@ case ${generic_target} in
case ${cpu}-${os} in
x86_64*-linux-gnux32) arch=x86_64:32 ;;
esac ;;
+ i386-*-redox*) fmt=elf ;;
i386-*-lynxos*) fmt=elf em=lynx ;;
i386-*-sysv[45]*) fmt=elf ;;
i386-*-solaris*) fmt=elf em=solaris ;;
diff --git a/gdb/configure.tgt b/gdb/configure.tgt
index 3f2603d..233db3d 100644
--- a/gdb/configure.tgt
+++ b/gdb/configure.tgt
@@ -700,6 +700,9 @@ x86_64-*-openbsd*)
i387-tdep.o i386-bsd-tdep.o i386-obsd-tdep.o \
obsd-tdep.o bsd-uthread.o solib-svr4.o"
;;
+x86_64-*-redox*)
+ gdb_target_obs="amd64-tdep.o i386-tdep.o i387-tdep.o i386-bsd-tdep.o"
+ ;;
x86_64-*-rtems*)
gdb_target_obs="amd64-tdep.o i386-tdep.o i387-tdep.o i386-bsd-tdep.o"
;;
diff --git a/ld/configure.tgt b/ld/configure.tgt
index 8f01b51..9a3c496 100644
--- a/ld/configure.tgt
+++ b/ld/configure.tgt
@@ -274,6 +274,10 @@ x86_64-*-linux-*) targ_emul=elf_x86_64
targ_extra_libpath="elf_i386 elf32_x86_64 elf_l1om elf_k1om"
tdir_i386linux=`echo ${targ_alias}aout | sed -e 's/x86_64/i386/'`
tdir_elf_i386=`echo ${targ_alias} | sed -e 's/x86_64/i386/'` ;;
+i[3-7]86-*-redox*) targ_emul=elf_i386
+ targ_extra_emuls=elf_x86_64 ;;
+x86_64-*-redox*) targ_emul=elf_x86_64
+ targ_extra_emuls=elf_i386 ;;
i[3-7]86-*-sysv[45]*) targ_emul=elf_i386
targ_extra_emuls=elf_iamcu ;;
i[3-7]86-*-solaris2*) targ_emul=elf_i386_sol2
On Wed, Jan 4, 2017 at 6:04 AM, Alan Modra <amodra@gmail.com> wrote:
> On Wed, Jan 04, 2017 at 12:38:56PM +0000, Nick Clifton wrote:
>> > diff --git a/config.sub b/config.sub
>>
>> Note - this file is shared between the binutils/gdb projects and the gcc
>> project, so any changes made here should also be reflected in the gcc
>> sources.
>
> Actually, we already have the redox change, imported 2016-12-31.
>
> Jeremy must have read the config.sub comment
> # Please send patches to <config-patches@gnu.org>.
> :-)
>
> --
> Alan Modra
> Australia Development Lab, IBM