Ada Toolchain for RTEMS 4.10/LEON3

Joel Sherrill joel.sherrill at OARcorp.com
Wed Apr 28 21:17:20 UTC 2010


On 04/28/2010 04:06 PM, Peter Mendham wrote:
>
> Dear all,
>
> I have a requirement for Ada support on RTEMS 4.10 and, although I 
> know that this is not currently supported, I thought I would give it a 
> try.  I have been following, roughly, the instructions on the wiki.  
> My current build attempt is based on:
>
> binutils 2.201.1
> gmp 5.0.1
> mpc 0.8.1
> mpfr 2.4.2
> newlib 1.18.0
> gcc 4.5.0
>
> I build sparc-rtems binutils, a multilibbed native gcc with C and Ada 
> support, a multilibbed sparc-rtems gcc with C and C++ support only, 
> followed by a multilibbed sparc-rtems gcc with C, C++ and Ada 
> support.  I specify a sysroot during the cross-compile builds.  
> Predictably, everything goes wrong for me during the final step.  The 
> build drops out with errors in gcc/ada/rts/socket.c.  These seem to be 
> related to missing types (especially struct servent).  I'm guessing 
> this should come from gsocket.h, and there are some interesting 
> comments in that file about RTEMS support but I'm afraid that I don't 
> understand a word of them.
>
> I previously tried a build with gcc 4.4.3 and got hung up on 
> s-oscons.ads generation, again preventing socket code from compiling 
> (but Ada code this time).
>
> Has anyone successfully built a multilibbed Ada toolchain for recent 
> RTEMS versions?  It looks some major issues have been resolved, 
> especially since the wiki entry was written.  Can anyone offer any advice?
>
Yes.  :-D

I can't speak for the accuracy of the wiki at the moment but the
scripts in the gcc-testing CVS module can build it.  The trick is
to build RTEMS with networking multilib'ed and install it
and the BSP you are interested in before building Ada.

http://www.rtems.org/pipermail/rtems-tooltestresults/2010-April/000337.html

There are  two patches from the SVN head you need that were
too late for the branch.

2010-04-15  Joel Sherrill <joel.sherrill at oarcorp.com>

         * g-socket.adb: A target can have multiple missing errno's.  This
         will result in multiple errno's being defined as -1.  Because 
of this
         we can not use a case but must use a series of if's to avoid
         a duplicate case error in GNAT.Sockets.Resolve_Error.

2010-04-13  Joel Sherrill <joel.sherrill at oarcorp.com>

         * gsocket.h: Run-time can no longer be built without network
         OS headers available.  Changing RTEMS GNAT build procedure to
         reflect this and letting run-time build use network .h files.

> Thanks in advance,
>
> Peter
>
> SciSys UK Limited. Registered in England and Wales No. 4373530.
> Registered Office: Methuen Park, Chippenham, Wiltshire SN14 0GB, UK.
> P Before printing, please think about the environment.


-- 
Joel Sherrill, Ph.D.             Director of Research&  Development
joel.sherrill at OARcorp.com        On-Line Applications Research
Ask me about RTEMS: a free RTOS  Huntsville AL 35805
    Support Available             (256) 722-9985


-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: gsocket.h.diff
URL: <http://lists.rtems.org/pipermail/users/attachments/20100428/adef8f47/attachment.ksh>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: g-socket.adb.diff
URL: <http://lists.rtems.org/pipermail/users/attachments/20100428/adef8f47/attachment-0001.ksh>


More information about the users mailing list