--- gcc/config/mips-sysv.h 2018/04/24 17:51:31 1.1 +++ gcc/config/mips-sysv.h 2018/04/24 17:58:37 1.1.1.3 @@ -19,17 +19,11 @@ the Free Software Foundation, 675 Mass A #define MIPS_SYSV -#define CPP_PREDEFINES "-Dmips -Dunix -Dhost_mips -DMIPSEB -DR3000" +#define CPP_PREDEFINES "-Dmips -Dunix -Dhost_mips -DMIPSEB -DR3000 -DSYSTYPE_SYSV" -#define MD_STARTFILE_PREFIX "/usr/lib/cmplrs/cc" +#define SYSTEM_INCLUDE_DIR "/sysv/usr/include" #define CPP_SPEC "\ -%{!ansi: %{!ZBSD43: -DSYSTYPE_SYSV} \ - %{ZBSD43: -DSYSTYPE_BSD43}} \ -%{!ZBSD43: -D__SYSTYPE_SYSV__} \ -%{ZBSD43: -D__SYSTYPE_BSD43__} \ -%{!nostdinc: %{!ZBSD43: -I/sysv/usr/include} \ - %{ZBSD43: -I/bsd43/usr/include}} \ %{.cc: -D__LANGUAGE_C_PLUS_PLUS -D_LANGUAGE_C_PLUS_PLUS} \ %{.cxx: -D__LANGUAGE_C_PLUS_PLUS -D_LANGUAGE_C_PLUS_PLUS} \ %{.C: -D__LANGUAGE_C_PLUS_PLUS -D_LANGUAGE_C_PLUS_PLUS} \ @@ -43,8 +37,8 @@ the Free Software Foundation, 675 Mass A %{EB} %{!EB:-EB} \ %{EL: %e-EL not supported} \ %{bestGnum} \ - %{!ZBSD43: -systype /sysv/} \ - %{ZBSD43: -systype /bsd43/}}" + %{mips1} %{mips2} %{mips3} \ + -systype /sysv/}" #define LIB_SPEC "%{p:-lprof1} %{pg:-lprof1} -lc crtn.o%s" @@ -52,4 +46,27 @@ the Free Software Foundation, 675 Mass A #define MACHINE_TYPE "RISC-OS System V Mips" +/* Override defaults for finding the MIPS tools. */ +#define MD_STARTFILE_PREFIX "/sysv/usr/lib/cmplrs/cc/" +#define MD_EXEC_PREFIX "/sysv/usr/lib/cmplrs/cc/" + +/* Mips System V 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 +#include + +#ifdef _SC_PAGE_SIZE +#define getpagesize() sysconf(_SC_PAGE_SIZE) + +#else /* older rev of OS */ +#define getpagesize() (NBPC) +#endif /* !_SC_PAGE_SIZE */ +#endif /* L_trampoline */ + +/* Generate calls to memcpy, etc., not bcopy, etc. */ +#define TARGET_MEM_FUNCTIONS + #include "mips.h"