Re: [PATCH V2] kvm tools: Add build target for statically-linked binary

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 01/09/2012 02:45 PM, Matt Evans wrote:
> This commit adds a target for 'lkvm-static' which is linked -static.
> 
> (This can be useful to construct kvmtool binaries for minimalist
> auto-test host filesystems.)

This is useful. However, It fails to build for me. Some problem with
sdl, bfd and vnc library. Log attached.

> 
> Signed-off-by: Matt Evans <matt@xxxxxxxxxx>
> ---
> 
> V2:  Argh!  Let's remove it on make clean, too...
> 
>  tools/kvm/Makefile |    6 +++++-
>  1 files changed, 5 insertions(+), 1 deletions(-)
> 
> diff --git a/tools/kvm/Makefile b/tools/kvm/Makefile
> index d54fa47..ebc0c7c 100644
> --- a/tools/kvm/Makefile
> +++ b/tools/kvm/Makefile
> @@ -233,6 +233,10 @@ $(PROGRAM): $(DEPS) $(OBJS)
>  	$(E) "  LINK    " $@
>  	$(Q) $(CC) $(CFLAGS) $(OBJS) $(LIBS) -o $@
>  
> +$(PROGRAM)-static: $(DEPS) $(OBJS)
> +	$(E) "  LINK    " $@
> +	$(Q) $(CC) -static $(CFLAGS) $(OBJS) $(LIBS) -o $@
> +
>  $(PROGRAM_ALIAS): $(PROGRAM)
>  	$(E) "  LN      " $@
>  	$(Q) ln -f $(PROGRAM) $@
> @@ -325,7 +329,7 @@ clean:
>  	$(Q) rm -f x86/bios/bios-rom.h
>  	$(Q) rm -f tests/boot/boot_test.iso
>  	$(Q) rm -rf tests/boot/rootfs/
> -	$(Q) rm -f $(DEPS) $(OBJS) $(PROGRAM) $(PROGRAM_ALIAS) $(GUEST_INIT) $(GUEST_INIT_S2)
> +	$(Q) rm -f $(DEPS) $(OBJS) $(PROGRAM) $(PROGRAM_ALIAS) $(PROGRAM)-static $(GUEST_INIT) $(GUEST_INIT_S2)
>  	$(Q) rm -f cscope.*
>  	$(Q) rm -f $(KVM_INCLUDE)/common-cmds.h
>  	$(Q) rm -f KVMTOOLS-VERSION-FILE


-- 
Asias He

Attachment: build.log.gz
Description: application/gzip


[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux