[Spice-devel] [PATCH win-agent] build-sys: statically build agent

Christophe Fergeau cfergeau at redhat.com
Mon Jun 11 03:05:59 PDT 2012


On Fri, Jun 08, 2012 at 01:14:02PM +0200, Marc-André Lureau wrote:
> Fix build by default when using mingw (when more compiler are
> supported we could do case by case)
> 
> Since we are statically building, strip resulting binary (we
> also use lto, whole-program but that doesn't seem to change
> much..)
> ---
>  Makefile.am  |    9 ++++++---
>  configure.ac |    1 +
>  2 files changed, 7 insertions(+), 3 deletions(-)
> 
> diff --git a/Makefile.am b/Makefile.am
> index 5f0c9dc..f954a8c 100644
> --- a/Makefile.am
> +++ b/Makefile.am
> @@ -6,15 +6,18 @@ INCLUDES =				\
>  	-I$(top_srcdir)/spice-protocol	\
>  	$(NULL)
>  
> -AM_CPPFLAGS = -DUNICODE -D_UNICODE
> +AM_CXXFLAGS = -flto -fwhole-program
> +AM_CPPFLAGS = -DUNICODE -D_UNICODE -DOLDMSVCRT

Why the -DOLDMSVCRT?

> +AM_LDFLAGS = -static -s

Don't we want a way to keep debug info in the resulting binary?
Looks good otherwise.

Christophe
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/spice-devel/attachments/20120611/66765b0c/attachment.pgp>


More information about the Spice-devel mailing list