Adding target OS 'RDOS' to binutils

classic Classic list List threaded Threaded
14 messages Options
Reply | Threaded
Open this post in threaded view
|

Adding target OS 'RDOS' to binutils

Leif Ekblad
How do I go about this so I don't have to do this anew for every new version
of binutils?

Information about RDOS: www.rdos.net/rdos

Regards,
Leif Ekblad



Reply | Threaded
Open this post in threaded view
|

Re: Adding target OS 'RDOS' to binutils

Ian Lance Taylor
"Leif Ekblad" <[hidden email]> writes:

> How do I go about this so I don't have to do this anew for every new version
> of binutils?

Write the patches, sign a copyright assignment, send them to this
mailing list.

Thanks.

Ian
Reply | Threaded
Open this post in threaded view
|

Re: Adding target OS 'RDOS' to binutils

Leif Ekblad
> Write the patches, sign a copyright assignment, send them to this
> mailing list.

OK. These patches are for version 2.12 of binutils.

config.sub file:

# Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any).
# Here we must recognize all the valid KERNEL-OS combinations.
maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
case $maybe_os in
  nto-qnx* | linux-gnu* | storm-chaos* | os2-emx* | windows32-* |
rtmk-nova*)
    os=-$maybe_os
    basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
    ;;
  rdos*)
 os=-rdos
 basic_machine=
 ;;
  *)
    basic_machine=`echo $1 | sed 's/-[^-]*$//'`
    if [ $basic_machine != $1 ]
    then os=`echo $1 | sed 's/.*-/-/'`
    else os=; fi
    ;;
esac

### Let's recognize common machines as not being operating systems so
### that things like config.sub decstation-3100 work.  We also
### recognize some manufacturers as not being operating systems, so we
### can provide default operating systems below.
case $os in

.....

 -rdos)
  basic_machine=i386-pc
  os=-rdos
  ;;
esac

# Decode manufacturer-specific aliases for certain operating systems.

if [ x"$os" != x"" ]
then
case $os in

....

 -rdos)
  os=-rdos
  ;;

....

 *)
  # Get rid of the `-' at the beginning of $os.
  os=`echo $os | sed 's/[^-]*-//'`
  echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2
  exit 1
  ;;
esac

configure.in:

case "${target}" in

....

  i[3456]86-*-coff | i[3456]86-*-elf | i[3456]86-*-rdos)
    if [ x${is_cross_compiler} != xno ] ; then
         target_configdirs="${target_configdirs} target-libstub
target-cygmon"
    fi
    ;;


bfd/config.bfd:

case "${targ}" in

.....

  i[3456]86-*-dgux* | i[3456]86-*-sysv5* | i[3456]86-*-rdos)
    targ_defvec=bfd_elf32_i386_vec
    targ_selvecs=i386coff_vec
    ;;

gas/configure

    # assign object format
    case ${generic_target} in

....

      i386-*-rdos*)         fmt=elf ;;

ld/configure.tgt

case "${targ}" in

....

i[3456]86-*-rdos*)  targ_emul=elf_i386 ;;


Regards,
Leif Ekblad

Reply | Threaded
Open this post in threaded view
|

Re: Adding target OS 'RDOS' to binutils

Mike Frysinger
On Wed, Nov 30, 2005 at 06:52:36PM +0100, Leif Ekblad wrote:
> >Write the patches, sign a copyright assignment, send them to this
> >mailing list.
>
> OK. These patches are for version 2.12 of binutils.

post the patches using `diff -Nurp` ... hand writing them doesnt
really help anyone ... also, make sure they apply against mainline
cvs (or just do it against binutils 2.16.91.0.4 and you should be fine)

> config.sub file:

this isnt part of binutils, you'll have to send the patch here:
http://savannah.gnu.org/projects/config
-mike
Reply | Threaded
Open this post in threaded view
|

RE: Adding target OS 'RDOS' to binutils

Dave Korn
In reply to this post by Leif Ekblad
Leif Ekblad wrote:
>> Write the patches, sign a copyright assignment, send them to this
>> mailing list.
>
> OK. These patches are for version 2.12 of binutils.


  As I'm sure Ian would also want to point out,

1)  patches must be generated by diff (generally "diff -pu" is preferred) so
they can be automatically applied with patch.
2)  patches must be against current CVS head (or a recent enough version that
they can be applied without any rejected sections).
3)  patches must be accompanied by a changelog entry in standard gnu changelog
format.



    cheers,
      DaveK
