]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/config/s390/tpf.h
Update copyright years.
[thirdparty/gcc.git] / gcc / config / s390 / tpf.h
CommitLineData
24fe22c9 1/* Definitions for target OS TPF for GNU compiler, for IBM S/390 hardware
8d9254fc 2 Copyright (C) 2003-2020 Free Software Foundation, Inc.
24fe22c9 3 Contributed by P.J. Darcy (darcypj@us.ibm.com),
0ff3dcd6
AK
4 Hartmut Penner (hpenner@de.ibm.com), and
5 Ulrich Weigand (uweigand@de.ibm.com).
24fe22c9
UW
6
7This file is part of GCC.
8
9GCC is free software; you can redistribute it and/or modify it under
10the terms of the GNU General Public License as published by the Free
2f83c7d6 11Software Foundation; either version 3, or (at your option) any later
24fe22c9
UW
12version.
13
14GCC is distributed in the hope that it will be useful, but WITHOUT ANY
15WARRANTY; without even the implied warranty of MERCHANTABILITY or
16FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
17for more details.
18
19You should have received a copy of the GNU General Public License
2f83c7d6
NC
20along 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"
4969c0d8 33#define TARGET_POSIX_IO
24fe22c9
UW
34
35#undef SIZE_TYPE
36#define SIZE_TYPE ("long unsigned int")
37#undef PTRDIFF_TYPE
38#define PTRDIFF_TYPE ("long int")
39#undef WCHAR_TYPE
40#define WCHAR_TYPE "int"
41#undef WCHAR_TYPE_SIZE
42#define WCHAR_TYPE_SIZE 32
43
44
24fe22c9
UW
45/* TPF OS specific stack-pointer offset. */
46#undef STACK_POINTER_OFFSET
0ff3dcd6 47#define STACK_POINTER_OFFSET 448
24fe22c9 48
a8ba31f2
EC
49/* When building for TPF, set a generic default target that is 64 bits. Also
50 enable TPF profiling support and the standard backchain by default. */
24fe22c9 51#undef TARGET_DEFAULT
a8ba31f2 52#define TARGET_DEFAULT (MASK_TPF_PROFILING | MASK_64BIT | MASK_ZARCH \
4e7d730d 53 | MASK_HARD_DFP | MASK_BACKCHAIN)
a8ba31f2 54
4798630c
D
55/* Exception handling. */
56
57/* Select a format to encode pointers in exception handling data. */
58#undef ASM_PREFERRED_EH_DATA_FORMAT
59#define ASM_PREFERRED_EH_DATA_FORMAT(CODE, GLOBAL) DW_EH_PE_absptr
24fe22c9
UW
60
61/* TPF OS specific compiler settings. */
62#undef TARGET_OS_CPP_BUILTINS
63#define TARGET_OS_CPP_BUILTINS() \
64 do \
65 { \
66 builtin_define_std ("tpf"); \
67 builtin_assert ("system=tpf"); \
68 builtin_define ("__ELF__"); \
24fe22c9
UW
69 } \
70 while (0)
71
72
a8ba31f2
EC
73#define EXTRA_SPECS \
74 { "entry_spec", ENTRY_SPEC }
75
24fe22c9
UW
76/* Make TPF specific spec file settings here. */
77
a8ba31f2 78#undef STARTFILE_SPEC
24fe22c9 79#define STARTFILE_SPEC \
a8ba31f2
EC
80 "%{mmain:crt0%O%s} crtbeginS%O%s crt3%O%s"
81
82#undef ENDFILE_SPEC
83#define ENDFILE_SPEC "crtendS%O%s"
24fe22c9 84
a8ba31f2
EC
85#undef CC1_SPEC
86#define CC1_SPEC "%{!fverbose-asm: -fverbose-asm}"
24fe22c9
UW
87
88/* The GNU C++ standard library requires that these macros be defined. */
89#undef CPLUSPLUS_CPP_SPEC
90#define CPLUSPLUS_CPP_SPEC "-D_GNU_SOURCE %(cpp)"
91
0dbb19f0
AK
92/* Rewrite -march=arch* options to the original CPU name in order to
93 make it work with older binutils. */
94#undef ASM_SPEC
95#define ASM_SPEC \
96 "%{m31&m64}%{mesa&mzarch}%{march=z*}" \
0dbb19f0
AK
97 "%{march=arch5:-march=z900}" \
98 "%{march=arch6:-march=z990}" \
99 "%{march=arch7:-march=z9-ec}" \
100 "%{march=arch8:-march=z10}" \
101 "%{march=arch9:-march=z196}" \
102 "%{march=arch10:-march=zEC12}" \
103 "%{march=arch11:-march=z13}" \
104 " -alshd=%b.lst"
937d85ba 105
b8a4094a
DD
106#undef LIB_SPEC
107#define LIB_SPEC "-lCTIS -lCISO -lCLBM -lCTAL -lCFVS -lCTBX -lCTXO \
0ff3dcd6 108 -lCJ00 -lCTDF -lCOMX -lCOMS -lCTHD -lCTAD -lTPFSTUB"
b8a4094a 109
a8ba31f2 110#define ENTRY_SPEC "%{mmain:-entry=_start} \
0ff3dcd6 111 %{!mmain:-entry=0}"
a8ba31f2
EC
112
113/* All linking is done shared on TPF-OS. */
114/* FIXME: When binutils patch for new emulation is committed
115 then change emulation to elf64_s390_tpf. */
24fe22c9
UW
116#undef LINK_SPEC
117#define LINK_SPEC \
118 "-m elf64_s390 \
a8ba31f2
EC
119 %{static:%estatic is not supported on TPF-OS} \
120 %{shared: -shared} \
121 %{!shared:-shared} \
122 %(entry_spec)"
24fe22c9 123
a8ba31f2 124/* IBM copies these libraries over with these names. */
d9d16a19 125#define MATH_LIBRARY "CLBM"
b8a4094a 126#define LIBSTDCXX "CPP1"
d33d9e47 127
d33d9e47 128#undef TARGET_LIBC_HAS_FUNCTION
bcba7ecc
AK
129#define TARGET_LIBC_HAS_FUNCTION gnu_libc_has_function
130
b8a4094a
DD
131/* GAS supports it, but the debuggers don't, so avoid it. */
132#define SUPPORTS_DISCRIMINATOR 0
133
bcba7ecc 134#endif /* ! _TPF_H */