[Buildroot] Question about Compilation Flags
aspnair at gmail.com
Sat Nov 12 07:36:11 UTC 2016
Thank you very much for the reply. I think BR2_TARGET_OPTIMIZATION and
better solutions than what I did in config/Makefile.in
I will try lighttpd.mk changes as you suggested.
These are the numbers I found without changing lighttpd in a special way.
du -ks output/target/ (default buildroot for mips without
du -ks output/target/ (with function/data/gc-sections)
That gives a saving of 1176 KB then.
Thanks and Best Regards
On 11 November 2016 at 19:33, Thomas Petazzoni <
thomas.petazzoni at free-electrons.com> wrote:
> On Fri, 11 Nov 2016 14:49:42 +0530, Anand Sivaram wrote:
> > File: package/Makefile.in
> > TARGET_CFLAGS += -ffunction-sections -fdata-sections
> > TARGET_LDFLAGS += -Wl,--gc-sections
> You can also pass these through "menuconfig", using
> BR2_TARGET_OPTIMIZATION and BR2_TARGET_LDFLAGS.
> > Everything went fine, I saved around 1MB. But lighttpd with mod-fcgi
> > enabled got SIGSEGV with the above change.
> > I have a question? Could I disable these flags *only* for lighttpd, that
> > means using the above flags in all packages except lighttpd.
> Yes, you can adapt lighttpd.mk for that. You need to do something like
> LIGHTTPD_CONF_ENV = \
> CFLAGS=$(filter-out -ffunction-sections -fdata-section,$(TARGET_CFLAGS))
> LDFLAGS=$(filter-out -Wl,--gc-sections,$(TARGET_LDFLAGS))
> BTW, how much space did you save by using those options? What was the
> filesystem size before adding those options and after?
> Best regards,
> Thomas Petazzoni, CTO, Free Electrons
> Embedded Linux and Kernel engineering
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the buildroot