00001 /* Definitions of target machine for GNU compiler. ARM RISCiX version. 00002 Copyright (C) 1993, 1994, 1995, 1997, 1999, 2000 00003 Free Software Foundation, Inc. 00004 Contributed by Richard Earnshaw (rwe11@cl.cam.ac.uk), based on original 00005 work by Pieter `Tiggr' Schoenmakers (rcpieter@win.tue.nl) 00006 and Martin Simmons (@harleqn.co.uk). 00007 00008 This file is part of GNU CC. 00009 00010 GNU CC is free software; you can redistribute it and/or modify 00011 it under the terms of the GNU General Public License as published by 00012 the Free Software Foundation; either version 2, or (at your option) 00013 any later version. 00014 00015 GNU CC is distributed in the hope that it will be useful, 00016 but WITHOUT ANY WARRANTY; without even the implied warranty of 00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00018 GNU General Public License for more details. 00019 00020 You should have received a copy of the GNU General Public License 00021 along with GNU CC; see the file COPYING. If not, write to 00022 the Free Software Foundation, 59 Temple Place - Suite 330, 00023 Boston, MA 02111-1307, USA. */ 00024 00025 /* Translation to find startup files. On RISC iX boxes, 00026 crt0, mcrt0 and gcrt0.o are in /usr/lib. */ 00027 #define STARTFILE_SPEC "\ 00028 %{pg:/usr/lib/gcrt0.o%s}\ 00029 %{!pg:%{p:/usr/lib/mcrt0.o%s}\ 00030 %{!p:/usr/lib/crt0.o%s}}" 00031 00032 /* RISC iX has no concept of -lg */ 00033 /* If -static is specified then link with -lc_n */ 00034 00035 #ifndef LIB_SPEC 00036 #define LIB_SPEC "\ 00037 %{g*:-lg}\ 00038 %{!p:%{!pg:%{!static:-lc}%{static:-lc_n}}}\ 00039 %{p:-lc_p}\ 00040 %{pg:-lc_p}" 00041 #endif 00042 00043 /* The RISC iX assembler never deletes any symbols from the object module; 00044 and, by default, ld doesn't either. -X causes local symbols starting 00045 with 'L' to be deleted, which is what we want. */ 00046 #ifndef LINK_SPEC 00047 #define LINK_SPEC "-X" 00048 #endif 00049 00050 #ifndef CPP_PREDEFINES 00051 #define CPP_PREDEFINES \ 00052 "-Darm -Driscix -Dunix -Asystem=unix" 00053 #endif 00054 00055 00056 /* RISCiX has some weird symbol name munging, that is done to the object module 00057 after assembly, which enables multiple libraries to be supported within 00058 one (possibly shared) library. It basically changes the symbol name of 00059 certain symbols (for example _bcopy is converted to _$bcopy if using BSD) 00060 Symrename's parameters are determined as follows: 00061 -mno-symrename Don't run symrename 00062 -mbsd symrename -BSD <file> 00063 -mxopen symrename -XOPEN <file> 00064 -ansi symrename - <file> 00065 <none> symrename -BSD <file> 00066 */ 00067 00068 #ifndef ASM_FINAL_SPEC 00069 #if !defined (CROSS_COMPILE) 00070 #define ASM_FINAL_SPEC "\ 00071 %{!mno-symrename: \ 00072 \n /usr/bin/symrename \ 00073 -%{mbsd:%{pedantic:%e-mbsd and -pedantic incompatible}BSD}\ 00074 %{mxopen:%{mbsd:%e-mbsd and -mxopen incompatible}\ 00075 %{pedantic:%e-mxopen and -pedantic incompatible}XOPEN}\ 00076 %{!mbsd:%{!mxopen:%{!ansi:BSD}}} %{c:%{o*:%*}%{!o*:%b.o}}%{!c:%U.o}}" 00077 #endif 00078 #endif 00079 00080 /* None of these is actually used in cc1. If we don't define them in target 00081 switches cc1 complains about them. For the sake of argument lets allocate 00082 bit 31 of target flags for such options. */ 00083 #define SUBTARGET_SWITCHES \ 00084 {"bsd", 0x80000000, N_("Do symbol renaming for BSD")}, \ 00085 {"xopen", 0x80000000, N_("Do symbol renaming for X/OPEN")}, \ 00086 {"no-symrename", 0x80000000, N_("Don't do symbol renaming")}, 00087 00088 00089 /* Run-time Target Specification. */ 00090 #define TARGET_VERSION \ 00091 fputs (" (ARM/RISCiX)", stderr); 00092 00093 /* This is used in ASM_FILE_START */ 00094 #define ARM_OS_NAME "RISCiX" 00095 00096 /* Unsigned chars produces much better code than signed. */ 00097 #define DEFAULT_SIGNED_CHAR 0 00098 00099 /* Some systems use __main in a way incompatible with its use in gcc, in these 00100 cases use the macros NAME__MAIN to give a quoted symbol and SYMBOL__MAIN to 00101 give the same symbol without quotes for an alternative entry point. You 00102 must define both, or neither. */ 00103 #ifndef NAME__MAIN 00104 #define NAME__MAIN "__gccmain" 00105 #define SYMBOL__MAIN __gccmain 00106 #endif 00107 00108 /* size_t is "unsigned int" in RISCiX */ 00109 #define SIZE_TYPE "unsigned int" 00110 00111 /* ptrdiff_t is "int" in RISCiX */ 00112 #define PTRDIFF_TYPE "int" 00113 00114 /* Maths operation domain error number, EDOM */ 00115 #define TARGET_EDOM 33 00116 00117 /* Override the normal default CPU */ 00118 #define SUBTARGET_CPU_DEFAULT TARGET_CPU_arm2 00119 00120 /* r10 is reserved by RISCiX */ 00121 #define SUBTARGET_CONDITIONAL_REGISTER_USAGE \ 00122 fixed_regs[10] = 1; \ 00123 call_used_regs[10] = 1; 00124 00125 #include "arm/aout.h" 00126 00127 /* The RISCiX assembler does not understand .set */ 00128 #undef SET_ASM_OP 00129 00130 /* Add to CPP_SPEC, we want to add the right #defines when using the include 00131 files. */ 00132 #define SUBTARGET_CPP_SPEC "\ 00133 %{mbsd:%{pedantic:%e-mbsd and -pedantic incompatible} -D_BSD_C} \ 00134 %{mxopen:%{mbsd:%e-mbsd and -mxopen incompatible} \ 00135 %{pedantic:%e-mxopen and -pedantic incompatible} -D_XOPEN_C} \ 00136 %{!mbsd:%{!mxopen:%{!ansi: -D_BSD_C}}}" 00137 00138 /* The native RISCiX assembler does not support stabs of any kind; because 00139 the native assembler is not used by the compiler, Acorn didn't feel it was 00140 necessary to put them in! */ 00141 00142 #ifdef DBX_DEBUGGING_INFO 00143 #undef DBX_DEBUGGING_INFO 00144 #endif
1.5.6