OSDN Git Service

Merge basic-improvements-branch to trunk
[pf3gnuchains/gcc-fork.git] / gcc / config / rs6000 / lynx.h
1 /* Definitions for Rs6000 running LynxOS.
2    Copyright (C) 1995, 1996, 2000, 2002 Free Software Foundation, Inc.
3    Contributed by David Henkel-Wallace, Cygnus Support (gumby@cygnus.com)
4
5 This file is part of GNU CC.
6
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.
11
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.
16
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.  */
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 ASM_FILE_START
28 #undef EXTRA_SECTIONS
29 #undef READONLY_DATA_SECTION
30 #undef READONLY_DATA_SECTION_ASM_OP
31 #undef EXTRA_SECTION_FUNCTIONS
32 #undef TARGET_ASM_SELECT_RTX_SECTION
33 #undef TARGET_ASM_SELECT_SECTION
34 #undef USER_LABEL_PREFIX
35 #undef ASM_OUTPUT_LABELREF
36 #undef ASM_GENERATE_INTERNAL_LABEL
37 #undef ASM_OUTPUT_COMMON
38 #undef ASM_OUTPUT_LOCAL
39
40 #undef SDB_DEBUGGING_INFO
41 #undef DBX_DEBUGGING_INFO
42 #undef PREFERRED_DEBUGGING_TYPE
43
44 #undef FUNCTION_PROFILER
45
46 #include <rs6000/rs6000.h>
47
48 /* Print subsidiary information on the compiler version in use.  */
49 #define TARGET_VERSION fprintf (stderr, " (LynxOS-RS/6000)");
50
51 /* LynxOS has signed chars, regardless of what most R/S 6000 systems do */
52 #undef DEFAULT_SIGNED_CHAR
53 #define DEFAULT_SIGNED_CHAR 1
54
55 #undef TARGET_OS_CPP_BUILTINS
56 #define TARGET_OS_CPP_BUILTINS()         \
57   do                                     \
58     {                                    \
59       builtin_assert ("cpu=rs6000");     \
60       builtin_assert ("machine=rs6000"); \
61       builtin_assert ("system=lynx");    \
62       builtin_assert ("system=unix");    \
63       builtin_define_std ("Lynx");       \
64       builtin_define ("_IBMR2");         \
65       builtin_define_std ("unix");       \
66       builtin_define_std ("rs6000");     \
67       builtin_define_std ("lynx");       \
68       builtin_define_std ("LYNX");       \
69     }                                    \
70   while (0)
71
72 #undef LINK_SPEC
73 #define LINK_SPEC "-T0x10001000 -H0x1000 -D0x20000000 -btextro -bhalt:4 -bnodelcsect -bnso -bro -bnoglink %{v} %{b*}"
74
75 #undef LIB_SPEC
76 #define LIB_SPEC "%{mthreads:-L/lib/thread/}  \
77   %{msystem-v:-lc_v -lm.v}  \
78   %{!msystem-v:%{mposix:-lc_p} -lc -lm}"
79
80 #undef STARTFILE_SPEC
81 #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}}}"
82
83 #undef ENDFILE_SPEC
84
85 /* This can become more refined as we have more powerpc options.  */
86 #undef ASM_SPEC
87 #define ASM_SPEC "-u %(asm_cpu)"
88
89 #undef SUBTARGET_SWITCHES
90 #define SUBTARGET_SWITCHES \
91     {"threads",         MASK_THREADS},          \
92     {"posix",           MASK_POSIX},            \
93     {"system-v",        MASK_SYSTEM_V},
94
95 #undef SUBTARGET_OVERRIDE_OPTIONS
96 #define SUBTARGET_OVERRIDE_OPTIONS \
97 do {                                                            \
98   if (TARGET_SYSTEM_V && profile_flag)                          \
99     warning ("-msystem-v and -p are incompatible");             \
100   if (TARGET_SYSTEM_V && TARGET_THREADS)                        \
101     warning ("-msystem-v and -mthreads are incompatible");      \
102 } while (0)
103
104 /* For collect2 */
105 #define OBJECT_FORMAT_NONE
106 #undef OBJECT_FORMAT_COFF
107 #undef OBJECT_FORMAT_ROSE
108 #undef MD_EXEC_PREFIX
109 #undef REAL_LD_FILE_NAME
110 #undef REAL_STRIP_FILE_NAME
111
112 /* LynxOS doesn't have mcount.  */
113 #undef FUNCTION_PROFILER
114 #define FUNCTION_PROFILER(file, profile_label_no)