OSDN Git Service

* doc/tm.texi (IS_ASM_LOGICAL_LINE_SEPARATOR): Document new argument.
[pf3gnuchains/gcc-fork.git] / gcc / config / cris / linux.h
1 /* Definitions for GCC.  Part of the machine description for CRIS.
2    Copyright (C) 2001, 2002, 2003, 2005, 2006, 2007 Free Software Foundation, Inc.
3    Contributed by Axis Communications.  Written by Hans-Peter Nilsson.
4
5 This file is part of GCC.
6
7 GCC 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 3, or (at your option)
10 any later version.
11
12 GCC 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 GCC; see the file COPYING3.  If not see
19 <http://www.gnu.org/licenses/>.  */
20
21
22 /* After the first "Node:" comment comes all preprocessor directives and
23    attached declarations described in the info files, the "Using and
24    Porting GCC" manual (uapgcc), in the same order as found in the "Target
25    macros" section in the gcc-2.9x CVS edition of 2000-03-17.  FIXME: Not
26    really, but needs an update anyway.
27
28    There is no generic copy-of-uapgcc comment, you'll have to see uapgcc
29    for that.  If applicable, there is a CRIS-specific comment.  The order
30    of macro definitions follow the order in the manual.  Every section in
31    the manual (node in the info pages) has an introductory `Node:
32    <subchapter>' comment.  If no macros are defined for a section, only
33    the section-comment is present.  */
34
35 /* This file defines the macros for cris-axis-linux-gnu that are not
36    covered by cris.h, elfos.h and (config/)linux.h.  */
37
38
39 /* Node: Instruction Output */
40
41 #undef USER_LABEL_PREFIX
42 #define USER_LABEL_PREFIX ""
43
44 /* Node: Driver */
45 /* These macros are CRIS-specific, but used in target driver macros.  */
46
47 #undef CRIS_CPP_SUBTARGET_SPEC
48 #define CRIS_CPP_SUBTARGET_SPEC \
49   "%{pthread:-D_REENTRANT}\
50    %{!march=*:%{!cpu=*:-D__arch_v10 -D__CRIS_arch_version=10}}"
51
52 #undef CRIS_CC1_SUBTARGET_SPEC
53 #define CRIS_CC1_SUBTARGET_SPEC \
54  "%{!march=*:%{!cpu=*:-march=v10}}"
55
56 #undef CRIS_ASM_SUBTARGET_SPEC
57 #define CRIS_ASM_SUBTARGET_SPEC \
58  "--em=criself\
59   %{!fleading-underscore:--no-underscore}\
60   %{fPIC|fpic|fPIE|fpie: --pic}"
61
62 /* Previously controlled by target_flags.  */
63 #undef TARGET_LINUX
64 #define TARGET_LINUX 1
65
66 #undef CRIS_SUBTARGET_DEFAULT
67 #define CRIS_SUBTARGET_DEFAULT                  \
68   (MASK_SVINTO                                  \
69    + MASK_ETRAX4_ADD                            \
70    + MASK_ALIGN_BY_32)
71
72 #undef CRIS_DEFAULT_CPU_VERSION
73 #define CRIS_DEFAULT_CPU_VERSION CRIS_CPU_NG
74
75 #undef CRIS_SUBTARGET_VERSION
76 #define CRIS_SUBTARGET_VERSION " - cris-axis-linux-gnu"
77
78 #define GLIBC_DYNAMIC_LINKER "/lib/ld.so.1"
79
80 /* We need an -rpath-link to ld.so.1, and presumably to each directory
81    specified with -B.  */
82 #undef CRIS_LINK_SUBTARGET_SPEC
83 #define CRIS_LINK_SUBTARGET_SPEC \
84  "-mcrislinux\
85   -rpath-link include/asm/../..%s\
86   %{shared} %{static}\
87   %{symbolic:-Bdynamic} %{shlib:-Bdynamic} %{static:-Bstatic}\
88   %{!shared:%{!static:\
89               %{rdynamic:-export-dynamic}\
90               %{!dynamic-linker:-dynamic-linker " LINUX_DYNAMIC_LINKER "}}}\
91   %{!r:%{O2|O3: --gc-sections}}"
92
93
94 /* Node: Run-time Target */
95
96 /* For the cris-*-linux* subtarget.  */
97 #undef TARGET_OS_CPP_BUILTINS
98 #define TARGET_OS_CPP_BUILTINS()                \
99   do                                            \
100     {                                           \
101       LINUX_TARGET_OS_CPP_BUILTINS();           \
102       if (flag_leading_underscore <= 0)         \
103         builtin_define ("__NO_UNDERSCORES__");  \
104     }                                           \
105   while (0)
106      
107
108 /* Node: Sections */
109
110 /* GNU/Linux has crti and crtn and does not need the
111    CRT_CALL_STATIC_FUNCTION trick in cris.h.  */
112 #undef CRT_CALL_STATIC_FUNCTION
113
114 /*
115  * Local variables:
116  * eval: (c-set-style "gnu")
117  * indent-tabs-mode: t
118  * End:
119  */