--
Can't think of a witty .sigline today....

Reply | Threaded
Open this post in threaded view
|

Re: Adding target OS 'RDOS' to binutils

Ian Lance Taylor
In reply to this post by Leif Ekblad
"Leif Ekblad" <[hidden email]> writes:

> config.sub file:

Patches to config.sub should be sent to [hidden email].

Please generate the patches using diff -u or diff -c from the original
file to the new file (e.g., diff -u ORIGINAL_FILE PATCHED_FILE).

Your patches are much more likely to be accepted if you generate them
against the current mainline, rather than against an old release.

Thanks.

Ian
Reply | Threaded
Open this post in threaded view
|

Re: Adding target OS 'RDOS' to binutils

Leif Ekblad
In reply to this post by Dave Korn
Dave:
> 1)  patches must be generated by diff (generally "diff -pu" is preferred)
> so
> they can be automatically applied with patch.

OK, I found "diff" for Windows, so this is no problem. Do you include the
text generated by diff in an email or send it as a file?

> 2)  patches must be against current CVS head (or a recent enough version
> that
> they can be applied without any rejected sections).

OK.

> 3)  patches must be accompanied by a changelog entry in standard gnu
> changelog
> format.

Anybody know how to generate this on a Windows-machine??
Can I write this in a editor?
Is there a web-page describing the standard format?

Sorry if I'm a novice about the GNU-projects.

Regards,
Leif Ekblad

Reply | Threaded
Open this post in threaded view
|

Re: Adding target OS 'RDOS' to binutils

Ian Lance Taylor
"Leif Ekblad" <[hidden email]> writes:

> Dave:
> > 1)  patches must be generated by diff (generally "diff -pu" is
> > preferred) so
> > they can be automatically applied with patch.
>
> OK, I found "diff" for Windows, so this is no problem. Do you include the
> text generated by diff in an email or send it as a file?

Either way is fine.

> > 3)  patches must be accompanied by a changelog entry in standard gnu
> > changelog
> > format.
>
> Anybody know how to generate this on a Windows-machine??
> Can I write this in a editor?
> Is there a web-page describing the standard format?

You can write it in an editor.  Look at the file ChangeLog to see the
format.  It is described here:
    http://www.gnu.org/prep/standards/html_node/Change-Logs.html#Change-Logs

Thanks.

Ian
Reply | Threaded
Open this post in threaded view
|

RE: Adding target OS 'RDOS' to binutils

Dave Korn
Ian Lance Taylor wrote:

> "Leif Ekblad" <[hidden email]> writes:
>
>> Dave:
>>> 1)  patches must be generated by diff (generally "diff -pu" is
>>> preferred) so they can be automatically applied with patch.
>>
>> OK, I found "diff" for Windows, so this is no problem. Do you include the
>> text generated by diff in an email or send it as a file?
>
> Either way is fine.


... but it's easier to make sure no lines get accidentally word-wrapped if you
attach it!



    cheers,
      DaveK
--
Can't think of a witty .sigline today....

Reply | Threaded
Open this post in threaded view
|

Re: Adding target OS 'RDOS' to binutils

Hans-Peter Nilsson-2
In reply to this post by Leif Ekblad
On Wed, 30 Nov 2005, Leif Ekblad wrote:
> Anybody know how to generate this on a Windows-machine??
> Can I write this in a editor?

"M-x add-change-log-entry" in Emacs gets the right format.

brgds, H-P
PS. Just in case you already had Emacs installed.  I'd suggest
not install it only for writing ChangeLog entries. :-)
Reply | Threaded
Open this post in threaded view
|

Patches for RDOS

Leif Ekblad
In reply to this post by Leif Ekblad
     2005-12-12  Leif Ekblad  [hidden email]

     * configure.in: Added support for target RDOS
     * bfd/config.bfd: Added RDOS targets
     * gas/configure.tgt: Added RDOS target format
     * ld/configure.tgt: Added RDOS target format


--- binutils-org/configure.in 2005-06-12 21:33:06.000000000 +0200
+++ binutils-2.16.1/configure.in 2005-12-12 15:16:53.000000000 +0100
@@ -722,6 +722,9 @@ case "${target}" in
mips*-*-*)
noconfigdirs="$noconfigdirs gprof ${libgcj}"
;;
+ i[[3456789]]86-*-rdos*)
+ noconfigdirs="$noconfigdirs gdb target-newlib target-libgloss"
+ ;;
romp-*-*)
noconfigdirs="$noconfigdirs bfd binutils ld gas opcodes target-libgloss
${libgcj}"
;;

