[Buildroot] Advice on buildroot implementation

Stefan Fröberg stefan.froberg at petroprogram.com
Thu Feb 21 10:38:57 UTC 2013


20.2.2013 19:38, Arnout Vandecappelle kirjoitti:
> On 20/02/13 12:08, Stefan Fröberg wrote:
> [snip]
>> CFLAGS = -flto -fwhole-program
>> LDFLAGS= -flto -fuse-linker-plugin
>>
>> It could be also possible to compile whole system to make it smaller but
>> it is very delicate and experimental process and some packages
>> don't like some flags at all (For example zlib 1.2.7 does not like
>> -fwhole-program).
>>
>> So Im asking everyone here:
>>
>> How can I filter out flags-per-package ?
>
>  For most gcc -f and -W options, there's a no- variant. So
>
> ZLIB_CFLAGS = -fno-lto -fno-while-program
> ZLIB_LDFLAGS = -fno-lto  -fno-use-linker-plugin
>
>> And also enable flags-per-package?
>> I would like to enable globally those LTO flags and filter some/all
>> flags from problematic packages.
>
>  You can only do that by changing the package .mk file. I don't think
> we want to add infrastructure for per-package CFLAGS configuration...
>
>  Regards,
>  Arnout

Well, if there are no-variants for those lto flags then I will be
perfectly happy to try full shrinking test of my system with lto.

Regards
Stefan





More information about the buildroot mailing list