--- gcc/config/mips-svr4.h 2018/04/24 17:55:24 1.1 +++ gcc/config/mips-svr4.h 2018/04/24 18:06:24 1.1.1.3 @@ -19,7 +19,8 @@ the Free Software Foundation, 675 Mass A #define MIPS_SVR4 -#define CPP_PREDEFINES "-Dmips -Dunix -Dhost_mips -DMIPSEB -DR3000 -DSYSTYPE_SVR4" +#define CPP_PREDEFINES "-Dmips -Dunix -Dhost_mips -DMIPSEB -DR3000 -DSYSTYPE_SVR4 \ +-D_mips -D_unix -D_host_mips -D_MIPSEB -D_R3000 -D_SYSTYPE_SVR4" #define SYSTEM_INCLUDE_DIR "/svr4/usr/include" @@ -36,7 +37,7 @@ the Free Software Foundation, 675 Mass A %{!mgas: \ %{EB} %{!EB:-EB} \ %{EL: %e-EL not supported} \ - %{bestGnum} \ + %{bestGnum} %{shared} %{non_shared} \ %{mips1} %{mips2} %{mips3} \ -systype /svr4/}" @@ -46,4 +47,25 @@ the Free Software Foundation, 675 Mass A #define MACHINE_TYPE "RISC-OS System V.4 Mips" +/* Override defaults for finding the MIPS tools. */ +#define MD_STARTFILE_PREFIX "/svr4/usr/lib/cmplrs/cc/" +#define MD_EXEC_PREFIX "/svr4/usr/lib/cmplrs/cc/" + +/* Mips System V.4 doesn't have a getpagesize() function needed by the + trampoline code, so use the POSIX sysconf function to get it. + This is only done when compiling the trampoline code. */ + +#ifdef L_trampoline +#include + +#define getpagesize() sysconf(_SC_PAGE_SIZE) +#endif /* L_trampoline */ + +/* Use atexit for static constructors/destructors, instead of defining + our own exit function. */ +#define HAVE_ATEXIT + +/* Generate calls to memcpy, etc., not bcopy, etc. */ +#define TARGET_MEM_FUNCTIONS + #include "mips.h"