xref: /openbsd-src/gnu/usr.bin/gcc/gcc/config/vax/openbsdelf.h (revision bdd8eb7143bd900fd66510a6e40fea6e3fbcf01b)
1 /* Configuration fragment for a VAX OpenBSD target.
2    Copyright (C) 2000, 2002 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 /* Amend common OpenBSD definitions for VAX target.  */
22 
23 #define TARGET_OS_CPP_BUILTINS()		\
24   do						\
25     {						\
26       OPENBSD_OS_CPP_BUILTINS_ELF();		\
27     }						\
28   while (0)
29 
30 /* Layout of source language data types.  */
31 
32 /* This must agree with <machine/_types.h>  */
33 #undef SIZE_TYPE
34 #define SIZE_TYPE "long unsigned int"
35 
36 #undef PTRDIFF_TYPE
37 #define PTRDIFF_TYPE "long int"
38 
39 #undef INTMAX_TYPE
40 #define INTMAX_TYPE "long long int"
41 
42 #undef UINTMAX_TYPE
43 #define UINTMAX_TYPE "long long unsigned int"
44 
45 #undef WCHAR_TYPE
46 #define WCHAR_TYPE "int"
47 
48 #undef WCHAR_TYPE_SIZE
49 #define WCHAR_TYPE_SIZE 32
50 
51 /* No structure field wants to be aligned rounder than this.
52    The huge 0x40000000 value should be enough to turn the
53    BIGGEST_FIELD_ALIGNMENT logic into a nop.  */
54 #undef BIGGEST_FIELD_ALIGNMENT
55 #define BIGGEST_FIELD_ALIGNMENT (TARGET_VAXC_ALIGNMENT ? 8 : 0x40000000)
56 
57 #undef LINK_SPEC
58 #ifdef OBSD_NO_DYNAMIC_LIBRARIES
59 #define LINK_SPEC \
60   "%{!nostdlib:%{!r*:%{!e*:-e _start}}} %{assert*}"
61 #else
62 #define LINK_SPEC \
63   "%{!shared:%{!nostdlib:%{!r*:%{!e*:-e _start}}}} \
64    %{shared:-shared} %{R*} \
65    %{static:-Bstatic} \
66    %{!static:-Bdynamic} \
67    %{rdynamic:-export-dynamic} \
68    %{assert*} \
69    %{!dynamic-linker:-dynamic-linker /usr/libexec/ld.so}"
70 #endif
71 
72 /* As an elf system, we need crtbegin/crtend stuff.  */
73 #undef STARTFILE_SPEC
74 #ifdef OBSD_NO_DYNAMIC_LIBRARIES
75 #define STARTFILE_SPEC \
76   "%{pg:gcrt0%O%s} %{!pg:%{p:gcrt0%O%s} %{!p:crt0%O%s}} crtbegin%O%s"
77 #else
78 #define STARTFILE_SPEC "\
79 	%{!shared: %{pg:gcrt0%O%s} %{!pg:%{p:gcrt0%O%s} %{!p:crt0%O%s}} \
80 	crtbegin%O%s} %{shared:crtbeginS%O%s}"
81 #endif
82 
83 #undef ENDFILE_SPEC
84 #ifdef OBSD_NO_DYNAMIC_LIBRARIES
85 #define ENDFILE_SPEC "crtend%O%s"
86 #else
87 #define ENDFILE_SPEC "%{!shared:crtend%O%s} %{shared:crtendS%O%s}"
88 #endif
89 
90 /* We use gas, not the UNIX assembler.  */
91 #undef TARGET_DEFAULT
92 #define TARGET_DEFAULT 0
93