Initial import from FreeBSD RELENG_4:
[dragonfly.git] / contrib / gcc / config / alpha / openbsd.h
1 /* Configuration file for an alpha OpenBSD target.
2    Copyright (C) 1999 Free Software Foundation, Inc.
3
4 This file is part of GNU CC.
5
6 GNU CC 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 GNU CC 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 GNU CC; see the file COPYING.  If not, write to
18 the Free Software Foundation, 59 Temple Place - Suite 330,
19 Boston, MA 02111-1307, USA.  */
20
21 /* We settle for little endian for now.  */
22 #define TARGET_ENDIAN_DEFAULT 0
23
24 #include <alpha/alpha.h>
25
26 #define OBSD_NO_DYNAMIC_LIBRARIES
27 #define OBSD_HAS_DECLARE_FUNCTION_NAME
28 #define OBSD_HAS_DECLARE_FUNCTION_SIZE
29 #define OBSD_HAS_DECLARE_OBJECT
30
31 /* alpha ecoff supports only weak aliases, see below.  */
32 #define ASM_WEAKEN_LABEL(FILE,NAME) ASM_OUTPUT_WEAK_ALIAS (FILE,NAME,0)
33
34 #include <openbsd.h>
35
36 /* Controlling the compilation driver.  */
37
38 /* alpha needs __start.  */
39 #undef LINK_SPEC
40 #define LINK_SPEC \
41   "%{!nostdlib:%{!r*:%{!e*:-e __start}}} -dc -dp %{assert*}"
42
43 /* run-time target specifications */
44 #define CPP_PREDEFINES "-D__unix__ -D__ANSI_COMPAT -Asystem(unix) \
45 -D__OpenBSD__ -D__alpha__ -D__alpha"
46
47 /* Layout of source language data types.  */
48
49 /* This must agree with <machine/ansi.h> */
50 #undef SIZE_TYPE
51 #define SIZE_TYPE "long unsigned int"
52
53 #undef PTRDIFF_TYPE
54 #define PTRDIFF_TYPE "long int"
55
56 #undef WCHAR_TYPE
57 #define WCHAR_TYPE "int"
58
59 #undef WCHAR_TYPE_SIZE
60 #define WCHAR_TYPE_SIZE 32
61
62 \f
63 #undef PREFERRED_DEBUGGING_TYPE
64 #define PREFERRED_DEBUGGING_TYPE DBX_DEBUG
65
66 #define LOCAL_LABEL_PREFIX      "."
67
68 /* We don't have an init section yet.  */
69 #undef HAS_INIT_SECTION
70
71 /* collect2 support (assembler format: macros for initialization).  */
72
73 /* Don't tell collect2 we use COFF as we don't have (yet ?) a dynamic ld
74    library with the proper functions to handle this -> collect2 will
75    default to using nm.  */
76 #undef OBJECT_FORMAT_COFF
77 #undef EXTENDED_COFF
78
79 /* Assembler format: exception region output.  */
80
81 /* All configurations that don't use elf must be explicit about not using
82    dwarf unwind information. egcs doesn't try too hard to check internal
83    configuration files...  */
84 #ifdef INCOMING_RETURN_ADDR_RTX
85 #undef DWARF2_UNWIND_INFO
86 #define DWARF2_UNWIND_INFO 0
87 #endif
88
89 /* Assembler format: file framework.  */
90
91 /* Taken from alpha/osf.h. This used to be common to all alpha
92    configurations, but elf has departed from it.
93    Check alpha/alpha.h, alpha/osf.h for it when egcs is upgraded.  */
94 #ifndef ASM_FILE_START
95 #define ASM_FILE_START(FILE)                                    \
96 {                                                               \
97   alpha_write_verstamp (FILE);                                  \
98   fprintf (FILE, "\t.set noreorder\n");                         \
99   fprintf (FILE, "\t.set volatile\n");                          \
100   fprintf (FILE, "\t.set noat\n");                              \
101   if (TARGET_SUPPORT_ARCH)                                      \
102     fprintf (FILE, "\t.arch %s\n",                              \
103              alpha_cpu == PROCESSOR_EV6 ? "ev6"                 \
104              : (alpha_cpu == PROCESSOR_EV5                      \
105                 ? (TARGET_MAX ? "pca56" : TARGET_BWX ? "ev56" : "ev5") \
106                 : "ev4"));                                      \
107                                                                 \
108   ASM_OUTPUT_SOURCE_FILENAME (FILE, main_input_filename);       \
109 }
110 #endif
111
112 /* Assembler format: label output.  */
113
114 #define ASM_OUTPUT_WEAK_ALIAS(FILE,NAME,VALUE)  \
115  do {                                           \
116   fputs ("\t.weakext\t", FILE);                 \
117   assemble_name (FILE, NAME);                   \
118   if (VALUE)                                    \
119     {                                           \
120       fputs (" , ", FILE);                      \
121       assemble_name (FILE, VALUE);              \
122     }                                           \
123   fputc ('\n', FILE);                           \
124  } while (0)
125
126