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