/* Configuration for an i386 running emx.  */

#define YES_UNDERSCORES

#include "i386/gstabs.h"

#define EMX
#define USG
#define HAVE_PUTENV
#define HAVE_VPRINTF
#define GCC_INCLUDE_DIR            "/emx/include"
#define GPLUSPLUS_INCLUDE_DIR      "/emx/include.gpp"
#define LOCAL_INCLUDE_DIR          "/usr/local/include"
#define CROSS_INCLUDE_DIR          "/emx/include.sys"
#define STANDARD_EXEC_PREFIX       "/emx/bin/"
#define STANDARD_STARTFILE_PREFIX  "/emx/lib/"
#define DEFAULT_TARGET_MACHINE     "emx"
#define EXECUTABLE_SUFFIX          ".exe"
#define PATH_SEPARATOR             ';'
#define HANDLE_SYSV_PRAGMA
#undef PCC_BITFIELD_TYPE_MATTERS
#define PCC_BITFIELD_TYPE_MATTERS 0
#define DEFAULT_PCC_STRUCT_RETURN 0
#define MKTEMP_EACH_FILE
#define ASM_SPEC "%{Zwait:-w}"
#define WORD_SWITCH_TAKES_ARG(STR) (DEFAULT_WORD_SWITCH_TAKES_ARG (STR) \
                                    || !strcmp (STR, "Zstack"))

#undef CPP_PREDEFINES
#define CPP_PREDEFINES "-D__32BIT__ -D__EMX__ -Di386 \
  -Asystem(unix) -Asystem(emx) -Acpu(i386) -Amachine(i386)"

#undef CPP_SPEC
#define CPP_SPEC "%{posix:-D_POSIX_SOURCE} %{Zmtd:-D__MT__} %{Zmts:-D__MT__} %{Zomf} %{ZC++-comments} %{Zc++-comments}"

#define ASM_FINAL_SPEC "%{Zomf:\n emxomf %{s} %{c:%W{o*}%{!o*:-o %w%b.obj}}\
                                         %{!c:-o %d%w%b.obj} %g.o}"

#define STARTFILE_SPEC \
  "%{Zomf:%{Zdll:dll0.obj%s}%{!Zdll:crt0.obj%s}}" \
  "%{!Zomf:%{Zdll:dll0.o%s}" \
          "%{!Zdll:%{pg:gcrt0.o%s}%{!pg:%{p:mcrt0.o%s}%{!p:crt0.o%s}}}}"

#define LIB_SPEC \
  "%{g*:-lg} %{!p:%{!pg:%{!Zmts:-lc}%{Zmts:-lcmt}}}%{p:-lc_p}%{pg:-lc_p}"

#undef SUBTARGET_SWITCHES
#define SUBTARGET_SWITCHES  \
    { "probe", 0400},				\
    { "no-probe", -0400},

/* Use a stack probe */
#define TARGET_PROBE (target_flags & 0400)

#define PROBE_SIZE         0x1000
#define PROBE_MAX_INLINE   0x10000
