qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH 4/5] configure: move common libraries to config-


From: Paolo Bonzini
Subject: Re: [Qemu-devel] [PATCH 4/5] configure: move common libraries to config-host.mak
Date: Tue, 02 Apr 2013 20:51:40 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130311 Thunderbird/17.0.4

Il 02/04/2013 20:17, Peter Maydell ha scritto:

> This is because we seem to have lost the trailing "-lm -lz"; here's
> the tail end of the link command from a build on master for
> comparison:
> 
> translate-all.o xen-stub.o ../libqemuutil.a ../libqemustub.a  -lrt
> -pthread -lgthread-2.0 -lglib-2.0 -lrt -lpcre    -lutil -lbluetooth
> -lncurses -ltinfo    -lvdeplug -luuid -lpng12 -lz -lm    -laio -lfdt
> -lpixman-1    -lm -lz

I can fix this, but apparently upstream pixman doesn't support static linking:

$ pkg-config pixman-1 --libs
-lpixman-1  
$ pkg-config pixman-1 --libs --static
-lpixman-1  

which is why my distro vendor does not provide static libraries. :)

Here is the fix:

diff --git a/Makefile.target b/Makefile.target
index c8513f1..2636103 100644
--- a/Makefile.target
+++ b/Makefile.target
@@ -31,10 +31,6 @@ PROGS+=$(QEMU_PROGW)
 endif
 STPFILES=
 
-ifndef CONFIG_HAIKU
-LIBS+=-lm
-endif
-
 config-target.h: config-target.h-timestamp
 config-target.h-timestamp: config-target.mak
 
@@ -149,6 +145,10 @@ include $(SRC_PATH)/Makefile.objs
 all-obj-y = $(obj-y)
 all-obj-y += $(addprefix ../, $(common-obj-y))
 
+ifndef CONFIG_HAIKU
+LIBS+=-lm
+endif
+
 ifdef QEMU_PROGW
 # The linker builds a windows executable. Make also a console executable.
 $(QEMU_PROGW): $(all-obj-y) ../libqemuutil.a ../libqemustub.a

Paolo



reply via email to

[Prev in Thread] Current Thread [Next in Thread]