OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [config/] [cris/] [linux.h] - Blame information for rev 713

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 709 jeremybenn
/* Definitions for GCC.  Part of the machine description for CRIS.
2
   Copyright (C) 2001, 2002, 2003, 2005, 2006, 2007, 2008, 2009, 2010, 2011
3
   Free Software Foundation, Inc.
4
   Contributed by Axis Communications.  Written by Hans-Peter Nilsson.
5
 
6
This file is part of GCC.
7
 
8
GCC is free software; you can redistribute it and/or modify
9
it under the terms of the GNU General Public License as published by
10
the Free Software Foundation; either version 3, or (at your option)
11
any later version.
12
 
13
GCC is distributed in the hope that it will be useful,
14
but WITHOUT ANY WARRANTY; without even the implied warranty of
15
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16
GNU General Public License for more details.
17
 
18
You should have received a copy of the GNU General Public License
19
along with GCC; see the file COPYING3.  If not see
20
<http://www.gnu.org/licenses/>.  */
21
 
22
 
23
/* After the first "Node:" comment comes all preprocessor directives and
24
   attached declarations described in the info files, the "Using and
25
   Porting GCC" manual (uapgcc), in the same order as found in the "Target
26
   macros" section in the gcc-2.9x CVS edition of 2000-03-17.  FIXME: Not
27
   really, but needs an update anyway.
28
 
29
   There is no generic copy-of-uapgcc comment, you'll have to see uapgcc
30
   for that.  If applicable, there is a CRIS-specific comment.  The order
31
   of macro definitions follow the order in the manual.  Every section in
32
   the manual (node in the info pages) has an introductory `Node:
33
   <subchapter>' comment.  If no macros are defined for a section, only
34
   the section-comment is present.  */
35
 
36
/* This file defines the macros for cris-axis-linux-gnu that are not
37
   covered by cris.h, elfos.h and (config/)linux.h.  */
38
 
39
/* Make sure we have a valid TARGET_CPU_DEFAULT, so we can assume it
40
   and take shortcuts below.  */
41
#ifndef TARGET_CPU_DEFAULT
42
#error "TARGET_CPU_DEFAULT not defined"
43
#elif (TARGET_CPU_DEFAULT+0) != 10 && (TARGET_CPU_DEFAULT+0) != 32
44
#error "TARGET_CPU_DEFAULT must be 10 or 32, or this file be updated"
45
#endif
46
 
47
/* Node: Instruction Output */
48
 
49
#undef USER_LABEL_PREFIX
50
#define USER_LABEL_PREFIX ""
51
 
52
/* Node: Driver */
53
/* These macros are CRIS-specific, but used in target driver macros.  */
54
 
55
#undef CRIS_CPP_SUBTARGET_SPEC
56
#if TARGET_CPU_DEFAULT == 32
57
# define CRIS_CPP_SUBTARGET_SPEC \
58
  "%{pthread:-D_REENTRANT}\
59
   %{!march=*:%{!mcpu=*:-D__arch_v32 -D__CRIS_arch_version=32}}"
60
#else
61
# define CRIS_CPP_SUBTARGET_SPEC \
62
  "%{pthread:-D_REENTRANT}\
63
   %{!march=*:%{!mcpu=*:-D__arch_v10 -D__CRIS_arch_version=10}}"
64
#endif
65
 
66
#undef CRIS_CC1_SUBTARGET_SPEC
67
#if TARGET_CPU_DEFAULT == 32
68
# define CRIS_CC1_SUBTARGET_SPEC \
69
 "%{!march=*:%{!mcpu=*:-march=v32}}"
70
#define CRIS_SUBTARGET_DEFAULT_ARCH MASK_AVOID_GOTPLT
71
#else
72
# define CRIS_CC1_SUBTARGET_SPEC \
73
 "%{!march=*:%{!mcpu=*:-march=v10}}"
74
#define CRIS_SUBTARGET_DEFAULT_ARCH 0
75
#endif
76
 
77
#undef CRIS_ASM_SUBTARGET_SPEC
78
#if TARGET_CPU_DEFAULT == 32
79
# define CRIS_ASM_SUBTARGET_SPEC \
80
 "--em=criself \
81
  %{!march=*:%{!mcpu=*:--march=v32}} \
82
  %{!fleading-underscore:--no-underscore}\
83
  %{fPIC|fpic|fPIE|fpie: --pic}"
84
#else
85
# define CRIS_ASM_SUBTARGET_SPEC \
86
 "--em=criself \
87
  %{!march=*:%{!mcpu=*:--march=v10}} \
88
  %{!fleading-underscore:--no-underscore}\
89
  %{fPIC|fpic|fPIE|fpie: --pic}"
90
#endif
91
 
92
/* Previously controlled by target_flags.  */
93
#undef TARGET_LINUX
94
#define TARGET_LINUX 1
95
 
96
#undef CRIS_SUBTARGET_DEFAULT
97
#define CRIS_SUBTARGET_DEFAULT                  \
98
  (MASK_SVINTO                                  \
99
   + MASK_ETRAX4_ADD                            \
100
   + MASK_ALIGN_BY_32                           \
101
   + CRIS_SUBTARGET_DEFAULT_ARCH)
102
 
103
#undef CRIS_DEFAULT_CPU_VERSION
104
#define CRIS_DEFAULT_CPU_VERSION CRIS_CPU_NG
105
 
106
#define GLIBC_DYNAMIC_LINKER "/lib/ld.so.1"
107
 
108
#undef CRIS_LINK_SUBTARGET_SPEC
109
#define CRIS_LINK_SUBTARGET_SPEC \
110
 "-mcrislinux\
111
  %{shared} %{static}\
112
  %{symbolic:-Bdynamic} %{static:-Bstatic}\
113
  %{!shared:%{!static:\
114
              %{rdynamic:-export-dynamic}\
115
              -dynamic-linker " GNU_USER_DYNAMIC_LINKER "}}\
116
  %{!r:%{O2|O3: --gc-sections}}"
117
 
118
 
119
/* Node: Run-time Target */
120
 
121
/* For the cris-*-linux* subtarget.  */
122
#undef TARGET_OS_CPP_BUILTINS
123
#define TARGET_OS_CPP_BUILTINS()                \
124
  do                                            \
125
    {                                           \
126
      GNU_USER_TARGET_OS_CPP_BUILTINS();        \
127
      if (flag_leading_underscore <= 0)          \
128
        builtin_define ("__NO_UNDERSCORES__");  \
129
    }                                           \
130
  while (0)
131
 
132
/* Node: Type Layout */
133
 
134
#undef SIZE_TYPE
135
#define SIZE_TYPE "unsigned int"
136
 
137
#undef PTRDIFF_TYPE
138
#define PTRDIFF_TYPE "int"
139
 
140
/* Node: Sections */
141
 
142
/* GNU/Linux has crti and crtn and does not need the
143
   CRT_CALL_STATIC_FUNCTION trick in cris.h.  */
144
#undef CRT_CALL_STATIC_FUNCTION
145
 
146
/*
147
 * Local variables:
148
 * eval: (c-set-style "gnu")
149
 * indent-tabs-mode: t
150
 * End:
151
 */

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.