OSDN Git Service

* gcc/config/rs6000/rs6000.c (rs6000_override_options)
[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 /* Print subsidiary information on the compiler version in use.  */
23 #define TARGET_VERSION fprintf (stderr, " (LynxOS-RS/6000)");
24
25 /* LynxOS has signed chars, regardless of what most R/S 6000 systems do */
26 #undef  DEFAULT_SIGNED_CHAR
27 #define DEFAULT_SIGNED_CHAR 1
28
29 #undef  TARGET_OS_CPP_BUILTINS
30 #define TARGET_OS_CPP_BUILTINS()         \
31   do                                     \
32     {                                    \
33       builtin_assert ("cpu=rs6000");     \
34       builtin_assert ("machine=rs6000"); \
35       builtin_assert ("system=lynx");    \
36       builtin_assert ("system=unix");    \
37       builtin_define_std ("Lynx");       \
38       builtin_define ("_IBMR2");         \
39       builtin_define_std ("unix");       \
40       builtin_define_std ("rs6000");     \
41       builtin_define_std ("lynx");       \
42       builtin_define_std ("LYNX");       \
43     }                                    \
44   while (0)
45
46 #undef  LINK_SPEC
47 #define LINK_SPEC "-T0x10001000 -H0x1000 -D0x20000000 -btextro -bhalt:4 -bnodelcsect -bnso -bro -bnoglink %{v} %{b*}"
48
49 #undef  LIB_SPEC
50 #define LIB_SPEC "%{mthreads:-L/lib/thread/}  \
51   %{msystem-v:-lc_v -lm.v}  \
52   %{!msystem-v:%{mposix:-lc_p} -lc -lm}"
53
54 #undef  STARTFILE_SPEC
55 #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}}}"
56
57 #undef ENDFILE_SPEC
58
59 /* This can become more refined as we have more powerpc options.  */
60 #undef  ASM_SPEC
61 #define ASM_SPEC "-u %(asm_cpu)"
62
63 #undef  SUBTARGET_SWITCHES
64 #define SUBTARGET_SWITCHES \
65     {"threads",         MASK_THREADS},          \
66     {"posix",           MASK_POSIX},            \
67     {"system-v",        MASK_SYSTEM_V},
68
69 #undef  SUBTARGET_OVERRIDE_OPTIONS
70 #define SUBTARGET_OVERRIDE_OPTIONS \
71 do {                                                            \
72   if (TARGET_SYSTEM_V && profile_flag)                          \
73     warning ("-msystem-v and -p are incompatible");             \
74   if (TARGET_SYSTEM_V && TARGET_THREADS)                        \
75     warning ("-msystem-v and -mthreads are incompatible");      \
76 } while (0)
77
78 /* For collect2 */
79 #define OBJECT_FORMAT_NONE
80 #undef OBJECT_FORMAT_COFF
81 #undef MD_EXEC_PREFIX
82 #undef REAL_LD_FILE_NAME
83 #undef REAL_STRIP_FILE_NAME
84
85 /* LynxOS doesn't have mcount.  */
86 #undef  FUNCTION_PROFILER
87 #define FUNCTION_PROFILER(file, profile_label_no)