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=-0.9 required=5.0 tests=BAYES_00,FORGED_GMAIL_RCVD, FREEMAIL_FROM autolearn=no autolearn_force=no version=3.4.4 Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!mx02.eternal-september.org!feeder.eternal-september.org!feeder.erje.net!eu.feeder.erje.net!enother.net!enother.net!peer02.iad.highwinds-media.com!news.highwinds-media.com!feed-me.highwinds-media.com!post02.iad.highwinds-media.com!fx30.iad.POSTED!not-for-mail From: Shark8 User-Agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:36.0) Gecko/20100101 Thunderbird/36.0a1 MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: Size of linked program increasing with new version of GNAT. References: <7f38a07d-3f73-432c-8647-e3a7dcf43637@googlegroups.com> In-Reply-To: <7f38a07d-3f73-432c-8647-e3a7dcf43637@googlegroups.com> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Message-ID: X-Complaints-To: abuse@teranews.com NNTP-Posting-Date: Thu, 25 Dec 2014 21:23:26 UTC Organization: TeraNews.com Date: Thu, 25 Dec 2014 14:23:23 -0700 X-Received-Bytes: 1821 X-Received-Body-CRC: 3251324754 Xref: news.eternal-september.org comp.lang.ada:24232 Date: 2014-12-25T14:23:23-07:00 List-Id: On 25-Dec-14 13:15, tony7@tele2.se wrote: >> I think you want -O1 >> >> -O1 for small size >> -O2 for speed > > I tried both combinations with both GNAT versions. > The -O1/O2 switches makes no difference on the size. > The object code of the main program is less than one KB, so most of the > linked program must come from some precompiled library, which is not > affected by the compiler switches. Right. Which means you'd have to compile all the other stuff, presumably w/ the -Os switch. -- Probably with the "list possible restrictions" active, and applying those restrictions as much as possible. > >> -Os for small size. > > Tried this one also now. The 3.15p GNAT don't have it. The 2014 GNAT > still produces a 195 KB executable. > Did you use the "strip unused sections" [or something similar] option for the linker?