* Add support for Redox on i386 and x86_64
@ 2016-12-23 15:18 Jeremy Soller
2017-01-04 12:39 ` Nick Clifton
0 siblings, 1 reply; 4+ messages in thread
From: Jeremy Soller @ 2016-12-23 15:18 UTC (permalink / raw)
To: binutils
This set of changes will add support for the Redox OS target to GNU binutils.
diff --git a/bfd/config.bfd b/bfd/config.bfd
index 98663fd..9c4972c 100644
--- a/bfd/config.bfd
+++ b/bfd/config.bfd
@@ -677,6 +677,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"
@@ -724,6 +729,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/config.sub b/config.sub
index 2377e13..09a9302 100755
--- a/config.sub
+++ b/config.sub
@@ -1395,7 +1395,7 @@ case $os in
| -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
| -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
| -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
- | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
+ | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* | -redox* \
| -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
| -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
| -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es* \
diff --git a/gas/configure.tgt b/gas/configure.tgt
index 3e230cb..db87c1e 100644
--- a/gas/configure.tgt
+++ b/gas/configure.tgt
@@ -247,6 +247,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 d428dff..c30c82d 100644
--- a/gdb/configure.tgt
+++ b/gdb/configure.tgt
@@ -281,8 +281,8 @@ iq2000-*-*)
gdb_sim=../sim/iq2000/libsim.a
;;
-lm32-*-*)
- gdb_target_obs="lm32-tdep.o"
+lm32-*-*)
+ gdb_target_obs="lm32-tdep.o"
gdb_sim=../sim/lm32/libsim.a
;;
@@ -613,7 +613,7 @@ tic6x-*-*linux)
;;
tic6x-*-*)
- # Target: TI C6X
+ # Target: TI C6X
gdb_target_obs="tic6x-tdep.o"
;;
@@ -666,7 +666,7 @@ x86_64-*-dicos*)
gdb_target_obs="amd64-tdep.o i386-tdep.o i387-tdep.o \
dicos-tdep.o i386-dicos-tdep.o amd64-dicos-tdep.o"
;;
-x86_64-*-elf* | x86_64-*-rtems*)
+x86_64-*-elf* | x86_64-*-rtems* | x86_64-*-redox*)
gdb_target_obs="amd64-tdep.o i386-tdep.o i387-tdep.o i386bsd-tdep.o"
;;
x86_64-*-linux*)
diff --git a/ld/configure.tgt b/ld/configure.tgt
index c196e68..73b9f44 100644
--- a/ld/configure.tgt
+++ b/ld/configure.tgt
@@ -269,6 +269,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
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Add support for Redox on i386 and x86_64
2016-12-23 15:18 Add support for Redox on i386 and x86_64 Jeremy Soller
@ 2017-01-04 12:39 ` Nick Clifton
2017-01-04 13:04 ` Alan Modra
0 siblings, 1 reply; 4+ messages in thread
From: Nick Clifton @ 2017-01-04 12:39 UTC (permalink / raw)
To: Jeremy Soller, binutils
Hi Jeremy,
> This set of changes will add support for the Redox OS target to GNU binutils.
Please could you provide ChangeLog entries for the patch as well.
> diff --git a/bfd/config.bfd b/bfd/config.bfd
The changes to this file are OK.
> 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.
> diff --git a/gas/configure.tgt b/gas/configure.tgt
The changes to this file are OK.
> diff --git a/gdb/configure.tgt b/gdb/configure.tgt
Changes to GDB files should be submitted to the GDB mailing list.
They cannot be approved here. Also...
> @@ -281,8 +281,8 @@ iq2000-*-*)
> gdb_sim=../sim/iq2000/libsim.a
> ;;
>
> -lm32-*-*)
> - gdb_target_obs="lm32-tdep.o"
> +lm32-*-*)
> + gdb_target_obs="lm32-tdep.o"
> gdb_sim=../sim/lm32/libsim.a
> ;;
>
> @@ -613,7 +613,7 @@ tic6x-*-*linux)
> ;;
>
> tic6x-*-*)
> - # Target: TI C6X
> + # Target: TI C6X
> gdb_target_obs="tic6x-tdep.o"
> ;;
>
These two frags appear to be cosmetic changes, and unrelated to adding
redox support. I suspect that you will want to remove them.
> diff --git a/ld/configure.tgt b/ld/configure.tgt
The changes to this file are OK.
Cheers
Nick
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Add support for Redox on i386 and x86_64
2017-01-04 12:39 ` Nick Clifton
@ 2017-01-04 13:04 ` Alan Modra
2017-01-04 14:50 ` Jeremy Soller
0 siblings, 1 reply; 4+ messages in thread
From: Alan Modra @ 2017-01-04 13:04 UTC (permalink / raw)
To: Nick Clifton; +Cc: Jeremy Soller, binutils
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
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Add support for Redox on i386 and x86_64
2017-01-04 13:04 ` Alan Modra
@ 2017-01-04 14:50 ` Jeremy Soller
0 siblings, 0 replies; 4+ messages in thread
From: Jeremy Soller @ 2017-01-04 14:50 UTC (permalink / raw)
To: Alan Modra; +Cc: Nick Clifton, binutils
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
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2017-01-04 14:50 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-12-23 15:18 Add support for Redox on i386 and x86_64 Jeremy Soller
2017-01-04 12:39 ` Nick Clifton
2017-01-04 13:04 ` Alan Modra
2017-01-04 14:50 ` Jeremy Soller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).