(TARGET_CPU_arm*, TARGET_CPU_strongarm*, TARGET_CPU_generic):
[official-gcc.git] / gcc / config / arm / riscix.h
blob9c1af465b034a6bd1cf83003c7be9fd60c0df644
1 /* Definitions of target machine for GNU compiler. ARM RISCiX version.
2 Copyright (C) 1993, 1994, 1995 Free Software Foundation, Inc.
3 Contributed by Richard Earnshaw (rwe11@cl.cam.ac.uk), based on original
4 work by Pieter `Tiggr' Schoenmakers (rcpieter@win.tue.nl)
5 and Martin Simmons (@harleqn.co.uk).
7 This file is part of GNU CC.
9 GNU CC is free software; you can redistribute it and/or modify
10 it under the terms of the GNU General Public License as published by
11 the Free Software Foundation; either version 2, or (at your option)
12 any later version.
14 GNU CC is distributed in the hope that it will be useful,
15 but WITHOUT ANY WARRANTY; without even the implied warranty of
16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 GNU General Public License for more details.
19 You should have received a copy of the GNU General Public License
20 along with GNU CC; see the file COPYING. If not, write to
21 the Free Software Foundation, 59 Temple Place - Suite 330,
22 Boston, MA 02111-1307, USA. */
24 /* Translation to find startup files. On RISC iX boxes,
25 crt0, mcrt0 and gcrt0.o are in /usr/lib. */
26 #define STARTFILE_SPEC "\
27 %{pg:/usr/lib/gcrt0.o%s}\
28 %{!pg:%{p:/usr/lib/mcrt0.o%s}\
29 %{!p:/usr/lib/crt0.o%s}}"
31 /* RISC iX has no concept of -lg */
32 /* If -static is specified then link with -lc_n */
34 #ifndef LIB_SPEC
35 #define LIB_SPEC "\
36 %{g*:-lg}\
37 %{!p:%{!pg:%{!static:-lc}%{static:-lc_n}}}\
38 %{p:-lc_p}\
39 %{pg:-lc_p}"
40 #endif
42 /* The RISC iX assembler never deletes any symbols from the object module;
43 and, by default, ld doesn't either. -X causes local symbols starting
44 with 'L' to be deleted, which is what we want. */
45 #ifndef LINK_SPEC
46 #define LINK_SPEC "-X"
47 #endif
49 #ifndef CPP_PREDEFINES
50 #define CPP_PREDEFINES \
51 "-Darm -Driscix -Dunix -Asystem(unix) -Acpu(arm) -Amachine(arm)"
52 #endif
54 #ifndef CPP_SPEC
55 #define CPP_SPEC "%{m6:-D__arm6__} \
56 %{mbsd:%{pedantic:%e-mbsd and -pedantic incompatible} -D_BSD_C} \
57 %{mxopen:%{mbsd:%e-mbsd and -mxopen incompatible} \
58 %{pedantic:%e-mxopen and -pedantic incompatible} -D_XOPEN_C} \
59 %{!mbsd:%{!mxopen:%{!ansi: -D_BSD_C}}}"
60 #endif
62 /* RISCiX has some weird symbol name munging, that is done to the object module
63 after assembly, which enables multiple libraries to be supported within
64 one (possibly shared) library. It basically changes the symbol name of
65 certain symbols (for example _bcopy is converted to _$bcopy if using BSD)
66 Symrename's parameters are determined as follows:
67 -mno-symrename Don't run symrename
68 -mbsd symrename -BSD <file>
69 -mxopen symrename -XOPEN <file>
70 -ansi symrename - <file>
71 <none> symrename -BSD <file>
74 #ifndef ASM_FINAL_SPEC
75 #if !defined (CROSS_COMPILE)
76 #define ASM_FINAL_SPEC "\
77 %{!mno-symrename: \
78 \n /usr/bin/symrename \
79 -%{mbsd:%{pedantic:%e-mbsd and -pedantic incompatible}BSD}\
80 %{mxopen:%{mbsd:%e-mbsd and -mxopen incompatible}\
81 %{pedantic:%e-mxopen and -pedantic incompatible}XOPEN}\
82 %{!mbsd:%{!mxopen:%{!ansi:BSD}}} %{c:%{o*:%*}%{!o*:%b.o}}%{!c:%U.o}}"
83 #endif
84 #endif
86 /* None of these is actually used in cc1. If we don't define them in target
87 switches cc1 complains about them. For the sake of argument lets allocate
88 bit 31 of target flags for such options. */
89 #define SUBTARGET_SWITCHES \
90 {"bsd", 0x80000000}, {"xopen", 0x80000000}, {"no-symrename", 0x80000000},
93 /* Run-time Target Specification. */
94 #define TARGET_VERSION \
95 fputs (" (ARM/RISCiX)", stderr);
97 /* This is used in ASM_FILE_START */
98 #define ARM_OS_NAME "RISCiX"
100 /* Unsigned chars produces much better code than signed. */
101 #define DEFAULT_SIGNED_CHAR 0
103 /* Define this if the target system supports the function atexit from the
104 ANSI C standard. If this is not defined, and INIT_SECTION_ASM_OP is not
105 defined, a default exit function will be provided to support C++.
106 The man page only describes on_exit, but atexit is also there. */
107 #define HAVE_ATEXIT 1
109 /* Some systems use __main in a way incompatible with its use in gcc, in these
110 cases use the macros NAME__MAIN to give a quoted symbol and SYMBOL__MAIN to
111 give the same symbol without quotes for an alternative entry point. You
112 must define both, or neither. */
113 #ifndef NAME__MAIN
114 #define NAME__MAIN "__gccmain"
115 #define SYMBOL__MAIN __gccmain
116 #endif
118 /* size_t is "unsigned int" in RISCiX */
119 #define SIZE_TYPE "unsigned int"
121 /* ptrdiff_t is "int" in RISCiX */
122 #define PTRDIFF_TYPE "int"
124 /* Maths operation domain error number, EDOM */
125 #define TARGET_EDOM 33
126 #include "arm/aout.h"
128 /* The native RISCiX assembler does not support stabs of any kind; because
129 the native assembler is not used by the compiler, Acorn didn't feel it was
130 necessary to put them in! */
132 #ifdef DBX_DEBUGGING_INFO
133 #undef DBX_DEBUGGING_INFO
134 #endif