cross-compilation fixes

This commit is contained in:
gbeauche 2005-03-24 23:39:19 +00:00
parent 35a29f57df
commit d9a8a5c10f
3 changed files with 16 additions and 5 deletions

View File

@ -14,6 +14,7 @@ man1dir = $(mandir)/man1
DESTDIR =
LN_S = @LN_S@
WINDRES = @WINDRES@
CC = @CC@
CXX = @CXX@
CFLAGS = @CFLAGS@
@ -115,7 +116,7 @@ $(OBJ_DIR)/%.o : %.S
# Windows resources
$(OBJ_DIR)/%.o: %.rc
windres --include-dir ../Windows -i $< -o $@
$(WINDRES) --include-dir ../Windows -i $< -o $@
# Kheperix CPU emulator
kpxsrcdir = ../kpx_cpu/src
@ -126,7 +127,7 @@ ifeq ($(USE_DYNGEN),yes)
DYNGENDEPS = basic-dyngen-ops.hpp ppc-dyngen-ops.hpp
$(DYNGEN): $(DYNGENOBJS)
$(CXX) -o $@ $(LDFLAGS) $(DYNGENOBJS)
$(HOST_CXX) -o $@ $(LDFLAGS) $(DYNGENOBJS)
$(OBJ_DIR)/basic-dyngen.o: basic-dyngen-ops.hpp
$(OBJ_DIR)/basic-dyngen-ops.o: $(kpxsrcdir)/cpu/jit/basic-dyngen-ops.cpp

View File

@ -22,6 +22,7 @@ AC_PROG_MAKE_SET
AC_PROG_EGREP
AC_PROG_LN_S
AC_PATH_PROG(PERL, [perl])
AC_CHECK_TOOL(WINDRES, windres)
dnl We use 64-bit file size support if possible.
AC_SYS_LARGEFILE
@ -41,6 +42,7 @@ AC_CHECK_SIZEOF(float, 4)
AC_CHECK_SIZEOF(double, 8)
AC_CHECK_SIZEOF(void *, 4)
AC_TYPE_OFF_T
AC_CHECK_TYPES(loff_t)
AC_TYPE_SIZE_T
dnl Checks for library functions.
@ -129,8 +131,8 @@ AC_CACHE_CHECK([whether we can skip instruction in SIGSEGV handler],
#include "../Unix/vm_alloc.cpp"
#include "../Unix/sigsegv.cpp"
], ac_cv_have_skip_instruction=yes, ac_cv_have_skip_instruction=no,
dnl When cross-compiling, do not assume anything.
ac_cv_have_skip_instruction=no
dnl When cross-compiling, assume it works
ac_cv_have_skip_instruction="yes"
)
AC_LANG_RESTORE
]
@ -199,7 +201,7 @@ fi
CPUSRCS="$CPUSRCS ../kpx_cpu/sheepshaver_glue.cpp"
dnl We really want SDL for now
AC_PATH_PROG(sdl_config, "sdl-config", [AC_MSG_ERROR([Sorry, you currently need SDL for this port])])
AC_CHECK_TOOL(sdl_config, sdl-config, [AC_MSG_ERROR([Sorry, you currently need SDL for this port])])
sdl_cflags=`$sdl_config --cflags`
sdl_libs=`$sdl_config --libs`
CFLAGS="$CFLAGS $sdl_cflags"

View File

@ -37,12 +37,18 @@
#include <stdlib.h>
#include <stdint.h>
#include <string.h>
#include <time.h>
#ifdef __WIN32__
#include <windows.h>
#endif
#include <sys/types.h>
// Define for external components
#define SHEEPSHAVER 1
#define POWERPC_ROM 1
#define EMULATED_PPC 1
#define CONFIG_WIN32 1
// Use Direct Addressing mode
#define DIRECT_ADDRESSING 1
@ -378,7 +384,9 @@ extern uint32 call_macos7(uint32 tvect, uint32 arg1, uint32 arg2, uint32 arg3, u
#endif
// Misc platform specific definitions
#ifdef __WIN32__
typedef int64 loff_t;
#endif
#define ATTRIBUTE_PACKED __attribute__((__packed__))
#endif