--- binutils-org/bfd/config.bfd 2005-01-31 18:18:47.000000000 +0100
+++ binutils-2.16.1/bfd/config.bfd 2005-12-12 15:24:30.000000000 +0100
@@ -585,6 +585,10 @@ case "${targ}" in
# FIXME: This should eventually be checked at runtime.
targ_cflags=-DSTRICT_PE_FORMAT
;;
+ i[3-7]86-*-rdos*)
+ targ_defvec=bfd_elf32_i386_vec
+ targ_selvecs=i386coff_vec
+ ;;
i[3-7]86-*-mingw32* | i[3-7]86-*-cygwin* | i[3-7]86-*-winnt | i[3-7]86-*-pe)
targ_defvec=i386pe_vec
targ_selvecs="i386pe_vec i386pei_vec bfd_elf32_i386_vec"

--- binutils-org/gas/configure.tgt 2005-01-31 18:18:51.000000000 +0100
+++ binutils-2.16.1/gas/configure.tgt 2005-12-12 15:30:13.000000000 +0100
@@ -224,6 +224,7 @@ case ${generic_target} in
i386-*-nto-qnx*) fmt=elf ;;
i386-*-*nt*) fmt=coff em=pe ;;
i386-*-chaos) fmt=elf ;;
+ i386-*-rdos*) fmt=elf ;;
i860-*-*) fmt=elf endian=little ;;

--- binutils-org/ld/configure.tgt 2005-02-08 20:54:27.000000000 +0100
+++ binutils-2.16.1/ld/configure.tgt 2005-12-12 15:32:53.000000000 +0100
@@ -146,6 +146,7 @@ i[3-7]86-*-rtemscoff*) targ_emul=i386cof
i[3-7]86-*-rtemself*) targ_emul=elf_i386 ;;
i[3-7]86-*-rtems*) targ_emul=elf_i386 ;;
i[3-7]86-*-aros*) targ_emul=elf_i386 ;;
+i[3-7]86-*-rdos*) targ_emul=elf_i386 ;;
i[3-7]86-*-bsd) targ_emul=i386bsd ;;
i[3-7]86-*-bsd386) targ_emul=i386bsd ;;
i[3-7]86-*-bsdi*) targ_emul=i386bsd ;;

Regards,
Leif Ekblad
www.rdos.net/rdos




Reply | Threaded
Open this post in threaded view
|

Re: Patches for RDOS

Nick Clifton
Hi Leif,

>      2005-12-12  Leif Ekblad  [hidden email]
>
>      * configure.in: Added support for target RDOS
>      * bfd/config.bfd: Added RDOS targets
>      * gas/configure.tgt: Added RDOS target format
>      * ld/configure.tgt: Added RDOS target format

Approved and applied.

Sorry for the long delay in reviewing this patch - I have been very busy
elsewhere recently.

I assume that you will be submitting a patch to the config.sub
maintainer to add RDOS support to that file ?

Cheers
   Nick

Reply | Threaded
Open this post in threaded view
|

Re: Patches for RDOS

Leif Ekblad
Nick Clifton:
> Approved and applied.

OK, thanks
 
> Sorry for the long delay in reviewing this patch - I have been very busy
> elsewhere recently.
>
> I assume that you will be submitting a patch to the config.sub
> maintainer to add RDOS support to that file ?

This was approved 2 weeks ago. It doesn't seem like the config.sub
(and config.guess) file has been synchronized for a while.

Or am I misunderstanding this? You do synchronize this file with
http://savannah.gnu.org/projects/config?

Leif Ekblad


Reply | Threaded
Open this post in threaded view
|

Re: Patches for RDOS

Nick Clifton
Hi Leif,

>> I assume that you will be submitting a patch to the config.sub
>> maintainer to add RDOS support to that file ?
>
> This was approved 2 weeks ago. It doesn't seem like the config.sub
> (and config.guess) file has been synchronized for a while.

True - these files are sync'ed with their equivalents in the GCC
repository on an ad-hoc basis and those files have not yet been updated
with respect to the latest versions in the config project's repository.

Cheers
   Nick