comp.lang.ada
 help / color / mirror / Atom feed
From: anon@anon.org (anon)
Subject: Re: Reducing the size of executables produced by GNAT
Date: Thu, 14 Feb 2008 10:53:36 GMT
Date: 2008-02-14T10:53:36+00:00	[thread overview]
Message-ID: <Q4Vsj.599196$kj1.428603@bgtnsc04-news.ops.worldnet.att.net> (raw)
In-Reply-To: 3ff060f5-673b-4011-a0d1-1692d6e6f105@e10g2000prf.googlegroups.com

To use the "--RTS=" or "-fRTS=" feature all you do is create the 
following structure:

        /myrts
                /adainclude
                        ada.ads ----- must be here
                        system.ads -- must be here 

                        a-textio.adb -- user created version
                        a-textio.ads
                        ...
                /adalib
                        ada.ali ----- must be here
                        ada.o 
                        system.ali -- must be here
                        system.o 

                        a-textio.ali -- user created version
                        a-textio.o 
                        ...

        The "Ada.ads" and "System.ads" should be copied from the 
        Standard installed ada system.
        All RTS source files should be inserted into the "adainclude"
        All RTS "*.ali" and RTS "*.o" files should be inserted in 
        "adalib"

        Edit a copy of Ada.Text_IO (a-textio.ad?) so that it only 
        includes the IO routines that you need. And that means 
        deleting the exceptions and file structures. Use Import 
        statement to link to OS,

        To compile the RTS you must use "-gnatg" in command line 
        for all language packages or sub-packages.


To use:

        gnat compile <program/user package>.ad[b|s] -fRTS=myrts
        gnat bind <program/user package>.ali -fRTS=myrts
        gnat link <program>.ali -fRTS=myrts

        You could also add "-nostdinc" to insure that the standard Ada 
is not included or search. The "-nostdlib" added also on the link 
command.

        As you perform each of the three commands you might see error 
that you need to fix. Such as adding other packages that your RTS 
needs and you may have to copy or rewrite.




In <3ff060f5-673b-4011-a0d1-1692d6e6f105@e10g2000prf.googlegroups.com>, Hibou57 <yannick_duchene@yahoo.fr> writes:
>On 13 f=E9v, 22:27, Gautier <gaut...@fakeaddress.nil> wrote:
>> * For instance make a preprocessor for Ada (to begin with, a small subset =
>of
>> Ada) that spits FreePascal code. Then you would have your small "fixed cos=
>t" for
>> free with FreeAda (=3D preprocessor + FreePascal).
>> * Alternatively, build an Ada front-end to the FreePascal compiler.
>Better create a compiler from the ground up than playing such
>dangerous game (hihi).
>
>> * Consider using another Ada compiler than GNAT to that purpose.
>The fact is that GNAT is a monopol in this area. There use to be
>SmallAda, and =B5Ada, which were rahter Ada interpreters. Just look for
>"Ada compiler", on any search engine, and you will always be bringed
>to "GNAT", in one way in an other.
>
>> Have you ever tried to have your own daemon on a shared host
>> in any decent hosting company?
>LOL
>
>Yes, if it would have been possible, I would have done it from a long.
>
>Just to come back to GNAT and its runtime, I will have a look at the
>RTS source code. Pffff.... that's too much, and I feel as in an idle
>state :p
>
>It seems that they is an option --RTS=3Dsjlj to use a kind of "long
>jump" =E0 la C, but I do not know if it is smaller, and I can't test it
>beceause the compiler said it can't find the runtime (there is just
>one RTS, both in my Windows and Linux GNAT installation).
>
>Have a nice day




  parent reply	other threads:[~2008-02-14 10:53 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-02-13 11:52 Reducing the size of executables produced by GNAT Hibou57
2008-02-13 14:38 ` Martin Krischik
2008-02-13 20:03   ` Hibou57
2008-02-13 20:25     ` Pascal Obry
2008-02-13 21:41       ` Maciej Sobczak
2008-02-13 23:35         ` Ludovic Brenta
2008-02-13 20:37     ` tmoran
2008-02-14 10:12       ` Georg Bauhaus
2008-02-14 11:07         ` Ludovic Brenta
2008-02-14 22:07           ` Hibou57
2008-02-15  0:19             ` Robert A Duff
2008-02-13 21:27     ` Gautier
2008-02-13 22:14       ` Hibou57
2008-02-14 10:34         ` Georg Bauhaus
2008-02-14 10:53         ` anon [this message]
2008-02-15  5:52         ` Randy Brukardt
2008-02-15  5:52         ` Randy Brukardt
2008-02-15  5:52         ` Randy Brukardt
2008-02-19  0:41           ` Hibou57
2008-02-13 14:50 ` gautier_niouzes
2008-02-13 15:41   ` Pascal Obry
2008-02-13 15:52 ` Ludovic Brenta
2008-02-13 16:19 ` anon
2008-02-13 16:28   ` Pascal Obry
2008-02-13 17:34 ` Tero Koskinen
2008-02-13 21:32 ` Jeffrey R. Carter
2008-02-14  6:58 ` Jacob Sparre Andersen
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox