On Thu, Nov 27, 2014 at 07:36:12PM +0100, David Herrmann wrote: > Hi > > On Thu, Nov 27, 2014 at 7:31 PM, Gustavo Sverzut Barbieri > <gustavo.barbi...@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.
arghhh... that's right :-/ we could do the AS_CASE() for -flto and add gc-sections if not, but: > 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. you're right, we gain nothing from it... as people said before we shouldn't try to work around a broken linker :-) BR, -- Gustavo Sverzut Barbieri Intel Open source Technology Center _______________________________________________ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel