#define MIPS_SYSV
#define CPP_PREDEFINES "\
-Dmips -Dunix -Dhost_mips -DMIPSEB -DR3000 -DSYSTYPE_SYSV \
-D_mips -D_unix -D_host_mips -D_MIPSEB -D_R3000 -D_SYSTYPE_SYSV \
-Asystem=unix -Asystem=svr3 -Acpu=mips -Amachine=mips"
#define STANDARD_INCLUDE_DIR "/sysv/usr/include"
#define LINK_SPEC "\
%{G*} %{EB} %{EL} %{mips1} %{mips2} %{mips3} \
%{bestGnum} %{shared} %{non_shared} \
%{call_shared} %{no_archive} %{exact_version} \
%{!shared: %{!non_shared: %{!call_shared: -non_shared}}} \
-systype /sysv/ "
#define LIB_SPEC "%{p:-lprof1} %{pg:-lprof1} -lc crtn.o%s"
#define STARTFILE_SPEC "%{pg:gcrt0.o%s}%{!pg:%{p:mcrt0.o%s}%{!p:crt1.o%s}}"
#define MACHINE_TYPE "RISC-OS System V Mips"
#define MD_STARTFILE_PREFIX "/sysv/usr/lib/cmplrs/cc/"
#define MD_EXEC_PREFIX "/sysv/usr/lib/cmplrs/cc/"
#ifdef L_trampoline
#include <sys/param.h>
#include <unistd.h>
#ifdef _SC_PAGESIZE
#define _SC_PAGE_SIZE _SC_PAGESIZE
#endif
#ifdef _SC_PAGE_SIZE
#define getpagesize() sysconf(_SC_PAGE_SIZE)
#else
#define getpagesize() (NBPC)
#endif
#endif
#define TARGET_MEM_FUNCTIONS
#include "mips/mips.h"
#undef ASM_OUTPUT_ASCII
#define ASM_OUTPUT_ASCII(FILE,PTR,LEN) \
do { \
const unsigned char *s; \
size_t i, limit = (LEN); \
for (i = 0, s = (const unsigned char *)(PTR); i < limit; s++, i++) \
{ \
if ((i % 8) == 0) \
fputs ("\n\t.byte\t", (FILE)); \
fprintf ((FILE), "%s0x%x", (i%8?",":""), (unsigned)*s); \
} \
fputs ("\n", (FILE)); \
} while (0)