diff options
-rw-r--r-- | main/qemu/APKBUILD | 12 | ||||
-rw-r--r-- | main/qemu/configure-properly-check-if-lrt-and-lm-is-needed.patch | 118 |
2 files changed, 5 insertions, 125 deletions
diff --git a/main/qemu/APKBUILD b/main/qemu/APKBUILD index 8c926c29f3..30e4b655b4 100644 --- a/main/qemu/APKBUILD +++ b/main/qemu/APKBUILD @@ -1,7 +1,7 @@ # Maintainer: Natanael Copa <ncopa@alpinelinux.org> pkgname=qemu -pkgver=1.2.0 -pkgrel=2 +pkgver=1.2.1 +pkgrel=0 pkgdesc="QEMU is a generic machine emulator and virtualizer" url="http://qemu,org/" arch="all" @@ -40,8 +40,7 @@ $pkgname-unicore32 $pkgname-img " source="http://wiki.qemu.org/download/qemu-$pkgver.tar.bz2 - 80-kvm.rules - configure-properly-check-if-lrt-and-lm-is-needed.patch" + 80-kvm.rules" prepare() { cd "$srcdir"/$pkgname-$pkgver @@ -148,6 +147,5 @@ img() { return $_err } -md5sums="78eb1e984f4532aa9f2bdd3c127b5b61 qemu-1.2.0.tar.bz2 -66660f143235201249dc0648b39b86ee 80-kvm.rules -67656f53ede5b13badf134c01b5773dd configure-properly-check-if-lrt-and-lm-is-needed.patch" +md5sums="189bc5b87281a72f8c72a0f7ebaa6d00 qemu-1.2.1.tar.bz2 +66660f143235201249dc0648b39b86ee 80-kvm.rules" diff --git a/main/qemu/configure-properly-check-if-lrt-and-lm-is-needed.patch b/main/qemu/configure-properly-check-if-lrt-and-lm-is-needed.patch deleted file mode 100644 index 283d1063bb..0000000000 --- a/main/qemu/configure-properly-check-if-lrt-and-lm-is-needed.patch +++ /dev/null @@ -1,118 +0,0 @@ -properly check if -lrt and -lm is needed - -Fixes build against uClibc. - -uClibc provides 2 versions of clock_gettime(), one with realtime -support and one without (this is so you can avoid linking in -lrt -unless actually needed). This means that the clock_gettime() don't -need -lrt. We still need it for timer_create() so we check for this -function in addition. - -We also need check if -lm is needed for isnan(). - - -diff --git a/Makefile b/Makefile -index 1cd5bc8..f414291 100644 ---- a/Makefile -+++ b/Makefile -@@ -35,7 +35,7 @@ configure: ; - - $(call set-vpath, $(SRC_PATH)) - --LIBS+=-lz $(LIBS_TOOLS) -+LIBS+=-lz $(LIBS_TOOLS) $(LIBM) $(LIBRT) - - HELPERS-$(CONFIG_LINUX) = qemu-bridge-helper$(EXESUF) - -@@ -172,7 +172,7 @@ fsdev/virtfs-proxy-helper$(EXESUF): LIBS += -lcap - qemu-img-cmds.h: $(SRC_PATH)/qemu-img-cmds.hx - $(call quiet-command,sh $(SRC_PATH)/scripts/hxtool -h < $< > $@," GEN $@") - --qemu-ga$(EXESUF): LIBS = $(LIBS_QGA) -+qemu-ga$(EXESUF): LIBS = $(LIBS_QGA) $(LIBRT) $(LIBM) - qemu-ga$(EXESUF): QEMU_CFLAGS += -I qga/qapi-generated - - gen-out-type = $(subst .,-,$(suffix $@)) -diff --git a/Makefile.target b/Makefile.target -index 7892a8d..1c3bf31 100644 ---- a/Makefile.target -+++ b/Makefile.target -@@ -34,9 +34,7 @@ PROGS+=$(QEMU_PROGW) - endif - STPFILES= - --ifndef CONFIG_HAIKU --LIBS+=-lm --endif -+LIBS+=$(LIBM) $(LIBRT) - - config-target.h: config-target.h-timestamp - config-target.h-timestamp: config-target.mak -diff --git a/configure b/configure -index d97fd81..697946c 100755 ---- a/configure -+++ b/configure -@@ -126,6 +126,8 @@ audio_win_int="" - cc_i386=i386-pc-linux-gnu-gcc - libs_qga="" - debug_info="yes" -+libm="" -+librt="" - - target_list="" - -@@ -2666,19 +2668,43 @@ EOF - fi - fi - -+########################################## -+# Do we need libm -+cat > $TMPC << EOF -+#include <math.h> -+int main(void) { return isnan(0.0); } -+EOF -+if compile_prog "" "" ; then -+ libm= -+elif compile_prog "" "-lm" ; then -+ libm="-lm" -+else -+ echo -+ echo "Error: libm check failed" -+ echo -+ exit 1 -+fi - - ########################################## - # Do we need librt - cat > $TMPC <<EOF - #include <signal.h> - #include <time.h> --int main(void) { return clock_gettime(CLOCK_REALTIME, NULL); } -+int main(void) { -+ timer_create(CLOCK_REALTIME, NULL, NULL); -+ return clock_gettime(CLOCK_REALTIME, NULL); -+} - EOF - - if compile_prog "" "" ; then - : - elif compile_prog "" "-lrt" ; then -- LIBS="-lrt $LIBS" -+ librt="-lrt" -+else -+ echo -+ echo "Error: librt check failed" -+ echo -+ exit 1 - fi - - if test "$darwin" != "yes" -a "$mingw32" != "yes" -a "$solaris" != yes -a \ -@@ -3581,6 +3607,8 @@ echo "LIBS_TOOLS+=$libs_tools" >> $config_host_mak - echo "EXESUF=$EXESUF" >> $config_host_mak - echo "LIBS_QGA+=$libs_qga" >> $config_host_mak - echo "POD2MAN=$POD2MAN" >> $config_host_mak -+echo "LIBM=$libm" >> $config_host_mak -+echo "LIBRT=$librt" >> $config_host_mak - - # generate list of library paths for linker script - |