From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
To: buildroot@busybox.net
Subject: [Buildroot] Question about Compilation Flags
Date: Fri, 11 Nov 2016 15:03:43 +0100 [thread overview]
Message-ID: <20161111150343.74bfc8b1@free-electrons.com> (raw)
In-Reply-To: <CAHBw83fzS2uZUXUrpF6+Q41G3gUEPg5uW3DXu=YauG447FjDtA@mail.gmail.com>
Hello,
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
this:
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
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com
next prev parent reply other threads:[~2016-11-11 14:03 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-11-11 9:19 [Buildroot] Question about Compilation Flags Anand Sivaram
2016-11-11 14:03 ` Thomas Petazzoni [this message]
2016-11-12 7:36 ` Anand Sivaram
2016-11-12 9:21 ` Thomas Petazzoni
2016-11-12 9:54 ` Anand Sivaram
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20161111150343.74bfc8b1@free-electrons.com \
--to=thomas.petazzoni@free-electrons.com \
--cc=buildroot@busybox.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox