From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: a07f3367d7,e085b6e4ce0fef39 X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,ASCII Path: g2news2.google.com!news3.google.com!feeder.news-service.com!de-l.enfer-du-nord.net!feeder1.enfer-du-nord.net!gegeweb.org!aioe.org!not-for-mail From: =?iso-8859-15?Q?Yannick_Duch=EAne_=28Hibou57=29?= Newsgroups: comp.lang.ada Subject: Re: Gnat cross compiler Date: Fri, 21 May 2010 11:26:04 +0200 Organization: Ada At Home Message-ID: References: <4166ab6d-ff7f-4c7c-b8c2-fdf4e371b414@l6g2000vbo.googlegroups.com> <677f7ffd-cb4f-44c4-8ead-f30137bbdfe2@r9g2000vbk.googlegroups.com> NNTP-Posting-Host: sVhUfbwyNmEklRD/bu2AWA.user.speranza.aioe.org Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-15; format=flowed; delsp=yes Content-Transfer-Encoding: Quoted-Printable X-Complaints-To: abuse@aioe.org X-Notice: Filtered by postfilter v. 0.8.2 User-Agent: Opera Mail/10.53 (Win32) Xref: g2news2.google.com comp.lang.ada:11841 Date: 2010-05-21T11:26:04+02:00 List-Id: Le Fri, 21 May 2010 09:31:25 +0200, Alexis = a =E9crit: > 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 (excepti= on = 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 architectur= e, = 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 architectur= e, = 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 bina= ry = applications format. You may find LD specific builds which can handle both Windows and ELF fo= r = 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-compile= r, = I would agree to send you mine via e-mail. But I would not provide suppo= rt = for it (or may be if... well let me know), and I must say this is a MinG= W = 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.