summaryrefslogtreecommitdiff
path: root/emulators/qemu-devel/files/patch-fbsd
diff options
context:
space:
mode:
Diffstat (limited to 'emulators/qemu-devel/files/patch-fbsd')
-rw-r--r--emulators/qemu-devel/files/patch-fbsd129
1 files changed, 59 insertions, 70 deletions
diff --git a/emulators/qemu-devel/files/patch-fbsd b/emulators/qemu-devel/files/patch-fbsd
index 12593966b389..3442b0c8279e 100644
--- a/emulators/qemu-devel/files/patch-fbsd
+++ b/emulators/qemu-devel/files/patch-fbsd
@@ -1,70 +1,68 @@
Index: qemu/Makefile
-@@ -25,7 +25,10 @@
- DOCS=
- endif
+@@ -49,7 +49,10 @@
--all: $(TOOLS) $(DOCS) recurse-all
-+all: bsd/libmath.a $(TOOLS) $(DOCS) recurse-all
+ -include config-all-devices.mak
+
+-build-all: $(DOCS) $(TOOLS) recurse-all
++build-all: $(DOCS) $(TOOLS) bsd/libmath.a recurse-all
+
+bsd/libmath.a:
+ ( cd bsd ; unset MAKEFLAGS ; $(BSD_MAKE) CC=$(CC) )
- subdir-%: dyngen$(EXESUF)
- $(MAKE) -C $(subst subdir-,,$@) all
-@@ -40,6 +43,7 @@
+ config-host.h: config-host.h-timestamp
+ config-host.h-timestamp: config-host.mak
+@@ -237,6 +240,7 @@
clean:
# avoid old build problems by removing potentially incorrect old files
+ ( cd bsd ; $(BSD_MAKE) clean )
- rm -f config.mak config.h op-i386.h opc-i386.h gen-op-i386.h op-arm.h opc-arm.h gen-op-arm.h
- rm -f *.o *.a $(TOOLS) dyngen$(EXESUF) TAGS *.pod *~ */*~
- $(MAKE) -C tests clean
+ rm -f config.mak op-i386.h opc-i386.h gen-op-i386.h op-arm.h opc-arm.h gen-op-arm.h
+ rm -f *.o *.d *.a $(TOOLS) TAGS cscope.* *.pod *~ */*~
+ rm -f slirp/*.o slirp/*.d audio/*.o audio/*.d block/*.o block/*.d net/*.o net/*.d
Index: qemu/Makefile.target
-@@ -651,8 +651,8 @@
- main.o: CFLAGS+=-p
- endif
+@@ -137,7 +137,7 @@
--$(QEMU_PROG): $(OBJS) ../libqemu_common.a libqemu.a
-- $(CC) $(LDFLAGS) -o $@ $^ $(LIBS) $(SDL_LIBS) $(COCOA_LIBS) $(CURSES_LIBS) $(BRLAPI_LIBS)
-+$(QEMU_PROG): $(OBJS) ../libqemu_common.a libqemu.a ../bsd/libmath.a
-+ $(CC) $(LDFLAGS) -o $@ $^ $(LIBS) $(SDL_LIBS) $(COCOA_LIBS) $(CURSES_LIBS) $(BRLAPI_LIBS) ../bsd/libmath.a
+ obj-i386-y += ioport-user.o
- endif # !CONFIG_USER_ONLY
+-ARLIBS=../libuser/libuser.a libqemu.a
++ARLIBS=../libuser/libuser.a libqemu.a ../bsd/libmath.a
-Index: qemu/fpu/softfloat-native.c
-@@ -2,11 +2,16 @@
- context is supported */
- #include "softfloat.h"
- #include <math.h>
-+#if defined(__FreeBSD__) && __FreeBSD_version < 500000
-+#include <ieeefp.h>
-+#endif
+ endif #CONFIG_BSD_USER
+
+@@ -293,7 +293,7 @@
+ monitor.o: qemu-monitor.h
+
+-ARLIBS=../libqemu_common.a libqemu.a $(HWLIB)
++ARLIBS=../libqemu_common.a libqemu.a $(HWLIB) ../bsd/libmath.a
+
+ endif # CONFIG_SOFTMMU
+
+Index: qemu/fpu/softfloat-native.c
+@@ -9,7 +9,8 @@
void set_float_rounding_mode(int val STATUS_PARAM)
{
STATUS(float_rounding_mode) = val;
--#if defined(_BSD) && !defined(__APPLE__) || (defined(HOST_SOLARIS) && HOST_SOLARIS < 10)
-+#if defined(_BSD) && !defined(__APPLE__) && !defined(__FreeBSD__) || \
-+ (defined(__FreeBSD__) && __FreeBSD_version < 500000) || \
-+ (defined(HOST_SOLARIS) && HOST_SOLARIS < 10)
+-#if (defined(CONFIG_BSD) && !defined(__APPLE__) && !defined(__GLIBC__)) || \
++#if (defined(CONFIG_BSD) && !defined(__APPLE__) && !defined(__GLIBC__) && \
++ !defined(__FreeBSD__)) || \
+ (defined(CONFIG_SOLARIS) && CONFIG_SOLARIS_VERSION < 10)
fpsetround(val);
#elif defined(__arm__)
- /* nothing to do */
-@@ -22,7 +25,7 @@
+@@ -26,7 +27,7 @@ void set_floatx80_rounding_precision(int
}
#endif
--#if defined(_BSD) || (defined(HOST_SOLARIS) && HOST_SOLARIS < 10)
-+#if (defined(_BSD) && !defined(__FreeBSD__)) || (defined(HOST_SOLARIS) && HOST_SOLARIS < 10)
+-#if defined(CONFIG_BSD) || \
++#if (defined(CONFIG_BSD) && !defined(__FreeBSD__)) || \
+ (defined(CONFIG_SOLARIS) && CONFIG_SOLARIS_VERSION < 10)
#define lrint(d) ((int32_t)rint(d))
#define llrint(d) ((int64_t)rint(d))
- #define lrintf(f) ((int32_t)rint(f))
Index: qemu/fpu/softfloat-native.h
-@@ -1,8 +1,28 @@
- /* Native implementation of soft float functions */
- #include <math.h>
+@@ -3,7 +3,28 @@
--#if (defined(_BSD) && !defined(__APPLE__)) || defined(HOST_SOLARIS)
+ #if (defined(CONFIG_BSD) && !defined(__APPLE__) && !defined(__GLIBC__)) \
+ || defined(CONFIG_SOLARIS)
+#ifdef __FreeBSD__
+#include <osreldate.h>
+long double fabsl(long double x);
@@ -75,9 +73,9 @@ Index: qemu/fpu/softfloat-native.h
+long long llrintl(long double x);
+#endif
+
-+#if (defined(_BSD) && !defined(__APPLE__) && \
++#if (defined(CONFIG_BSD) && !defined(__APPLE__) && !defined(__GLIBC__) && \
+ (!defined(__FreeBSD__) || __FreeBSD_version < 500000)) || \
-+ defined(HOST_SOLARIS)
++ defined(CONFIG_SOLARIS)
#include <ieeefp.h>
+#if defined(__FreeBSD__)
+#define isgreater(x, y) __builtin_isgreater((x), (y))
@@ -90,50 +88,41 @@ Index: qemu/fpu/softfloat-native.h
#define fabsf(f) ((float)fabs(f))
#else
#include <fenv.h>
-@@ -60,7 +80,9 @@
+@@ -113,8 +134,9 @@ typedef union {
/*----------------------------------------------------------------------------
| Software IEC/IEEE floating-point rounding mode.
*----------------------------------------------------------------------------*/
--#if (defined(_BSD) && !defined(__APPLE__)) || defined(HOST_SOLARIS)
-+#if (defined(_BSD) && !defined(__APPLE__) && \
-+ (!defined(__FreeBSD__) || __FreeBSD_version < 500000)) || \
-+ defined(HOST_SOLARIS)
- enum {
- float_round_nearest_even = FP_RN,
- float_round_down = FP_RM,
+-#if (defined(CONFIG_BSD) && !defined(__APPLE__) && !defined(__GLIBC__)) \
+- || defined(CONFIG_SOLARIS)
++#if (defined(CONFIG_BSD) && !defined(__APPLE__) && !defined(__GLIBC__) && \
++ (!defined(__FreeBSD__) || __FreeBSD_version < 500000)) || \
++ defined(CONFIG_SOLARIS)
+ #if defined(__OpenBSD__)
+ #define FE_RM FP_RM
+ #define FE_RP FP_RP
Index: qemu/fpu/softfloat.h
-@@ -84,7 +84,8 @@
+@@ -90,7 +90,8 @@
#define FLOAT128
#else
/* native float support */
--#if (defined(__i386__) || defined(__x86_64__)) && !defined(_BSD)
+-#if (defined(__i386__) || defined(__x86_64__)) && !defined(CONFIG_BSD)
+#if (defined(__i386__) || defined(__x86_64__)) && \
-+ (!defined(_BSD) || defined(__FreeBSD__))
++ (!defined(CONFIG_BSD) || defined(__FreeBSD__))
#define FLOATX80
#endif
#endif /* !CONFIG_SOFTFLOAT */
Index: qemu/target-ppc/op_helper.c
-@@ -303,6 +303,13 @@
- FT0 = sqrt(FT0);
+@@ -293,6 +293,13 @@
+ uint32_t exp = (u.ll >> 52) & 0x7FF;
+ return ((0 < exp) && (exp < 0x7FF));
}
-
++#else
+#ifndef isnormal
+#define isnormal(x) \
+ ((sizeof (x) == sizeof (float)) ? __isnormalf(x) \
+ : (sizeof (x) == sizeof (double)) ? __isnormal(x) \
+ : __isnormall(x))
+#endif
-+
- void do_fres (void)
- {
- union {
-Index: qemu/x86_64.ld
-@@ -2,7 +2,7 @@
- OUTPUT_FORMAT("elf64-x86-64", "elf64-x86-64", "elf64-x86-64")
- OUTPUT_ARCH(i386:x86-64)
- ENTRY(_start)
--SEARCH_DIR("/lib64"); SEARCH_DIR("/usr/lib64"); SEARCH_DIR("/usr/local/lib64");
-+SEARCH_DIR("/lib"); SEARCH_DIR("/usr/lib"); SEARCH_DIR("/usr/local/lib");
- SECTIONS
- {
- /* Read-only sections, merged into text segment: */
+ #endif
+
+ uint32_t helper_compute_fprf (uint64_t arg, uint32_t set_fprf)