comp.lang.ada
 help / color / mirror / Atom feed
From: Simon Wright <simon@pushface.org>
Subject: Re: Ada interacting with Windows 8.1+ GUI
Date: Fri, 26 Oct 2018 14:42:24 +0100
Date: 2018-10-26T14:42:24+01:00	[thread overview]
Message-ID: <lyefcckenz.fsf@pushface.org> (raw)
In-Reply-To: 0001HW.218345810081A9777000053542EF@news.individual.net

Bill Findlay <findlaybill@blueyonder.co.uk> writes:

> On 26 Oct 2018, Simon Wright wrote
> (in article <lyin1pjca1.fsf@pushface.org>):
>
>> joakimds@kth.se writes:
>>
>> > Isn't it easy for the compiler to optimize away/remove the code that
>> > is not used?
>>
>> Not so much in a library package where some subprograms don't have to be
>> used by the overall program.
>>
>> You can compile with -ffunction-sections -fdata-sections which say each
>> subprogram/data object resp. is to have its own section. If your linker
>> supports (the equivalent of) -gc-sections. linking with it means that
>> only the used sections get linked. This is fine for (arm-eabi) embedded
>> systems &  (probably) Linux. which use GNU ld, but not on macOS. Can't
>> say for Windows.
>>
>> GNAT provides gnatelim, which analyses your code and (?) regenerates it
>> without the unused objects. No idea how well this works.
>
> Does :
>
> -Wl,-dead_strip -Wl,-dead_strip
>
> not work on macOS instead of:

I don't think you have to say it twice! - but, yes, thanks

> -Wl,--gc-sections -Wl,--as-needed

I wasn't aware of --as-needed. Seems only to eliminate whole shared
libraries, not an issue on arm-eabi!

  reply	other threads:[~2018-10-26 13:42 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-09 14:42 Ada interacting with Windows 8.1+ GUI Donar
2018-10-09 14:56 ` gautier_niouzes
2018-10-10 15:42   ` herbert.glarner
2018-10-10 18:19     ` G. B.
2018-10-25  9:24       ` gautier_niouzes
2018-10-11 14:42     ` gautier_niouzes
2018-10-11 15:26       ` rabbibotton
2018-10-11 18:25         ` rabbibotton
2018-10-11 18:37       ` Björn Lundin
2018-10-13  6:30       ` alby.gamper
2018-10-13 11:50         ` gautier_niouzes
2018-10-13 12:47           ` alby.gamper
2018-10-25 17:19 ` Olivier Henley
2018-10-25 17:33   ` Olivier Henley
2018-10-25 22:30     ` joakimds
2018-10-26  9:19       ` Simon Wright
2018-10-26  9:39         ` gautier_niouzes
2018-10-26 12:52         ` Bill Findlay
2018-10-26 13:42           ` Simon Wright [this message]
2018-10-26 21:19             ` Bill Findlay
2018-10-29 21:09         ` Randy Brukardt
replies disabled

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