[systemd-devel] [PATCH] build-sys: remove --gc-sections to fix debugging
David Herrmann
dh.herrmann at gmail.com
Thu Nov 27 10:36:12 PST 2014
Hi
On Thu, Nov 27, 2014 at 7:31 PM, Gustavo Sverzut Barbieri
<gustavo.barbieri at intel.com> wrote:
> Currently configure.ac has the LTO logic inside an:
>
> AS_CASE([$CFLAGS], [*-O[[12345\ ]]*], ....
>
> We can make the "else" block check/enable for gc-sections alongside
> printing the result. See the attached (untested!) patch.
Yes, thanks, this is the way to go! But..
..your patch fails it you build systemd with -O2 but your build-utils
lack LTO support. CC_CHECK_FLAGS_APPEND only appends flags _iff_
they're supported. So in your case, if -O2 is detected, but LTO is not
available, you will end up with neither LTO nor --gc-sections.
Furthermore, please justify your changes in the changelog, so
git-blame will tell people why gc-sections is disabled if LTO is used.
If it was only redundancy you care about, then I see no reason to drop
it. So please explain what we gain by dropping it.
Thanks
David
More information about the systemd-devel
mailing list