]>
Commit | Line | Data |
---|---|---|
24fe22c9 | 1 | /* Definitions for target OS TPF for GNU compiler, for IBM S/390 hardware |
5624e564 | 2 | Copyright (C) 2003-2015 Free Software Foundation, Inc. |
24fe22c9 UW |
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). | |
6 | ||
7 | This file is part of GCC. | |
8 | ||
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 | |
2f83c7d6 | 11 | Software Foundation; either version 3, or (at your option) any later |
24fe22c9 UW |
12 | version. |
13 | ||
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. | |
18 | ||
19 | You should have received a copy of the GNU General Public License | |
2f83c7d6 NC |
20 | along with GCC; see the file COPYING3. If not see |
21 | <http://www.gnu.org/licenses/>. */ | |
24fe22c9 UW |
22 | |
23 | #ifndef _TPF_H | |
24 | #define _TPF_H | |
25 | ||
26 | /* TPF wants the following macros defined/undefined as follows. */ | |
4798630c D |
27 | #undef TARGET_TPF |
28 | #define TARGET_TPF 1 | |
24fe22c9 UW |
29 | #undef ASM_APP_ON |
30 | #define ASM_APP_ON "#APP\n" | |
31 | #undef ASM_APP_OFF | |
32 | #define ASM_APP_OFF "#NO_APP\n" | |
33 | #define NO_IMPLICIT_EXTERN_C | |
4969c0d8 | 34 | #define TARGET_POSIX_IO |
24fe22c9 UW |
35 | |
36 | #undef SIZE_TYPE | |
37 | #define SIZE_TYPE ("long unsigned int") | |
38 | #undef PTRDIFF_TYPE | |
39 | #define PTRDIFF_TYPE ("long int") | |
40 | #undef WCHAR_TYPE | |
41 | #define WCHAR_TYPE "int" | |
42 | #undef WCHAR_TYPE_SIZE | |
43 | #define WCHAR_TYPE_SIZE 32 | |
44 | ||
45 | ||
24fe22c9 UW |
46 | /* TPF OS specific stack-pointer offset. */ |
47 | #undef STACK_POINTER_OFFSET | |
4798630c | 48 | #define STACK_POINTER_OFFSET 448 |
24fe22c9 | 49 | |
a8ba31f2 EC |
50 | /* When building for TPF, set a generic default target that is 64 bits. Also |
51 | enable TPF profiling support and the standard backchain by default. */ | |
24fe22c9 | 52 | #undef TARGET_DEFAULT |
a8ba31f2 | 53 | #define TARGET_DEFAULT (MASK_TPF_PROFILING | MASK_64BIT | MASK_ZARCH \ |
4e7d730d | 54 | | MASK_HARD_DFP | MASK_BACKCHAIN) |
a8ba31f2 | 55 | |
4798630c D |
56 | /* Exception handling. */ |
57 | ||
58 | /* Select a format to encode pointers in exception handling data. */ | |
59 | #undef ASM_PREFERRED_EH_DATA_FORMAT | |
60 | #define ASM_PREFERRED_EH_DATA_FORMAT(CODE, GLOBAL) DW_EH_PE_absptr | |
24fe22c9 UW |
61 | |
62 | /* TPF OS specific compiler settings. */ | |
63 | #undef TARGET_OS_CPP_BUILTINS | |
64 | #define TARGET_OS_CPP_BUILTINS() \ | |
65 | do \ | |
66 | { \ | |
67 | builtin_define_std ("tpf"); \ | |
68 | builtin_assert ("system=tpf"); \ | |
69 | builtin_define ("__ELF__"); \ | |
24fe22c9 UW |
70 | } \ |
71 | while (0) | |
72 | ||
73 | ||
a8ba31f2 EC |
74 | #define EXTRA_SPECS \ |
75 | { "entry_spec", ENTRY_SPEC } | |
76 | ||
24fe22c9 UW |
77 | /* Make TPF specific spec file settings here. */ |
78 | ||
a8ba31f2 | 79 | #undef STARTFILE_SPEC |
24fe22c9 | 80 | #define STARTFILE_SPEC \ |
a8ba31f2 EC |
81 | "%{mmain:crt0%O%s} crtbeginS%O%s crt3%O%s" |
82 | ||
83 | #undef ENDFILE_SPEC | |
84 | #define ENDFILE_SPEC "crtendS%O%s" | |
24fe22c9 | 85 | |
a8ba31f2 EC |
86 | #undef CC1_SPEC |
87 | #define CC1_SPEC "%{!fverbose-asm: -fverbose-asm}" | |
24fe22c9 UW |
88 | |
89 | /* The GNU C++ standard library requires that these macros be defined. */ | |
90 | #undef CPLUSPLUS_CPP_SPEC | |
91 | #define CPLUSPLUS_CPP_SPEC "-D_GNU_SOURCE %(cpp)" | |
92 | ||
a8ba31f2 EC |
93 | #undef ASM_SPEC |
94 | #define ASM_SPEC "%{m31&m64}%{mesa&mzarch}%{march=*} \ | |
95 | -alshd=%b.lst" | |
937d85ba | 96 | |
a8ba31f2 EC |
97 | #define ENTRY_SPEC "%{mmain:-entry=_start} \ |
98 | %{!mmain:-entry=0}" | |
99 | ||
100 | /* All linking is done shared on TPF-OS. */ | |
101 | /* FIXME: When binutils patch for new emulation is committed | |
102 | then change emulation to elf64_s390_tpf. */ | |
24fe22c9 UW |
103 | #undef LINK_SPEC |
104 | #define LINK_SPEC \ | |
105 | "-m elf64_s390 \ | |
a8ba31f2 EC |
106 | %{static:%estatic is not supported on TPF-OS} \ |
107 | %{shared: -shared} \ | |
108 | %{!shared:-shared} \ | |
109 | %(entry_spec)" | |
24fe22c9 | 110 | |
a8ba31f2 | 111 | /* IBM copies these libraries over with these names. */ |
d9d16a19 | 112 | #define MATH_LIBRARY "CLBM" |
5e0cea66 | 113 | #define LIBSTDCXX "CPP2" |
d33d9e47 | 114 | |
d33d9e47 | 115 | #undef TARGET_LIBC_HAS_FUNCTION |
bcba7ecc AK |
116 | #define TARGET_LIBC_HAS_FUNCTION gnu_libc_has_function |
117 | ||
118 | #endif /* ! _TPF_H */ |