mirror of
https://github.com/kanjitalk755/macemu.git
synced 2025-01-26 16:31:11 +00:00
Add --with-dgcc=COMPILER to use C++ COMPILER (gcc) suitable to compile
synthetic opcodes. Auto-detect ICC and force use of gcc for DYNGEN_CC.
This commit is contained in:
parent
815390707a
commit
680326da55
@ -22,6 +22,7 @@ LIBS = @LIBS@
|
||||
SYSSRCS = @SYSSRCS@
|
||||
CPUSRCS = @CPUSRCS@
|
||||
DYNGENSRCS = @DYNGENSRCS@
|
||||
DYNGEN_CC = @DYNGEN_CC@
|
||||
DYNGEN_OP_FLAGS = @DYNGEN_OP_FLAGS@
|
||||
BLESS = @BLESS@
|
||||
INSTALL = @INSTALL@
|
||||
@ -118,13 +119,13 @@ dyngen: $(DYNGENOBJS)
|
||||
|
||||
$(OBJ_DIR)/basic-dyngen.o: basic-dyngen-ops.hpp
|
||||
$(OBJ_DIR)/basic-dyngen-ops.o: ../kpx_cpu/src/cpu/jit/basic-dyngen-ops.cpp
|
||||
$(CXX) $(CPPFLAGS) $(DEFS) $(CXXFLAGS) $(DYNGEN_OP_FLAGS) -c $< -o $@
|
||||
$(DYNGEN_CC) $(CPPFLAGS) $(DEFS) $(CXXFLAGS) $(DYNGEN_OP_FLAGS) -c $< -o $@
|
||||
basic-dyngen-ops.hpp: $(OBJ_DIR)/basic-dyngen-ops.o dyngen
|
||||
./dyngen -o $@ $<
|
||||
|
||||
$(OBJ_DIR)/ppc-dyngen.o: ppc-dyngen-ops.hpp
|
||||
$(OBJ_DIR)/ppc-dyngen-ops.o: ../kpx_cpu/src/cpu/ppc/ppc-dyngen-ops.cpp
|
||||
$(CXX) $(CPPFLAGS) $(DEFS) $(CXXFLAGS) $(DYNGEN_OP_FLAGS) -c $< -o $@
|
||||
$(DYNGEN_CC) $(CPPFLAGS) $(DEFS) $(CXXFLAGS) $(DYNGEN_OP_FLAGS) -c $< -o $@
|
||||
ppc-dyngen-ops.hpp: $(OBJ_DIR)/ppc-dyngen-ops.o dyngen
|
||||
./dyngen -o $@ $<
|
||||
|
||||
|
@ -18,6 +18,7 @@ AC_ARG_ENABLE(vosf, [ --enable-vosf enable video on SEGV sign
|
||||
AC_ARG_WITH(esd, [ --with-esd support ESD for sound under Linux/FreeBSD [default=yes]], [WANT_ESD=$withval], [WANT_ESD=yes])
|
||||
AC_ARG_WITH(gtk, [ --with-gtk use GTK user interface [default=yes]], [WANT_GTK=$withval], [WANT_GTK=yes])
|
||||
AC_ARG_WITH(mon, [ --with-mon use mon as debugger [default=yes]], [WANT_MON=$withval], [WANT_MON=yes])
|
||||
AC_ARG_WITH(dgcc, [ --with-dgcc=COMPILER use C++ COMPILER to compile synthetic opcodes], [DYNGEN_CC=$withval])
|
||||
|
||||
dnl Checks for programs.
|
||||
AC_PROG_CC
|
||||
@ -647,6 +648,14 @@ AC_EGREP_CPP(xyes,
|
||||
#endif
|
||||
], [AC_MSG_RESULT(yes); HAVE_GCC30=yes], AC_MSG_RESULT(no))
|
||||
|
||||
dnl Check for ICC.
|
||||
AC_MSG_CHECKING(for ICC)
|
||||
HAVE_ICC=no
|
||||
if $CXX -V -v 2>&1 | grep -q "Intel(R) C++ Compiler"; then
|
||||
HAVE_ICC=yes
|
||||
fi
|
||||
AC_MSG_RESULT($HAVE_ICC)
|
||||
|
||||
# Test if the compiler can generate ELF objects
|
||||
AC_CACHE_CHECK([whether the compiler can generate ELF objects],
|
||||
ac_cv_elf_objects, [
|
||||
@ -690,6 +699,22 @@ if [[ "x$EMULATED_PPC" = "xyes" ]]; then
|
||||
ac_cv_use_dyngen=no
|
||||
;;
|
||||
esac
|
||||
dnl Check for a suitable synthetic opcodes compiler (icc is faking itself as gcc 3.2.2)
|
||||
if [[ -z "$DYNGEN_CC" ]]; then
|
||||
if [[ "x$HAVE_GCC27" = "xyes" -a "x$HAVE_ICC" = "xno" ]]; then
|
||||
DYNGEN_CC=$CXX
|
||||
else
|
||||
for p in /usr/bin /usr/local/bin; do
|
||||
gxx="$p/g++"
|
||||
if [[ -x "$gxx" ]]; then
|
||||
DYNGEN_CC="$gxx"
|
||||
fi
|
||||
done
|
||||
fi
|
||||
fi
|
||||
if [[ -z "$DYNGEN_CC" ]] || ! { echo '#include <limits>' | $DYNGEN_CC -xc++ -c -o /dev/null - >& /dev/null; }; then
|
||||
ac_cv_use_dyngen=no
|
||||
fi
|
||||
])
|
||||
if [[ "x$ac_cv_use_dyngen" = "xyes" ]]; then
|
||||
case $host_cpu in
|
||||
@ -754,6 +779,7 @@ fi
|
||||
|
||||
dnl Generate Makefile.
|
||||
AC_SUBST(DYNGENSRCS)
|
||||
AC_SUBST(DYNGEN_CC)
|
||||
AC_SUBST(DYNGEN_OP_FLAGS)
|
||||
AC_SUBST(SYSSRCS)
|
||||
AC_SUBST(CPUSRCS)
|
||||
|
Loading…
x
Reference in New Issue
Block a user