[ECOS] GCC: different OS targets.

Brendan Simon brendan@dgs.monash.edu.au
Sun Aug 22 17:54:00 GMT 1999


There seems to be different builds of egcs/gcc for various Operating
Systems (eg. eCos, RTEMS).  I predominantly use the powerpc-eabi
target.  I currently use it with No OS (NOS) on some MPC860 boards but
would like to use an OS.  Both RTEMS and eCos use EABI as well, so the
same compiler should be useable for GCC targeting RTEMS, eCos and NOS.

I would like to be able to build gcc _ONCE_ for powerpc-eabi and be able
to build the RTEMS, eCos (or any other OS) libraries and install them in
an appropriate place.  This not only saves a lot of disk space but also
a lot time recompiling for each OS evertime a new version of GCC is
released (or snapshots).

I figure that the -m switch might be appropriate for choosing the
operating system.  Powerpc has a -mads (amongst others) switch which
links the ads crt0.o file and libads via the specs file.  Does the specs
file only work with the -m switch all will it work with any other swtich
?  The -m switch could be used to select the operating system.  eg. "-m
ads-rtems" or "-m rtems-ads".  A separate directory for the OS stuff
would be setup in $prefix$target/$os  (eg. /usr/local/gcc/rtems/include
and /usr/local/gcc/rtems/lib) or maybe $prefix/$target/os/$os (eg.
/usr/local/gcc/os/rtems/... or /usr/local/gcc/os/none/...).

I know this would take some cooperation between the OS vendors that
support GCC but I believe that it would be worth it.  Please voice your
opinion if you think this is a good or bad idea.

Brendan Simon.

PS. I have used eCos and RTEMS as examples only.  I'm sure there are
other OSs that use gcc (vxworks) that would benefit from a formal mehod
of implemting multiple OSs using the one compiler.



More information about the Ecos-discuss mailing list