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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [config/] [sparc/] [freebsd.h] - Blame information for rev 801

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

Line No. Rev Author Line
1 709 jeremybenn
/* Definitions for Sun SPARC64 running FreeBSD using the ELF format
2
   Copyright (C) 2001, 2002, 2004, 2005, 2006, 2007, 2010, 2011
3
   Free Software Foundation, Inc.
4
   Contributed by David E. O'Brien <obrien@FreeBSD.org> and BSDi.
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
#undef  SUBTARGET_EXTRA_SPECS
23
#define SUBTARGET_EXTRA_SPECS \
24
  { "fbsd_dynamic_linker", FBSD_DYNAMIC_LINKER }
25
 
26
/* FreeBSD needs the platform name (sparc64) defined.
27
   Emacs etc needs to know if the arch is 64 or 32-bits.
28
   This also selects which targets are available via -mcpu.  */
29
 
30
#undef  FBSD_TARGET_CPU_CPP_BUILTINS
31
#define FBSD_TARGET_CPU_CPP_BUILTINS()          \
32
  do                                            \
33
    {                                           \
34
      builtin_define ("__sparc64__");           \
35
      builtin_define ("__sparc__");             \
36
      builtin_define ("__sparc_v9__");          \
37
      builtin_define ("__sparcv9");             \
38
    }                                           \
39
  while (0)
40
 
41
#undef ASM_SPEC
42
#define ASM_SPEC "%{fpic|fPIC|fpie|fPIE:-K PIC} %(asm_cpu)"
43
 
44
#define LINK_SPEC "%(link_arch)                                         \
45
  %{!mno-relax:%{!r:-relax}}                                            \
46
  %{p:%nconsider using '-pg' instead of '-p' with gprof(1)}             \
47
  %{assert*} %{R*} %{rpath*} %{defsym*}                                 \
48
  %{shared:-Bshareable %{h*} %{soname*}}                                \
49
  %{symbolic:-Bsymbolic}                                                \
50
  %{!shared:                                                            \
51
    %{!static:                                                          \
52
      %{rdynamic:-export-dynamic}                                       \
53
      -dynamic-linker %(fbsd_dynamic_linker) }  \
54
    %{static:-Bstatic}}"
55
 
56
 
57
/************************[  Target stuff  ]***********************************/
58
 
59
/* Define the actual types of some ANSI-mandated types.
60
   Needs to agree with <machine/ansi.h>.  GCC defaults come from c-decl.c,
61
   c-common.c, and config/<arch>/<arch>.h.  */
62
 
63
/* Earlier headers may get this wrong for FreeBSD.
64
   We use the GCC defaults instead.  */
65
#undef WCHAR_TYPE
66
 
67
#undef  WCHAR_TYPE_SIZE
68
#define WCHAR_TYPE_SIZE 32
69
 
70
/* Define for support of TFmode long double.
71
   SPARC ABI says that long double is 4 words.  */
72
#undef  LONG_DOUBLE_TYPE_SIZE
73
#define LONG_DOUBLE_TYPE_SIZE (TARGET_LONG_DOUBLE_128 ? 128 : 64)
74
 
75
/* Define this to set long double type size to use in libgcc2.c, which can
76
   not depend on target_flags.  */
77
#if defined(__arch64__) || defined(__LONG_DOUBLE_128__)
78
#define LIBGCC2_LONG_DOUBLE_TYPE_SIZE 128
79
#else
80
#define LIBGCC2_LONG_DOUBLE_TYPE_SIZE 64
81
#endif
82
 
83
/* Definitions for 64-bit SPARC running systems with ELF. */
84
 
85
#define TARGET_ELF              1
86
 
87
/* XXX */
88
/* A 64 bit v9 compiler with stack-bias,
89
   in a Medium/mid code model environment.  */
90
 
91
#undef  TARGET_DEFAULT
92
#define TARGET_DEFAULT \
93
  (MASK_V9 + MASK_64BIT + MASK_PTR64 /* + MASK_FASTER_STRUCTS */ \
94
   + MASK_STACK_BIAS + MASK_APP_REGS + MASK_FPU \
95
   + MASK_LONG_DOUBLE_128 /* + MASK_HARD_QUAD */)
96
 
97
/* The default code model.  */
98
#undef  SPARC_DEFAULT_CMODEL
99
#define SPARC_DEFAULT_CMODEL    CM_MEDLOW
100
 
101
#define HAVE_ENABLE_EXECUTE_STACK
102
 
103
/************************[  Assembler stuff  ]********************************/
104
 
105
#undef  LOCAL_LABEL_PREFIX
106
#define LOCAL_LABEL_PREFIX  "."
107
 
108
/* XXX2 */
109
/* This is how to store into the string LABEL
110
   the symbol_ref name of an internal numbered label where
111
   PREFIX is the class of label and NUM is the number within the class.
112
   This is suitable for output with `assemble_name'.  */
113
 
114
#undef  ASM_GENERATE_INTERNAL_LABEL
115
#define ASM_GENERATE_INTERNAL_LABEL(LABEL,PREFIX,NUM)                   \
116
  sprintf (LABEL, "*.L%s%lu", PREFIX, (unsigned long)(NUM))
117
 
118
 
119
/************************[  Debugger stuff  ]*********************************/
120
 
121
/* This is the char to use for continuation (in case we need to turn
122
   continuation back on).  */
123
 
124
#undef  DBX_CONTIN_CHAR
125
#define DBX_CONTIN_CHAR '?'
126
 
127
/* DWARF bits.  */
128
 
129
/* Follow Irix 6 and not the Dwarf2 draft in using 64-bit offsets.
130
   Obviously the Dwarf2 folks havn't tried to actually build systems
131
   with their spec.  On a 64-bit system, only 64-bit relocs become
132
   RELATIVE relocations.  */
133
 
134
/* #define DWARF_OFFSET_SIZE PTR_SIZE */
135
 
136
#ifdef HAVE_AS_TLS
137
#undef TARGET_SUN_TLS
138
#undef TARGET_GNU_TLS
139
#define TARGET_SUN_TLS 0
140
#define TARGET_GNU_TLS 1
141
#endif
142
 
143
#undef ENDFILE_SPEC
144
#define ENDFILE_SPEC                                            \
145
  "%{Ofast|ffast-math|funsafe-math-optimizations:crtfastmath.o%s} "     \
146
  FBSD_ENDFILE_SPEC
147
 
148
/* We use GNU ld so undefine this so that attribute((init_priority)) works.  */
149
#undef CTORS_SECTION_ASM_OP
150
#undef DTORS_SECTION_ASM_OP

powered by: WebSVN 2.1.0

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