mirror of https://gitee.com/openkylin/qemu.git
Solaris 9/x86 support, by Ben Taylor.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2577 c046a42c-6fe2-441c-8c8c-71466251a162
This commit is contained in:
parent
e5febef5f1
commit
0475a5ca54
|
@ -217,6 +217,12 @@ LIBS+=-lwinmm -lws2_32 -liphlpapi
|
||||||
endif
|
endif
|
||||||
ifdef CONFIG_SOLARIS
|
ifdef CONFIG_SOLARIS
|
||||||
LIBS+=-lsocket -lnsl -lresolv
|
LIBS+=-lsocket -lnsl -lresolv
|
||||||
|
ifdef NEEDS_LIBSUNMATH
|
||||||
|
LIBS+=-lsunmath
|
||||||
|
LDFLAGS+=-L/opt/SUNWspro/prod/lib -R/opt/SUNWspro/prod/lib
|
||||||
|
OP_CFLAGS+=-I/opt/SUNWspro/prod/include/cc
|
||||||
|
BASE_CFLAGS+=-I/opt/SUNWspro/prod/include/cc
|
||||||
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# profiling code
|
# profiling code
|
||||||
|
|
|
@ -139,9 +139,21 @@ SunOS)
|
||||||
solaris="yes"
|
solaris="yes"
|
||||||
make="gmake"
|
make="gmake"
|
||||||
install="ginstall"
|
install="ginstall"
|
||||||
|
needs_libsunmath="no"
|
||||||
solarisrev=`uname -r | cut -f2 -d.`
|
solarisrev=`uname -r | cut -f2 -d.`
|
||||||
if [ "$cpu" = "i386" -o "$cpu" = "x86_64" ] ; then
|
if [ "$cpu" = "i386" -o "$cpu" = "x86_64" ] ; then
|
||||||
if test "$solarisrev" -ge 10 ; then
|
if test "$solarisrev" -le 9 ; then
|
||||||
|
if test -f /opt/SUNWspro/prod/lib/libsunmath.so.1; then
|
||||||
|
needs_libsunmath="yes"
|
||||||
|
else
|
||||||
|
echo "QEMU will not link correctly on Solaris 8/X86 or 9/x86 without"
|
||||||
|
echo "libsunmath from the Sun Studio compilers tools, due to a lack of"
|
||||||
|
echo "C99 math features in libm.so in Solaris 8/x86 and Solaris 9/x86"
|
||||||
|
echo "Studio 11 can be downloaded from www.sun.com."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
if test "$solarisrev" -ge 9 ; then
|
||||||
kqemu="yes"
|
kqemu="yes"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
@ -727,6 +739,10 @@ fi
|
||||||
if test "$solaris" = "yes" ; then
|
if test "$solaris" = "yes" ; then
|
||||||
echo "CONFIG_SOLARIS=yes" >> $config_mak
|
echo "CONFIG_SOLARIS=yes" >> $config_mak
|
||||||
echo "#define HOST_SOLARIS $solarisrev" >> $config_h
|
echo "#define HOST_SOLARIS $solarisrev" >> $config_h
|
||||||
|
if test "$needs_libsunmath" = "yes" ; then
|
||||||
|
echo "NEEDS_LIBSUNMATH=yes" >> $config_mak
|
||||||
|
echo "#define NEEDS_LIBSUNMATH 1" >> $config_h
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
if test "$gdbstub" = "yes" ; then
|
if test "$gdbstub" = "yes" ; then
|
||||||
echo "CONFIG_GDBSTUB=yes" >> $config_mak
|
echo "CONFIG_GDBSTUB=yes" >> $config_mak
|
||||||
|
|
|
@ -30,6 +30,25 @@ void set_floatx80_rounding_precision(int val STATUS_PARAM)
|
||||||
#define sqrtf(f) ((float)sqrt(f))
|
#define sqrtf(f) ((float)sqrt(f))
|
||||||
#define remainderf(fa, fb) ((float)remainder(fa, fb))
|
#define remainderf(fa, fb) ((float)remainder(fa, fb))
|
||||||
#define rintf(f) ((float)rint(f))
|
#define rintf(f) ((float)rint(f))
|
||||||
|
#if !defined(__sparc__) && HOST_SOLARIS < 10
|
||||||
|
extern long double rintl(long double);
|
||||||
|
extern long double scalbnl(long double, int);
|
||||||
|
|
||||||
|
long long
|
||||||
|
llrintl(long double x) {
|
||||||
|
return ((long long) rintl(x));
|
||||||
|
}
|
||||||
|
|
||||||
|
long
|
||||||
|
lrintl(long double x) {
|
||||||
|
return ((long) rintl(x));
|
||||||
|
}
|
||||||
|
|
||||||
|
long double
|
||||||
|
ldexpl(long double x, int n) {
|
||||||
|
return (scalbnl(x, n));
|
||||||
|
}
|
||||||
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(__powerpc__)
|
#if defined(__powerpc__)
|
||||||
|
|
|
@ -32,6 +32,10 @@ these four paragraphs for those parts of this code that are retained.
|
||||||
#ifndef SOFTFLOAT_H
|
#ifndef SOFTFLOAT_H
|
||||||
#define SOFTFLOAT_H
|
#define SOFTFLOAT_H
|
||||||
|
|
||||||
|
#if defined(HOST_SOLARIS) && defined(NEEDS_LIBSUNMATH)
|
||||||
|
#include <sunmath.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
#include <inttypes.h>
|
#include <inttypes.h>
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue