[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Cross Toolchains "Squeeze" Release Goals



Hello Ludovic,

  I was not planning to work on gnat cross compiler, at least right
now, with so many things coming up to Emdebian project. I just wanted
to clarify that, but surely I think it would be nice to have such
compiler in {Em}Debian.

2009/8/12 Ludovic Brenta <ludovic@ludovic-brenta.org>:
> Selon Hector Oron <hector.oron@gmail.com>:
>> 2009/8/12 Ludovic Brenta <ludovic@ludovic-brenta.org>:
>>> What kind of target do you have in mind? armel bare-board? with uClibc?
>>> with EmDebian? with full Debian?
>>
>> I personally do not know a bit on ada, I should learn sometime, as I
>> have heard it is very suitable for satefy systems. The target really
>> does not matter as what we try, IIRC, it is already supported by
>> upstream, we just need gcc-source package to produce an
>> arm-linux-gnueabi-gnat compiler. The binaries will be part of Emdebian
>> repository and if Debian agrees and it has a doable amount of users,
>> Debian might be interested on having those. But, surely you should be
>> able to build a cross gnat package in from Debian sources when this
>> work is done.
>
> Yes, the target does matter; we need not only a cross-compiler but also a
> run-time library (libgnat-4.4.so.1 and/or libgnat.a).  The run-time library
> is needed for exceptions and for multitasking (Ada has multitasking built
> in).  On GNU/Linux, the compiler translates tasking constructs into calls to
> POSIX Threads (i.e. glibc or eglibc), so the Ada run-time library requires it
> along with a Linux or FreeBSD kernel.  OTOH, on bare-board targets, the
> compiler and run-time library can together implement a minimalistic
> multitasking kernel.  There are additional targets running various embedded
> real-time kernels but I don't think we'll have the manpower to test those.

Until today, we took runtime libraries from de binary packages built
natively on the target architectures and apply dpkg-cross over it
which places the needed runtime libraries in the right place in out
host architecture. This is also true for kernel-headers and C library.

For example, you get libgnat-4.4.so.1 and/or libgnat.a from the armel
binary package(s) (libgnat-4.4) and dpkg-cross them. Once you have C
library, binutils and kernel headers in its place, then you can built
your outstanding compiler. To have a tech idea on the concept, you can
check [1] or [2]
Right now, we are working towards removing dpkg-cross dependency,
which implies having to implement the way to build this runtime
libraries from source instead dpkg-cross them, so 1st stage bootstrap
of the cross compiler needs to be implemented.

There is a visualization graph[3] that might help you understand the
process, I also need to write a wiki page explaining it all, but Ada
compiler I believe might not be much different from C cross compiler.

Cheers :-)

[1] http://www.emdebian.org/docs/slind-toolchain.html
[2] http://wiki.debian.org/BuildingCrossCompilers
[3] http://www.emdebian.org/~zumbi/docs/deps.pdf
-- 
 Héctor Orón


Reply to: