Remove obsolete and broken Cygwin/X11 hacks. Forbid builds of the Windows

version from within the Unix/ directory.
This commit is contained in:
gbeauche 2005-07-03 13:39:06 +00:00
parent b7004b1199
commit 9c16ab1514
3 changed files with 14 additions and 54 deletions

View File

@ -14,6 +14,13 @@ dnl Some systems do not put corefiles in the currect directory, avoid saving
dnl cores for the configure tests since some are intended to dump core. dnl cores for the configure tests since some are intended to dump core.
ulimit -c 0 ulimit -c 0
dnl Invite Cygwin users to build within the Windows/ directory
case $target_os in
*cygwin* | *mingw32*)
AC_MSG_ERROR([You can only build the Windows version from its directory, Cygwin/X11 is not supported.])
;;
esac
dnl Options. dnl Options.
AC_ARG_ENABLE(jit, [ --enable-jit enable JIT compiler [default=yes]], [WANT_JIT=$enableval], [WANT_JIT=yes]) AC_ARG_ENABLE(jit, [ --enable-jit enable JIT compiler [default=yes]], [WANT_JIT=$enableval], [WANT_JIT=yes])
AC_ARG_ENABLE(ppc-emulator, [ --enable-ppc-emulator use the selected PowerPC emulator [default=auto]], [WANT_EMULATED_PPC=$enableval], [WANT_EMULATED_PPC=auto]) AC_ARG_ENABLE(ppc-emulator, [ --enable-ppc-emulator use the selected PowerPC emulator [default=auto]], [WANT_EMULATED_PPC=$enableval], [WANT_EMULATED_PPC=auto])
@ -135,21 +142,12 @@ fi
if [[ "x$WANT_SDL" = "xyes" ]]; then if [[ "x$WANT_SDL" = "xyes" ]]; then
AC_PATH_PROG(sdl_config, "sdl-config") AC_PATH_PROG(sdl_config, "sdl-config")
if [[ -n "$sdl_config" ]]; then if [[ -n "$sdl_config" ]]; then
case $target_os in sdl_cflags=`$sdl_config --cflags`
# Special treatment for Cygwin so that we can still use the POSIX layer if [[ "x$WANT_SDL_STATIC" = "xyes" ]]; then
*cygwin*) sdl_libs=`$sdl_config --static-libs`
sdl_cflags="-I`$sdl_config --prefix`/include/SDL" else
sdl_libs="-L`$sdl_config --exec-prefix`/lib -lSDL" sdl_libs=`$sdl_config --libs`
;; fi
*)
sdl_cflags=`$sdl_config --cflags`
if [[ "x$WANT_SDL_STATIC" = "xyes" ]]; then
sdl_libs=`$sdl_config --static-libs`
else
sdl_libs=`$sdl_config --libs`
fi
;;
esac
CFLAGS="$CFLAGS $sdl_cflags" CFLAGS="$CFLAGS $sdl_cflags"
CXXFLAGS="$CXXFLAGS $sdl_cflags" CXXFLAGS="$CXXFLAGS $sdl_cflags"
LIBS="$LIBS $sdl_libs" LIBS="$LIBS $sdl_libs"
@ -475,9 +473,6 @@ darwin*)
EXTFSSRC=../MacOSX/extfs_macosx.mm EXTFSSRC=../MacOSX/extfs_macosx.mm
fi fi
;; ;;
cygwin*)
SERIALSRC="../dummy/serial_dummy.cpp"
;;
esac esac
dnl Is the slirp library supported? dnl Is the slirp library supported?
@ -504,14 +499,7 @@ if [[ "x$WANT_SDL_VIDEO" = "xyes" ]]; then
if [[ "x$ac_cv_framework_Carbon" = "xyes" ]]; then if [[ "x$ac_cv_framework_Carbon" = "xyes" ]]; then
EXTRASYSSRCS="$EXTRASYSSRCS ../MacOSX/clip_macosx.cpp" EXTRASYSSRCS="$EXTRASYSSRCS ../MacOSX/clip_macosx.cpp"
else else
case "$target_os" in EXTRASYSSRCS="$EXTRASYSSRCS ../dummy/clip_dummy.cpp"
cygwin*)
EXTRASYSSRCS="$EXTRASYSSRCS ../Windows/clip_windows.cpp"
;;
*)
EXTRASYSSRCS="$EXTRASYSSRCS ../dummy/clip_dummy.cpp"
;;
esac
fi fi
else else
VIDEOSRCS="video_x.cpp" VIDEOSRCS="video_x.cpp"
@ -939,12 +927,6 @@ fi
dnl Check addressing mode to use dnl Check addressing mode to use
AC_MSG_CHECKING([for addressing mode to use]) AC_MSG_CHECKING([for addressing mode to use])
case "$os_target" in
cygwin*)
WANT_ADDRESSING_MODE="direct,cygwin-hack"
NATMEM_OFFSET=
;;
esac
if [[ "$EMULATED_PPC" != "yes" ]]; then if [[ "$EMULATED_PPC" != "yes" ]]; then
if [[ "$WANT_ADDRESSING_MODE" != "real" ]]; then if [[ "$WANT_ADDRESSING_MODE" != "real" ]]; then
AC_MSG_WARN([Running in native PowerPC mode, force use of Real Addressing.]) AC_MSG_WARN([Running in native PowerPC mode, force use of Real Addressing.])

