diff options
Diffstat (limited to 'main/qemu/configure-libm.patch')
-rw-r--r-- | main/qemu/configure-libm.patch | 60 |
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 |