1
0
mirror of https://git.FreeBSD.org/ports.git synced 2025-02-02 11:09:29 +00:00

o Oops, I forgot to commit 2 patches.

o In some environment, qemu missing 2 patches might be able
  to compiled.  So I bump PORTREVISION.

Pointed out by:	Jung-uk Kim <jkim@niksun.com>
		Juergen Lock <nox@jelal.kn-bremen.de> (maintainer)
		Mark Treacy <mark.treacy@gmail.com>
		pointyhat via kris
This commit is contained in:
Norikatsu Shigemura 2005-05-03 04:02:46 +00:00
parent cf5c3f74c6
commit 230fca0f1f
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=134523
6 changed files with 5332 additions and 0 deletions

View File

@ -7,6 +7,7 @@
PORTNAME= qemu
PORTVERSION= 0.7.0
POTREVISION= 1
CATEGORIES= emulators
MASTER_SITES= http://www.qemu.org/

View File

@ -0,0 +1,141 @@
Index: qemu/Makefile
@@ -13,7 +13,7 @@
endif
DOCS=qemu-doc.html qemu-tech.html qemu.1 qemu-img.1
-all: dyngen$(EXESUF) $(TOOLS) $(DOCS)
+all: bsd/libmath.a dyngen$(EXESUF) $(TOOLS) $(DOCS)
for d in $(TARGET_DIRS); do \
$(MAKE) -C $$d $@ || exit 1 ; \
done
@@ -25,6 +25,9 @@
endif
endif
+bsd/libmath.a:
+ ( cd bsd ; $(BSD_MAKE) CC=$(CC) )
+
qemu-img$(EXESUF): qemu-img.c block.c block-cow.c block-qcow.c aes.c block-vmdk.c block-cloop.c block-dmg.c block-bochs.c block-vpc.c
$(CC) -DQEMU_TOOL $(CFLAGS) $(LDFLAGS) $(DEFINES) -o $@ $^ -lz $(LIBS)
@@ -33,6 +36,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
Index: qemu/Makefile.target
@@ -391,8 +391,8 @@
VL_LDFLAGS+=-Wl,-G0 -Wl,-T,$(SRC_PATH)/ia64.ld
endif
-$(QEMU_SYSTEM): $(VL_OBJS) libqemu.a
- $(CC) $(VL_LDFLAGS) -o $@ $^ $(LIBS) $(SDL_LIBS) $(COCOA_LIBS) $(VL_LIBS)
+$(QEMU_SYSTEM): $(VL_OBJS) libqemu.a ../bsd/libmath.a
+ $(CC) $(VL_LDFLAGS) -o $@ $^ $(LIBS) $(SDL_LIBS) $(COCOA_LIBS) $(VL_LIBS) ../bsd/libmath.a
cocoa.o: cocoa.m
$(CC) $(CFLAGS) $(DEFINES) -c -o $@ $<
Index: qemu/fpu/softfloat-native.c
@@ -2,11 +2,15 @@
context is supported */
#include "softfloat.h"
#include <math.h>
+#if defined(__FreeBSD__) && __FreeBSD_version < 500000
+#include <ieeefp.h>
+#endif
void set_float_rounding_mode(int val STATUS_PARAM)
{
STATUS(float_rounding_mode) = val;
-#if defined(_BSD) && !defined(__APPLE__)
+#if defined(_BSD) && !defined(__APPLE__) && \
+ (defined(__FreeBSD__) && __FreeBSD_version < 500000)
fpsetround(val);
#elif defined(__arm__)
/* nothing to do */
@@ -22,7 +26,7 @@
}
#endif
-#if defined(_BSD)
+#if defined(_BSD) && !defined(__FreeBSD__)
#define lrint(d) ((int32_t)rint(d))
#define llrint(d) ((int64_t)rint(d))
#endif
Index: qemu/fpu/softfloat-native.h
@@ -1,7 +1,17 @@
/* Native implementation of soft float functions */
#include <math.h>
-#if defined(_BSD) && !defined(__APPLE__)
+#if defined(_BSD) && !defined(__APPLE__) && \
+ (!defined(__FreeBSD__) || __FreeBSD_version < 500000)
#include <ieeefp.h>
+#if defined(__FreeBSD__)
+#define isgreater(x, y) __builtin_isgreater((x), (y))
+#define isgreaterequal(x, y) __builtin_isgreaterequal((x), (y))
+#define isless(x, y) __builtin_isless((x), (y))
+#define islessequal(x, y) __builtin_islessequal((x), (y))
+#define islessgreater(x, y) __builtin_islessgreater((x), (y))
+#define isunordered(x, y) __builtin_isunordered((x), (y))
+long double fabsl(long double x);
+#endif
#else
#include <fenv.h>
#endif
@@ -33,12 +43,13 @@
/*----------------------------------------------------------------------------
| Software IEC/IEEE floating-point rounding mode.
*----------------------------------------------------------------------------*/
-#if defined(_BSD) && !defined(__APPLE__)
+#if defined(_BSD) && !defined(__APPLE__) && \
+ (!defined(__FreeBSD__) || __FreeBSD_version < 500000)
enum {
float_round_nearest_even = FP_RN,
- float_round_down = FE_RM,
- float_round_up = FE_RP,
- float_round_to_zero = FE_RZ
+ float_round_down = FP_RM,
+ float_round_up = FP_RP,
+ float_round_to_zero = FP_RZ
};
#elif defined(__arm__)
enum {
Index: qemu/fpu/softfloat.h
@@ -84,7 +84,8 @@
#define FLOAT128
#else
/* native float support */
-#if (defined(__i386__) || defined(__x86_64__)) && !defined(_BSD)
+#if (defined(__i386__) || defined(__x86_64__)) && \
+ (!defined(_BSD) || defined(__FreeBSD__))
#define FLOATX80
#endif
#endif /* !CONFIG_SOFTFLOAT */
Index: qemu/target-ppc/op_helper.c
@@ -303,6 +303,13 @@
FT0 = sqrt(FT0);
}
+#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: */

