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

Marc-André Lureau mlureau at redhat.com
Fri Jun 8 03:55:40 PDT 2012


self-nack, vdservice is correctly statically linked, but no vdagent. Fixing it.

----- Mensaje original -----
> 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
> could also use lto, whole-program but that doesn't seem to change
> much..)
> ---
>  Makefile.am |    6 ++++--
>  1 file changed, 4 insertions(+), 2 deletions(-)
> 
> diff --git a/Makefile.am b/Makefile.am
> index 5f0c9dc..ba72d2d 100644
> --- a/Makefile.am
> +++ b/Makefile.am
> @@ -6,13 +6,15 @@ INCLUDES =				\
>  	-I$(top_srcdir)/spice-protocol	\
>  	$(NULL)
>  
> -AM_CPPFLAGS = -DUNICODE -D_UNICODE
> +AM_CPPFLAGS = -DUNICODE -D_UNICODE -DOLDMSVCRT
> +AM_LDFLAGS = -static -s
> +
>  # -lversion is needed for the GetFileVersion* API which is used by
>  vdlog.cpp
>  LIBS = -lversion
>  
>  bin_PROGRAMS = vdagent vdservice
>  
> -vdagent_LDADD = $(CXIMAGE_LIBS) vdagent_rc.$(OBJEXT)
> +vdagent_LDADD = $(CXIMAGE_LIBS) -lgdi32 vdagent_rc.$(OBJEXT)
>  vdagent_CXXFLAGS = $(CXIMAGE_CFLAGS)
>  vdagent_LDFLAGS = -Wl,--subsystem,windows
>  vdagent_SOURCES =			\
> --
> 1.7.10.2
> 
> _______________________________________________
> Spice-devel mailing list
> Spice-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/spice-devel
> 


More information about the Spice-devel mailing list