From: "Yannick Duchêne (Hibou57)" <yannick_duchene@yahoo.fr>
Subject: Re: Gnat cross compiler
Date: Fri, 21 May 2010 11:26:04 +0200
Date: 2010-05-21T11:26:04+02:00 [thread overview]
Message-ID: <op.vc1ttqy9xmjfy8@garhos> (raw)
In-Reply-To: 677f7ffd-cb4f-44c4-8ead-f30137bbdfe2@r9g2000vbk.googlegroups.com
Le Fri, 21 May 2010 09:31:25 +0200, Alexis
<jose_alexis_paez_thurgood@hotmail.com> a écrit:
> Thanks for your reply. I have decided to stop trying to compile libada
> and have managed to get the cross compiler to work by setting the RTS
> option to \cygwin\lib\gcc\i686-pc-cygwin\4.3.4, which is where the
> adainclude and adalib for the ada compiler bundled with Cygwin.
>
> So far so good, but this makes me wonder, what is the RTS used for? Is
> this now a real cross compiler as I'm using the RTS for the i686-pc-
> cygwin target?
>
> My guess is I should be using a proper i696-elf Ada RTS, right?
>
> Best regards, Alexis.
RTS stands for RunTime System. This is the GNAT runtime library (exception
handling, package elaboration, dispatching, and etc).
GNAT for Windows, is shipped with an RTS for Windows only. To target
Linux, you need an RTS for Linux... for Linux and the target architecture,
as Linux runs on multiple architectures (well, you've said the
architecture is Intel, so there should not be any trouble there).
The RTS is not the sole thing to be related to target OS and target
architecture : the Ada standard packages also have dependencies to that,
at least, the package named Standard.
So, even if you have a copy of the RTS for the target OS and architecture,
you will also need the standard packages for that OS and architecture.
You will also need a linker which can handle the OS target binary
application format.
GNAT on Windows is shipped with an LD which can only handle Windows binary
applications format.
You may find LD specific builds which can handle both Windows and ELF for
Intel architecture, however, this would not work. I know this would not
work, because I tried it in the past (that was the reason why I finally
decided to build my own cross-compiler).
All of that, to say if you want to cross-compile, you *really need* a
cross-compile tool chain : a gcc-ada cross-compiler with target RTS and
packages, some binutils for the target and an LD for the target.
I you are really in troubles with that, or fail to build a cross-compiler,
I would agree to send you mine via e-mail. But I would not provide support
for it (or may be if... well let me know), and I must say this is a MinGW
based cross-compiler, not Cygwin. It was also built to target i386, not
i686. By the way, I'm not sure I built it with C++ enabled (will have to
check).
Note: I could not really help you with building a cross-compiler with
Cygwin, as I suspect the related issues to be not the same as with MinGW.
The only thing I'm pretty sure about, reading your initial post, is that
your sysroot is not properly setup.
--
There is even better than a pragma Assert: a SPARK --# check.
next prev parent reply other threads:[~2010-05-21 9:26 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-05-20 14:29 Gnat cross compiler Alexis
2010-05-20 15:49 ` Yannick Duchêne (Hibou57)
2010-05-21 7:31 ` Alexis
2010-05-21 9:26 ` Yannick Duchêne (Hibou57) [this message]
2010-05-24 15:44 ` Alexis
-- strict thread matches above, loose matches on Subject: below --
1997-02-12 0:00 T/KP David Karlsson
1997-02-12 0:00 T/KP David Karlsson
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox