[Spice-devel] [vdagent-win PATCH] Avoid using LTO by default during compilation
Christophe Fergeau
cfergeau at redhat.com
Wed Jul 26 10:49:05 UTC 2017
On Wed, Jul 26, 2017 at 11:38:08AM +0100, Frediano Ziglio wrote:
> LTO option allows to have smaller executable stripping
> unneeded part of code.
> These options were added by a095f4806e ("build-sys: statically
> build agent").
> The gain of using these options currently are quite small,
> from a small test:
>
> $ ll *.exe
> -rwxrwxr-x. 1 freddy freddy 506880 Jul 26 11:26 vdagent.exe
> -rwxrwxr-x. 1 freddy freddy 198656 Jul 26 11:26 vdservice.exe
>
> $ ll *.exe
> -rwxrwxr-x. 1 freddy freddy 509952 Jul 26 11:26 vdagent.exe
> -rwxrwxr-x. 1 freddy freddy 200192 Jul 26 11:26 vdservice.exe
>
> Considering that there are some bug in some recent MinGW distributions
> like https://bugzilla.redhat.com/show_bug.cgi?id=1475237 and
> the small gain I would disable these options.
Small gain is still a good gain. But yeah, in light of these bugs,
we can disable it (one could argue that we could use CXXFLAGS=-fno-lto
on the buggy platforms instead).
Acked-by: Christophe Fergeau <cfergeau at redhat.com>
Christophe
>
> Signed-off-by: Frediano Ziglio <fziglio at redhat.com>
> ---
> Makefile.am | 1 -
> 1 file changed, 1 deletion(-)
>
> diff --git a/Makefile.am b/Makefile.am
> index 40db903..7fafb8b 100644
> --- a/Makefile.am
> +++ b/Makefile.am
> @@ -4,7 +4,6 @@ MAINTAINERCLEANFILES = mingw-spice-vdagent.spec
>
> DIST_SUBDIRS = spice-protocol
>
> -AM_CXXFLAGS = -flto -fwhole-program
> AM_CPPFLAGS = \
> -DUNICODE \
> -D_UNICODE \
> --
> 2.13.3
>
> _______________________________________________
> Spice-devel mailing list
> Spice-devel at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/spice-devel
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 801 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/spice-devel/attachments/20170726/8caf14a6/attachment-0001.sig>
More information about the Spice-devel
mailing list