openbsd64.h revision 132718
1/* Configuration file for sparc64 OpenBSD target.
2   Copyright (C) 1999 Free Software Foundation, Inc.
3
4This file is part of GCC.
5
6GCC is free software; you can redistribute it and/or modify
7it under the terms of the GNU General Public License as published by
8the Free Software Foundation; either version 2, or (at your option)
9any later version.
10
11GCC is distributed in the hope that it will be useful,
12but WITHOUT ANY WARRANTY; without even the implied warranty of
13MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14GNU General Public License for more details.
15
16You should have received a copy of the GNU General Public License
17along with GCC; see the file COPYING.  If not, write to
18the Free Software Foundation, 59 Temple Place - Suite 330,
19Boston, MA 02111-1307, USA.  */
20
21#undef TARGET_VERSION
22#define TARGET_VERSION fprintf (stderr, " (sparc64 OpenBSD ELF)")
23
24/* XXX - do we really want HARD_QUAD? */
25#undef TARGET_DEFAULT
26#define TARGET_DEFAULT \
27(MASK_V9 + MASK_PTR64 + MASK_64BIT + MASK_HARD_QUAD \
28 + MASK_APP_REGS + MASK_FPU + MASK_STACK_BIAS + MASK_LONG_DOUBLE_128)
29
30#undef SPARC_DEFAULT_CMODEL
31#define SPARC_DEFAULT_CMODEL CM_MEDMID
32
33/* Target OS builtins.  */
34#define TARGET_OS_CPP_BUILTINS()		\
35  do						\
36    {						\
37	builtin_define ("__unix__");		\
38	builtin_define ("__OpenBSD__");		\
39	builtin_assert ("system=unix");		\
40	builtin_assert ("system=OpenBSD");	\
41	builtin_define ("__sparc64__");		\
42	builtin_define ("__sparcv9__");		\
43	builtin_define ("__sparc_v9__");	\
44	builtin_define ("__arch64__");		\
45    }						\
46  while (0)
47
48#undef CPP_SUBTARGET_SPEC
49#define CPP_SUBTARGET_SPEC ""
50
51#undef MD_EXEC_PREFIX
52#undef MD_STARTFILE_PREFIX
53
54#undef ASM_SPEC
55#define ASM_SPEC "\
56%{v:-V} -s %{fpic|fPIC|fpie|fPIE:-K PIC} \
57%{mlittle-endian:-EL} \
58%(asm_cpu) %(asm_arch) \
59"
60
61/* Layout of source language data types.  */
62#undef WCHAR_TYPE
63#define WCHAR_TYPE "int"
64
65#undef WCHAR_TYPE_SIZE
66#define WCHAR_TYPE_SIZE 32
67
68#undef LONG_DOUBLE_TYPE_SIZE
69#define LONG_DOUBLE_TYPE_SIZE 128
70
71#undef LINK_SPEC
72#define LINK_SPEC \
73  "%{!shared:%{!nostdlib:%{!r*:%{!e*:-e __start}}}} \
74   %{shared:-shared} %{R*} \
75   %{static:-Bstatic} \
76   %{!static:-Bdynamic} \
77   %{assert*} \
78   %{!dynamic-linker:-dynamic-linker /usr/libexec/ld.so}"
79
80/* As an elf system, we need crtbegin/crtend stuff.  */
81#undef STARTFILE_SPEC
82#define STARTFILE_SPEC "\
83        %{!shared: %{pg:gcrt0%O%s} %{!pg:%{p:gcrt0%O%s} %{!p:crt0%O%s}} \
84        crtbegin%O%s} %{shared:crtbeginS%O%s}"
85#undef ENDFILE_SPEC
86#define ENDFILE_SPEC "%{!shared:crtend%O%s} %{shared:crtendS%O%s}"
87