Import final gcc2 snapshot (990109)
[official-gcc.git] / gcc / config / mips / svr4-5.h
blob799e1cdf1e759afd638b497eada36508b4c41132
1 /* Definitions of target machine for GNU compiler.
2 MIPS RISC-OS 5.0 System V.4 version.
3 Copyright (C) 1992 Free Software Foundation, Inc.
5 This file is part of GNU CC.
7 GNU CC is free software; you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation; either version 2, or (at your option)
10 any later version.
12 GNU CC is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
17 You should have received a copy of the GNU General Public License
18 along with GNU CC; see the file COPYING. If not, write to
19 the Free Software Foundation, 59 Temple Place - Suite 330,
20 Boston, MA 02111-1307, USA. */
22 #define MIPS_SVR4
24 #define CPP_PREDEFINES \
25 "-Dmips -Dunix -Dhost_mips -DMIPSEB -DR3000 -DSYSTYPE_SVR4 \
26 -D_mips -D_unix -D_host_mips -D_MIPSEB -D_R3000 -D_SYSTYPE_SVR4 \
27 -D_MIPS_SZINT=32 -D_MIPS_SZLONG=32 -D_MIPS_SZPTR=32 \
28 -Asystem(unix) -Asystem(svr4) -Acpu(mips) -Amachine(mips)"
30 #define STANDARD_INCLUDE_DIR "/svr4/usr/include"
32 #define LINK_SPEC "\
33 %{G*} %{EB} %{EL} %{mips1} %{mips2} %{mips3} \
34 %{bestGnum} %{shared} %{non_shared} \
35 %{call_shared} %{no_archive} %{exact_version} \
36 %{!shared: %{!non_shared: %{!call_shared: -non_shared}}} \
37 -systype /svr4/ "
39 #define LIB_SPEC "%{p:-lprof1} %{pg:-lprof1} -lc crtn.o%s"
41 #define STARTFILE_SPEC "%{pg:gcrt0.o%s}%{!pg:%{p:mcrt0.o%s}%{!p:crt1.o%s}}\
42 %{ansi:/svr4/usr/ccs/lib/values-Xc.o%s} \
43 %{!ansi: \
44 %{traditional:/svr4/usr/ccs/lib/values-Xt.o%s} \
45 %{!traditional:/svr4/usr/ccs/lib/values-Xa.o%s}}"
47 #define MACHINE_TYPE "RISC-OS System V.4 Mips"
49 /* Override defaults for finding the MIPS tools. */
50 #define MD_STARTFILE_PREFIX "/svr4/usr/lib/cmplrs/cc/"
51 #define MD_EXEC_PREFIX "/svr4/usr/lib/cmplrs/cc/"
53 /* Mips System V.4 doesn't have a getpagesize() function needed by the
54 trampoline code, so use the POSIX sysconf function to get it.
55 This is only done when compiling the trampoline code. */
57 #ifdef L_trampoline
58 #include <unistd.h>
60 /* In at least 5.0 and 5.01, there is no _SC_PAGE_SIZE macro, only a
61 _SC_PAGESIZE macro. */
62 #ifdef _SC_PAGESIZE
63 #define _SC_PAGE_SIZE _SC_PAGESIZE
64 #endif
66 #define getpagesize() sysconf(_SC_PAGE_SIZE)
67 #endif /* L_trampoline */
69 /* Use atexit for static constructors/destructors, instead of defining
70 our own exit function. */
71 #define HAVE_ATEXIT
73 /* Generate calls to memcpy, etc., not bcopy, etc. */
74 #define TARGET_MEM_FUNCTIONS
76 #include "mips/mips.h"
78 /* Some assemblers have a bug that causes backslash escaped chars in .ascii
79 to be misassembled, so we just completely avoid it. */
80 #undef ASM_OUTPUT_ASCII
81 #define ASM_OUTPUT_ASCII(FILE,PTR,LEN) \
82 do { \
83 unsigned char *s; \
84 int i; \
85 for (i = 0, s = (unsigned char *)(PTR); i < (LEN); s++, i++) \
86 { \
87 if ((i % 8) == 0) \
88 fputs ("\n\t.byte\t", (FILE)); \
89 fprintf ((FILE), "%s0x%x", (i%8?",":""), (unsigned)*s); \
90 } \
91 fputs ("\n", (FILE)); \
92 } while (0)