made kvm disable the long math functions when using uClibc
[kvm-coreboot.git] / packages / kvm / patches / kvm-uclibc.patch
blob0ceaed4d849dde98de102794adcb8aaa7e7028da
1 diff -Naur kvm-72.orig/libkvm/libkvm-x86.c kvm-72/libkvm/libkvm-x86.c
2 --- kvm-72.orig/libkvm/libkvm-x86.c 2008-07-27 13:08:56.000000000 +0300
3 +++ kvm-72/libkvm/libkvm-x86.c 2008-07-30 02:39:00.000000000 +0300
4 @@ -4,7 +4,9 @@
5 #include <sys/ioctl.h>
6 #include <string.h>
7 #include <unistd.h>
8 +#ifndef __UCLIBC__
9 #include <stropts.h>
10 +#endif
11 #include <sys/mman.h>
12 #include <stdio.h>
13 #include <errno.h>
14 --- kvm-72/qemu/fpu/softfloat-native.c.orig 2008-08-09 01:56:01.000000000 +0300
15 +++ kvm-72/qemu/fpu/softfloat-native.c 2008-08-09 01:56:22.000000000 +0300
16 @@ -8,7 +8,7 @@
17 STATUS(float_rounding_mode) = val;
18 #if defined(_BSD) && !defined(__APPLE__) || (defined(HOST_SOLARIS) && HOST_SOLARIS < 10)
19 fpsetround(val);
20 -#elif defined(__arm__)
21 +#elif defined(__arm__) || defined (__UCLIBC__)
22 /* nothing to do */
23 #else
24 fesetround(val);
25 --- kvm-72/qemu/target-i386/exec.h.orig 2008-08-28 00:00:05.000000000 +0300
26 +++ kvm-72/qemu/target-i386/exec.h 2008-08-28 00:00:19.000000000 +0300
27 @@ -27,6 +27,10 @@
28 #define TARGET_LONG_BITS 32
29 #endif
31 +#ifdef __UCLIBC__
32 +#undef USE_X86LDOUBLE
33 +#endif
35 #include "cpu-defs.h"
37 register struct CPUX86State *env asm(AREG0);
38 --- kvm-72/qemu/fpu/softfloat-native.h.orig 2008-08-28 00:02:53.000000000 +0300
39 +++ kvm-72/qemu/fpu/softfloat-native.h 2008-08-28 00:03:57.000000000 +0300
40 @@ -8,6 +8,10 @@
41 #include <fenv.h>
42 #endif
44 +#ifdef __UCLIBC__
45 +#undef FLOATX80
46 +#endif
49 * Define some C99-7.12.3 classification macros and
50 * some C99-.12.4 for Solaris systems OS less than 10,