Imported Upstream version 4.8.1
[platform/upstream/gcc48.git] / gcc / config / sparc / vxworks.h
1 /* Definitions of target machine for GNU compiler,
2    for SPARC targeting the VxWorks run time environment.
3    Copyright (C) 2007-2013 Free Software Foundation, Inc.
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 #define TARGET_OS_CPP_BUILTINS()                \
22   do                                            \
23     {                                           \
24       builtin_define ("__sparc");               \
25       builtin_define ("CPU=SIMSPARCSOLARIS");   \
26       VXWORKS_OS_CPP_BUILTINS ();               \
27     }                                           \
28   while (0)
29
30 #undef SUBTARGET_OVERRIDE_OPTIONS
31 #define SUBTARGET_OVERRIDE_OPTIONS VXWORKS_OVERRIDE_OPTIONS
32
33 #undef CPP_SUBTARGET_SPEC
34 #define CPP_SUBTARGET_SPEC VXWORKS_ADDITIONAL_CPP_SPEC
35
36 #undef ASM_SPEC
37 #define ASM_SPEC "%{fpic|fPIC|fpie|fPIE:-K PIC} %(asm_cpu)"
38
39 #undef LIB_SPEC
40 #define LIB_SPEC VXWORKS_LIB_SPEC
41 #undef LINK_SPEC
42 #define LINK_SPEC VXWORKS_LINK_SPEC
43 #undef STARTFILE_SPEC
44 #define STARTFILE_SPEC VXWORKS_STARTFILE_SPEC
45 #undef ENDFILE_SPEC
46 #define ENDFILE_SPEC VXWORKS_ENDFILE_SPEC
47
48 #undef FUNCTION_PROFILER
49 #define FUNCTION_PROFILER VXWORKS_FUNCTION_PROFILER
50
51 /* Use standard numbered ctors/dtors sections.  */
52 #undef CTORS_SECTION_ASM_OP
53 #undef DTORS_SECTION_ASM_OP
54
55 /* We cannot use PC-relative accesses for VxWorks PIC because there is no
56    fixed gap between segments.  */
57 #undef ASM_PREFERRED_EH_DATA_FORMAT