1102780Skan/* Configuration file for sparc64 OpenBSD target.
2169689Skan   Copyright (C) 1999, 2005 Free Software Foundation, Inc.
3102780Skan
4102780SkanThis file is part of GCC.
5102780Skan
6102780SkanGCC is free software; you can redistribute it and/or modify
7102780Skanit under the terms of the GNU General Public License as published by
8102780Skanthe Free Software Foundation; either version 2, or (at your option)
9102780Skanany later version.
10102780Skan
11102780SkanGCC is distributed in the hope that it will be useful,
12102780Skanbut WITHOUT ANY WARRANTY; without even the implied warranty of
13102780SkanMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14102780SkanGNU General Public License for more details.
15102780Skan
16102780SkanYou should have received a copy of the GNU General Public License
17102780Skanalong with GCC; see the file COPYING.  If not, write to
18169689Skanthe Free Software Foundation, 51 Franklin Street, Fifth Floor,
19169689SkanBoston, MA 02110-1301, USA.  */
20102780Skan
21102780Skan#undef TARGET_VERSION
22102780Skan#define TARGET_VERSION fprintf (stderr, " (sparc64 OpenBSD ELF)")
23102780Skan
24102780Skan/* XXX - do we really want HARD_QUAD? */
25102780Skan#undef TARGET_DEFAULT
26102780Skan#define TARGET_DEFAULT \
27102780Skan(MASK_V9 + MASK_PTR64 + MASK_64BIT + MASK_HARD_QUAD \
28102780Skan + MASK_APP_REGS + MASK_FPU + MASK_STACK_BIAS + MASK_LONG_DOUBLE_128)
29102780Skan
30102780Skan#undef SPARC_DEFAULT_CMODEL
31102780Skan#define SPARC_DEFAULT_CMODEL CM_MEDMID
32102780Skan
33132718Skan/* Target OS builtins.  */
34132718Skan#define TARGET_OS_CPP_BUILTINS()		\
35132718Skan  do						\
36132718Skan    {						\
37132718Skan	builtin_define ("__unix__");		\
38132718Skan	builtin_define ("__OpenBSD__");		\
39132718Skan	builtin_assert ("system=unix");		\
40132718Skan	builtin_assert ("system=OpenBSD");	\
41132718Skan	builtin_define ("__sparc64__");		\
42132718Skan	builtin_define ("__sparcv9__");		\
43132718Skan	builtin_define ("__sparc_v9__");	\
44132718Skan	builtin_define ("__arch64__");		\
45132718Skan    }						\
46132718Skan  while (0)
47102780Skan
48102780Skan#undef CPP_SUBTARGET_SPEC
49102780Skan#define CPP_SUBTARGET_SPEC ""
50102780Skan
51102780Skan#undef MD_EXEC_PREFIX
52102780Skan#undef MD_STARTFILE_PREFIX
53102780Skan
54169689Skan/* Inherited from sp64-elf.  */
55169689Skan#undef NO_IMPLICIT_EXTERN_C
56169689Skan
57102780Skan#undef ASM_SPEC
58102780Skan#define ASM_SPEC "\
59132718Skan%{v:-V} -s %{fpic|fPIC|fpie|fPIE:-K PIC} \
60102780Skan%{mlittle-endian:-EL} \
61102780Skan%(asm_cpu) %(asm_arch) \
62102780Skan"
63102780Skan
64102780Skan/* Layout of source language data types.  */
65102780Skan#undef WCHAR_TYPE
66102780Skan#define WCHAR_TYPE "int"
67102780Skan
68102780Skan#undef WCHAR_TYPE_SIZE
69102780Skan#define WCHAR_TYPE_SIZE 32
70102780Skan
71102780Skan#undef LONG_DOUBLE_TYPE_SIZE
72102780Skan#define LONG_DOUBLE_TYPE_SIZE 128
73102780Skan
74102780Skan#undef LINK_SPEC
75102780Skan#define LINK_SPEC \
76102780Skan  "%{!shared:%{!nostdlib:%{!r*:%{!e*:-e __start}}}} \
77102780Skan   %{shared:-shared} %{R*} \
78102780Skan   %{static:-Bstatic} \
79102780Skan   %{!static:-Bdynamic} \
80102780Skan   %{assert*} \
81102780Skan   %{!dynamic-linker:-dynamic-linker /usr/libexec/ld.so}"
82102780Skan
83102780Skan/* As an elf system, we need crtbegin/crtend stuff.  */
84102780Skan#undef STARTFILE_SPEC
85102780Skan#define STARTFILE_SPEC "\
86102780Skan        %{!shared: %{pg:gcrt0%O%s} %{!pg:%{p:gcrt0%O%s} %{!p:crt0%O%s}} \
87102780Skan        crtbegin%O%s} %{shared:crtbeginS%O%s}"
88102780Skan#undef ENDFILE_SPEC
89102780Skan#define ENDFILE_SPEC "%{!shared:crtend%O%s} %{shared:crtendS%O%s}"
90