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 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,db8388c6b42d398 X-Google-Attributes: gid103376,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!postnews.google.com!p23g2000prp.googlegroups.com!not-for-mail From: Ludovic Brenta Newsgroups: comp.lang.ada Subject: Re: How do I go about creating a minimal GNAT runtime? Date: Sun, 25 Jan 2009 03:13:12 -0800 (PST) Organization: http://groups.google.com Message-ID: <3eff96d5-50ff-4cd2-84ad-ab5e8342aaaa@p23g2000prp.googlegroups.com> References: NNTP-Posting-Host: 94.108.158.221 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Trace: posting.google.com 1232881995 5725 127.0.0.1 (25 Jan 2009 11:13:15 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Sun, 25 Jan 2009 11:13:15 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: p23g2000prp.googlegroups.com; posting-host=94.108.158.221; posting-account=pcLQNgkAAAD9TrXkhkIgiY6-MDtJjIlC User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.8.1.18) Gecko/20081030 Iceape/1.1.13 (Debian-1.1.13-1),gzip(gfe),gzip(gfe) Xref: g2news1.google.com comp.lang.ada:3487 Date: 2009-01-25T03:13:12-08:00 List-Id: On Jan 24, 9:47 pm, Lucretia wrote: > Hi (again), > > It's been a while, but I'm coming back to my Ada kernel again. I've > been messing with my helo_world_kernel which I built using no runtime > (seehttp://www.archeia.comfor more info). > > Having just spoken to Ludovic on #Ada, he pointed out that the gnat > tools can use a basic cross tool set, like the ones I have built > myself (again, see the above link). My toolset comprises of a gnat1 > compiler and a gnatbind for my targets. I found that it does work > using the --GCC and --GNATBIND flags, and I need to make sure the > cross tools and the host tools are of the same GCC version otherwise > GNAT throws up ALI format errors. That sounds reasonable. gnatmake (a host tool) reads the .ali files to decide what it needs to recompile. Then it calls the cross compiler (cross gcc), which produces new .o and .ali files, and then the cross binder (gnatbind). I'm not entirely sure whether gnatlink is a host-only tool, or if you need a cross version of it. In any case you do need a cross ld. > The thing is, I've been trying to enable exceptions, but keep coming > across big problems in that the runtime requires features that are > being restricted, such as returning aggregates and assigning > composites, returning unconstrained objects which requires the > secondary stack. So, what I really need to know is, how do I create a > runtime which is restricted in this way for bare hw access? I don't know the relationship (if any) between exception propagation, exception handling and the secondary stack. Xavier Grave does :) Have you had a look at the OS Lovelace sources? OS Lovelace supports exceptions in th kernel; it does that by building a minimal, patched, GNAT runtime into the kernel. -- Ludovic Brenta.