File diff suppressed because it is too large Load Diff

View File

@ -7,6 +7,7 @@
PORTNAME= qemu
PORTVERSION= 0.7.0
POTREVISION= 1
CATEGORIES= emulators
MASTER_SITES= http://www.qemu.org/

View File

@ -0,0 +1,141 @@
Index: qemu/Makefile
@@ -13,7 +13,7 @@
endif
DOCS=qemu-doc.html qemu-tech.html qemu.1 qemu-img.1
-all: dyngen$(EXESUF) $(TOOLS) $(DOCS)
+all: bsd/libmath.a dyngen$(EXESUF) $(TOOLS) $(DOCS)
for d in $(TARGET_DIRS); do \
$(MAKE) -C $$d $@ || exit 1 ; \
done
@@ -25,6 +25,9 @@
endif
endif
+bsd/libmath.a:
+ ( cd bsd ; $(BSD_MAKE) CC=$(CC) )
+
qemu-img$(EXESUF): qemu-img.c block.c block-cow.c block-qcow.c aes.c block-vmdk.c block-cloop.c block-dmg.c block-bochs.c block-vpc.c
$(CC) -DQEMU_TOOL $(CFLAGS) $(LDFLAGS) $(DEFINES) -o $@ $^ -lz $(LIBS)
@@ -33,6 +36,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
Index: qemu/Makefile.target
@@ -391,8 +391,8 @@
VL_LDFLAGS+=-Wl,-G0 -Wl,-T,$(SRC_PATH)/ia64.ld
endif
-$(QEMU_SYSTEM): $(VL_OBJS) libqemu.a
- $(CC) $(VL_LDFLAGS) -o $@ $^ $(LIBS) $(SDL_LIBS) $(COCOA_LIBS) $(VL_LIBS)
+$(QEMU_SYSTEM): $(VL_OBJS) libqemu.a ../bsd/libmath.a
+ $(CC) $(VL_LDFLAGS) -o $@ $^ $(LIBS) $(SDL_LIBS) $(COCOA_LIBS) $(VL_LIBS) ../bsd/libmath.a
cocoa.o: cocoa.m
$(CC) $(CFLAGS) $(DEFINES) -c -o $@ $<
Index: qemu/fpu/softfloat-native.c
@@ -2,11 +2,15 @@
context is supported */
#include "softfloat.h"
#include <math.h>
+#if defined(__FreeBSD__) && __FreeBSD_version < 500000
+#include <ieeefp.h>
+#endif
void set_float_rounding_mode(int val STATUS_PARAM)
{
STATUS(float_rounding_mode) = val;
-#if defined(_BSD) && !defined(__APPLE__)
+#if defined(_BSD) && !defined(__APPLE__) && \
+ (defined(__FreeBSD__) && __FreeBSD_version < 500000)
fpsetround(val);
#elif defined(__arm__)
/* nothing to do */
@@ -22,7 +26,7 @@
}
#endif
-#if defined(_BSD)
+#if defined(_BSD) && !defined(__FreeBSD__)
#define lrint(d) ((int32_t)rint(d))
#define llrint(d) ((int64_t)rint(d))
#endif
Index: qemu/fpu/softfloat-native.h
@@ -1,7 +1,17 @@
/* Native implementation of soft float functions */
#include <math.h>
-#if defined(_BSD) && !defined(__APPLE__)
+#if defined(_BSD) && !defined(__APPLE__) && \
+ (!defined(__FreeBSD__) || __FreeBSD_version < 500000)
#include <ieeefp.h>
+#if defined(__FreeBSD__)
+#define isgreater(x, y) __builtin_isgreater((x), (y))
+#define isgreaterequal(x, y) __builtin_isgreaterequal((x), (y))
+#define isless(x, y) __builtin_isless((x), (y))
+#define islessequal(x, y) __builtin_islessequal((x), (y))
+#define islessgreater(x, y) __builtin_islessgreater((x), (y))
+#define isunordered(x, y) __builtin_isunordered((x), (y))
+long double fabsl(long double x);
+#endif
#else
#include <fenv.h>
#endif
@@ -33,12 +43,13 @@
/*----------------------------------------------------------------------------
| Software IEC/IEEE floating-point rounding mode.
*----------------------------------------------------------------------------*/
-#if defined(_BSD) && !defined(__APPLE__)
+#if defined(_BSD) && !defined(__APPLE__) && \
+ (!defined(__FreeBSD__) || __FreeBSD_version < 500000)
enum {
float_round_nearest_even = FP_RN,
- float_round_down = FE_RM,
- float_round_up = FE_RP,
- float_round_to_zero = FE_RZ
+ float_round_down = FP_RM,
+ float_round_up = FP_RP,
+ float_round_to_zero = FP_RZ
};
#elif defined(__arm__)
enum {
Index: qemu/fpu/softfloat.h
@@ -84,7 +84,8 @@
#define FLOAT128
#else
/* native float support */
-#if (defined(__i386__) || defined(__x86_64__)) && !defined(_BSD)
+#if (defined(__i386__) || defined(__x86_64__)) && \
+ (!defined(_BSD) || defined(__FreeBSD__))
#define FLOATX80
#endif
#endif /* !CONFIG_SOFTFLOAT */
Index: qemu/target-ppc/op_helper.c
@@ -303,6 +303,13 @@
FT0 = sqrt(FT0);
}
+#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: */

File diff suppressed because it is too large Load Diff