View File

@ -83,20 +83,6 @@
#if !defined(EMULATED_PPC) #if !defined(EMULATED_PPC)
#define REAL_ADDRESSING 1 #define REAL_ADDRESSING 1
#include "ppc_asm.tmpl" #include "ppc_asm.tmpl"
#elif defined(__CYGWIN__)
#define DIRECT_ADDRESSING 1
#define DIRECT_ADDRESSING_HACK 1
/*
The following address translation functions were empirically
determined on a Windows XP system running Cygwin 1.5.12-1 so
that RAM size can be maximized (up to 960 MB) and avoiding
the use of a TLB. This also takes into account reduced address
space available when the Cygwin runtime is used.
*/
#define DIRECT_ADDRESSING_VIRT2PHYS(ADDR) \
((ADDR) + (((ADDR) < 0x41000000) ? 0x39000000 : 0xcf800000))
#define DIRECT_ADDRESSING_PHYS2VIRT(ADDR) \
((ADDR) - (((ADDR) >= 0x39000000) ? 0x39000000 : 0xcf800000))
#elif defined(NATMEM_OFFSET) #elif defined(NATMEM_OFFSET)
#define DIRECT_ADDRESSING 1 #define DIRECT_ADDRESSING 1
#else #else

View File

@ -205,19 +205,11 @@ const uintptr VMBaseDiff = NATMEM_OFFSET;
#if REAL_ADDRESSING || DIRECT_ADDRESSING #if REAL_ADDRESSING || DIRECT_ADDRESSING
static inline uint8 * vm_do_get_real_address(vm_addr_t addr) static inline uint8 * vm_do_get_real_address(vm_addr_t addr)
{ {
#if DIRECT_ADDRESSING_HACK
return (uint8 *)vm_wrap_address(DIRECT_ADDRESSING_VIRT2PHYS(addr));
#else
return (uint8 *)vm_wrap_address(VMBaseDiff + addr); return (uint8 *)vm_wrap_address(VMBaseDiff + addr);
#endif
} }
static inline vm_addr_t vm_do_get_virtual_address(uint8 *addr) static inline vm_addr_t vm_do_get_virtual_address(uint8 *addr)
{ {
#if DIRECT_ADDRESSING_HACK
return vm_wrap_address(DIRECT_ADDRESSING_PHYS2VIRT((uintptr)addr));
#else
return vm_wrap_address((uintptr)addr - VMBaseDiff); return vm_wrap_address((uintptr)addr - VMBaseDiff);
#endif
} }
static inline uint32 vm_read_memory_1(vm_addr_t addr) static inline uint32 vm_read_memory_1(vm_addr_t addr)
{ {