aboutsummaryrefslogtreecommitdiffstats
path: root/main/qemu/configure-libm.patch
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2011-12-02 09:34:42 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2011-12-02 09:34:42 +0000
commitc1ab71f15e62515c6aa3c10822be0e64744a1254 (patch)
tree3e51d64a9b8957929a2a66f4f0afd6bf711fb1e9 /main/qemu/configure-libm.patch
parent742ec6824d8aebafacc1f784bcb42adbcc919a57 (diff)
downloadaports-c1ab71f15e62515c6aa3c10822be0e64744a1254.tar.bz2
aports-c1ab71f15e62515c6aa3c10822be0e64744a1254.tar.xz
main/qemu: upgrade to 1.0
Diffstat (limited to 'main/qemu/configure-libm.patch')
-rw-r--r--main/qemu/configure-libm.patch60
1 files changed, 60 insertions, 0 deletions
diff --git a/main/qemu/configure-libm.patch b/main/qemu/configure-libm.patch
new file mode 100644
index 0000000000..e57216e53a
--- /dev/null
+++ b/main/qemu/configure-libm.patch
@@ -0,0 +1,60 @@
+--- ./configure.orig
++++ ./configure
+@@ -1287,6 +1287,25 @@
+ fi
+
+ ##########################################
++# libm check
++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
++
++
++
++##########################################
+ # zlib check
+
+ if test "$zlib" != "no" ; then
+--- ./configure.orig
++++ ./configure
+@@ -3283,6 +3283,7 @@
+ echo "LIBS_TOOLS+=$libs_tools" >> $config_host_mak
+ echo "EXESUF=$EXESUF" >> $config_host_mak
+ echo "LIBS_QGA+=$libs_qga" >> $config_host_mak
++echo "LIBM=$LIBM" >> $config_host_mak
+
+ # generate list of library paths for linker script
+
+--- ./Makefile.orig
++++ ./Makefile
+@@ -170,7 +170,7 @@
+ $(qapi-obj-y): $(GENERATED_HEADERS)
+ qapi-dir := $(BUILD_DIR)/qapi-generated
+ test-visitor.o test-qmp-commands.o qemu-ga$(EXESUF): QEMU_CFLAGS += -I $(qapi-dir)
+-qemu-ga$(EXESUF): LIBS = $(LIBS_QGA)
++qemu-ga$(EXESUF): LIBS = $(LIBS_QGA) $(LIBM)
+
+ $(qapi-dir)/test-qapi-types.c $(qapi-dir)/test-qapi-types.h :\
+ $(SRC_PATH)/qapi-schema-test.json $(SRC_PATH)/scripts/qapi-types.py
+--- ./Makefile.orig
++++ ./Makefile
+@@ -34,7 +34,7 @@
+
+ $(call set-vpath, $(SRC_PATH):$(SRC_PATH)/hw)
+
+-LIBS+=-lz $(LIBS_TOOLS)
++LIBS+=-lz $(LIBS_TOOLS) $(LIBM)
+
+ ifdef BUILD_DOCS
+ DOCS=qemu-doc.html qemu-tech.html qemu.1 qemu-img.1 qemu-nbd.8 QMP/qmp-commands.txt