xref: /openbsd-src/gnu/gcc/gcc/config/sparc/openbsd.h (revision 9572f8766b571c6e0612a68c275616209cf6ec9f)
1 /* Configuration file for sparc OpenBSD target.
2    Copyright (C) 1999, 2005 Free Software Foundation, Inc.
3 
4 This file is part of GCC.
5 
6 GCC is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation; either version 2, or (at your option)
9 any later version.
10 
11 GCC is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14 GNU General Public License for more details.
15 
16 You should have received a copy of the GNU General Public License
17 along with GCC; see the file COPYING.  If not, write to
18 the Free Software Foundation, 51 Franklin Street, Fifth Floor,
19 Boston, MA 02110-1301, USA.  */
20 
21 #undef TARGET_VERSION
22 #define TARGET_VERSION fprintf (stderr, " (OpenBSD/sparc)")
23 
24 /* Target OS builtins.  */
25 #define TARGET_OS_CPP_BUILTINS()		\
26   do						\
27     {						\
28 	OPENBSD_OS_CPP_BUILTINS();		\
29     }						\
30   while (0)
31 
32 #undef CPP_SUBTARGET_SPEC
33 #define CPP_SUBTARGET_SPEC ""
34 
35 #undef MD_EXEC_PREFIX
36 #undef MD_STARTFILE_PREFIX
37 
38 #undef ASM_SPEC
39 #ifdef PIE_DEFAULT
40 #define ASM_SPEC "\
41 %{v:-V} -s %{fpic|fPIC:-K PIC} %{!fno-pie: %{!p: %{!pg: -K PIC}}} \
42 %{mlittle-endian:-EL} \
43 %(asm_cpu) %(asm_arch) \
44 "
45 #else
46 #define ASM_SPEC "\
47 %{v:-V} -s %{fpic|fPIC|fpie|fPIE:-K PIC} \
48 %{mlittle-endian:-EL} \
49 %(asm_cpu) %(asm_arch) \
50 "
51 #endif
52 
53 /* Layout of source language data types.  */
54 #undef SIZE_TYPE
55 #define SIZE_TYPE "long unsigned int"
56 
57 #undef PTRDIFF_TYPE
58 #define PTRDIFF_TYPE "long int"
59 
60 #undef WCHAR_TYPE
61 #define WCHAR_TYPE "int"
62 
63 #undef WCHAR_TYPE_SIZE
64 #define WCHAR_TYPE_SIZE 32
65 
66 #undef WINT_TYPE
67 #define WINT_TYPE "int"
68 
69 #undef INTMAX_TYPE
70 #define INTMAX_TYPE "long long int"
71 
72 #undef UINTMAX_TYPE
73 #define UINTMAX_TYPE "long long unsigned int"
74 
75 #undef LONG_DOUBLE_TYPE_SIZE
76 #define LONG_DOUBLE_TYPE_SIZE 64
77 
78 #undef JUMP_TABLES_DEFAULT
79 #define JUMP_TABLES_DEFAULT 0	/* incompatible with --executable-text */
80 
81 #undef LINK_SPEC
82 #define LINK_SPEC \
83   "%{!shared:%{!nostdlib:%{!r*:%{!e*:-e __start}}}} \
84    %{shared:-shared} %{R*} \
85    %{static:-Bstatic} \
86    %{!static:-Bdynamic} \
87    %{rdynamic:-export-dynamic} \
88    %{assert*} \
89    %{!static:%{!dynamic-linker:-dynamic-linker /usr/libexec/ld.so}}"
90 
91 /* As an elf system, we need crtbegin/crtend stuff.  */
92 #undef STARTFILE_SPEC
93 #define STARTFILE_SPEC "\
94 	%{!shared: %{pg:gcrt0%O%s} %{!pg:%{p:gcrt0%O%s} \
95 	%{!p:%{!static:crt0%O%s} %{static:%{nopie:crt0%O%s} \
96 	%{!nopie:rcrt0%O%s}}}} crtbegin%O%s} %{shared:crtbeginS%O%s}"
97 #undef ENDFILE_SPEC
98 #define ENDFILE_SPEC "%{!shared:crtend%O%s} %{shared:crtendS%O%s}"
99 
100 /* We use GNU ld so undefine this so that attribute((init_priority)) works.  */
101 #undef CTORS_SECTION_ASM_OP
102 #undef DTORS_SECTION_ASM_OP
103