Merge from mainline (gomp-merge-2005-02-26).
[official-gcc.git] / gcc / config / s390 / tpf.h
blob33a50b47498a5f20aa08153299f0a3676b3aabb9
1 /* Definitions for target OS TPF for GNU compiler, for IBM S/390 hardware
2 Copyright (C) 2003, 2004 Free Software Foundation, Inc.
3 Contributed by P.J. Darcy (darcypj@us.ibm.com),
4 Hartmut Penner (hpenner@de.ibm.com), and
5 Ulrich Weigand (uweigand@de.ibm.com).
7 This file is part of GCC.
9 GCC is free software; you can redistribute it and/or modify it under
10 the terms of the GNU General Public License as published by the Free
11 Software Foundation; either version 2, or (at your option) any later
12 version.
14 GCC is distributed in the hope that it will be useful, but WITHOUT ANY
15 WARRANTY; without even the implied warranty of MERCHANTABILITY or
16 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
17 for more details.
19 You should have received a copy of the GNU General Public License
20 along with GCC; see the file COPYING. If not, write to the Free
21 Software Foundation, 59 Temple Place - Suite 330, Boston, MA
22 02111-1307, USA. */
24 #ifndef _TPF_H
25 #define _TPF_H
27 /* TPF wants the following macros defined/undefined as follows. */
28 #undef TARGET_TPF
29 #define TARGET_TPF 1
30 #undef ASM_APP_ON
31 #define ASM_APP_ON "#APP\n"
32 #undef ASM_APP_OFF
33 #define ASM_APP_OFF "#NO_APP\n"
34 #define NO_IMPLICIT_EXTERN_C
35 #define TARGET_HAS_F_SETLKW
36 #undef MD_EXEC_PREFIX
37 #undef MD_STARTFILE_PREFIX
39 #undef SIZE_TYPE
40 #define SIZE_TYPE ("long unsigned int")
41 #undef PTRDIFF_TYPE
42 #define PTRDIFF_TYPE ("long int")
43 #undef WCHAR_TYPE
44 #define WCHAR_TYPE "int"
45 #undef WCHAR_TYPE_SIZE
46 #define WCHAR_TYPE_SIZE 32
49 /* Basic record keeping for the TPF OS name. */
50 #undef TARGET_VERSION
51 #define TARGET_VERSION fprintf (stderr, " (TPF: zSeries)");
53 /* TPF OS specific stack-pointer offset. */
54 #undef STACK_POINTER_OFFSET
55 #define STACK_POINTER_OFFSET 448
57 /* When building for TPF, set a generic default target that is 64 bits.
58 Also, enable TPF profiling support and the standard backchain by default. */
59 #undef TARGET_DEFAULT
60 #define TARGET_DEFAULT (MASK_64BIT | MASK_ZARCH | MASK_HARD_FLOAT \
61 | MASK_TPF_PROFILING | MASK_BACKCHAIN)
62 /* Exception handling. */
64 /* Select a format to encode pointers in exception handling data. */
65 #undef ASM_PREFERRED_EH_DATA_FORMAT
66 #define ASM_PREFERRED_EH_DATA_FORMAT(CODE, GLOBAL) DW_EH_PE_absptr
68 /* TPF OS specific compiler settings. */
69 #undef TARGET_OS_CPP_BUILTINS
70 #define TARGET_OS_CPP_BUILTINS() \
71 do \
72 { \
73 builtin_define_std ("tpf"); \
74 builtin_assert ("system=tpf"); \
75 builtin_define ("__ELF__"); \
76 if (flag_pic) \
77 { \
78 builtin_define ("__PIC__"); \
79 builtin_define ("__pic__"); \
80 } \
81 } \
82 while (0)
85 /* Make TPF specific spec file settings here. */
87 #undef STARTFILE_SPEC
88 #define STARTFILE_SPEC \
89 "%{!shared: \
90 %{pg:gcrt1.o%s} %{!pg:%{p:gcrt1.o%s} \
91 %{!p:%{profile:gcrt1.o%s} \
92 %{!profile:crt1.o%s}}}} \
93 crti.o%s %{static:crtbeginT.o%s} \
94 %{!static:%{!shared:crtbegin.o%s} %{shared:crtbeginS.o%s}}"
96 #undef ENDFILE_SPEC
97 #define ENDFILE_SPEC \
98 "%{!shared:crtend.o%s} %{shared:crtendS.o%s} crtn.o%s"
100 /* The GNU C++ standard library requires that these macros be defined. */
101 #undef CPLUSPLUS_CPP_SPEC
102 #define CPLUSPLUS_CPP_SPEC "-D_GNU_SOURCE %(cpp)"
104 #undef LIB_SPEC
105 #define LIB_SPEC "%{pthread:-lpthread} -lc"
107 #undef TARGET_C99_FUNCTIONS
108 #define TARGET_C99_FUNCTIONS 1
110 #undef LINK_SPEC
111 #define LINK_SPEC \
112 "-m elf64_s390 \
113 %{shared:-shared} \
114 %{!shared: \
115 %{static:-static} \
116 %{!static: \
117 %{rdynamic:-export-dynamic} \
118 %{!dynamic-linker:-dynamic-linker /lib/ld64.so}}}"
120 #define MD_UNWIND_SUPPORT "config/s390/tpf-unwind.h"
122 #endif /* ! _TPF_H */