OSDN Git Service

* config/m68k/m68k-none.h: Introduce new ColdFire archs.
[pf3gnuchains/gcc-fork.git] / gcc / config / rs6000 / lynx.h
1 /* Definitions for Rs6000 running LynxOS.
2    Copyright (C) 1995, 1996, 2000, 2002, 2003 Free Software Foundation, Inc.
3    Contributed by David Henkel-Wallace, Cygnus Support (gumby@cygnus.com)
4
5    This file is part of GCC.
6
7    GCC is free software; you can redistribute it and/or modify it
8    under the terms of the GNU General Public License as published
9    by the Free Software Foundation; either version 2, or (at your
10    option) any later version.
11
12    GCC is distributed in the hope that it will be useful, but WITHOUT
13    ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
14    or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public
15    License for more details.
16
17    You should have received a copy of the GNU General Public License
18    along with GCC; see the file COPYING.  If not, write to the
19    Free Software Foundation, 59 Temple Place - Suite 330, Boston,
20    MA 02111-1307, USA.  */
21
22 /* Definitions we want to override with those from rs6000.h:  */
23 #undef LIB_SPEC
24 #undef PTRDIFF_TYPE
25 #undef WCHAR_TYPE
26 #undef WCHAR_TYPE_SIZE
27 #undef EXTRA_SECTIONS
28 #undef READONLY_DATA_SECTION
29 #undef READONLY_DATA_SECTION_ASM_OP
30 #undef EXTRA_SECTION_FUNCTIONS
31 #undef TARGET_ASM_SELECT_RTX_SECTION
32 #undef TARGET_ASM_SELECT_SECTION
33 #undef USER_LABEL_PREFIX
34 #undef ASM_OUTPUT_LABELREF
35 #undef ASM_GENERATE_INTERNAL_LABEL
36 #undef ASM_OUTPUT_COMMON
37 #undef ASM_OUTPUT_LOCAL
38
39 #undef SDB_DEBUGGING_INFO
40 #undef DBX_DEBUGGING_INFO
41 #undef PREFERRED_DEBUGGING_TYPE
42
43 #undef FUNCTION_PROFILER
44
45 #include <rs6000/rs6000.h>
46
47 /* Print subsidiary information on the compiler version in use.  */
48 #define TARGET_VERSION fprintf (stderr, " (LynxOS-RS/6000)");
49
50 /* LynxOS has signed chars, regardless of what most R/S 6000 systems do */
51 #undef  DEFAULT_SIGNED_CHAR
52 #define DEFAULT_SIGNED_CHAR 1
53
54 #undef  TARGET_OS_CPP_BUILTINS
55 #define TARGET_OS_CPP_BUILTINS()         \
56   do                                     \
57     {                                    \
58       builtin_assert ("cpu=rs6000");     \
59       builtin_assert ("machine=rs6000"); \
60       builtin_assert ("system=lynx");    \
61       builtin_assert ("system=unix");    \
62       builtin_define_std ("Lynx");       \
63       builtin_define ("_IBMR2");         \
64       builtin_define_std ("unix");       \
65       builtin_define_std ("rs6000");     \
66       builtin_define_std ("lynx");       \
67       builtin_define_std ("LYNX");       \
68     }                                    \
69   while (0)
70
71 #undef  LINK_SPEC
72 #define LINK_SPEC "-T0x10001000 -H0x1000 -D0x20000000 -btextro -bhalt:4 -bnodelcsect -bnso -bro -bnoglink %{v} %{b*}"
73
74 #undef  LIB_SPEC
75 #define LIB_SPEC "%{mthreads:-L/lib/thread/}  \
76   %{msystem-v:-lc_v -lm.v}  \
77   %{!msystem-v:%{mposix:-lc_p} -lc -lm}"
78
79 #undef  STARTFILE_SPEC
80 #define STARTFILE_SPEC "%{p:%{mthreads:thread/pinit.o%s}%{!mthreads:pinit.o%s}}%{!p:%{msystem-v:vinit.o%s -e_start}%{!msystem-v:%{mthreads:thread/init.o%s}%{!mthreads:init.o%s}}}"
81
82 #undef ENDFILE_SPEC
83
84 /* This can become more refined as we have more powerpc options.  */
85 #undef  ASM_SPEC
86 #define ASM_SPEC "-u %(asm_cpu)"
87
88 #undef  SUBTARGET_SWITCHES
89 #define SUBTARGET_SWITCHES \
90     {"threads",         MASK_THREADS},          \
91     {"posix",           MASK_POSIX},            \
92     {"system-v",        MASK_SYSTEM_V},
93
94 #undef  SUBTARGET_OVERRIDE_OPTIONS
95 #define SUBTARGET_OVERRIDE_OPTIONS \
96 do {                                                            \
97   if (TARGET_SYSTEM_V && profile_flag)                          \
98     warning ("-msystem-v and -p are incompatible");             \
99   if (TARGET_SYSTEM_V && TARGET_THREADS)                        \
100     warning ("-msystem-v and -mthreads are incompatible");      \
101 } while (0)
102
103 /* For collect2 */
104 #define OBJECT_FORMAT_NONE
105 #undef OBJECT_FORMAT_COFF
106 #undef MD_EXEC_PREFIX
107 #undef REAL_LD_FILE_NAME
108 #undef REAL_STRIP_FILE_NAME
109
110 /* LynxOS doesn't have mcount.  */
111 #undef  FUNCTION_PROFILER
112 #define FUNCTION_PROFILER(file, profile_label_no)