1 /* Definitions for target OS TPF for GNU compiler, for IBM S/390 hardware
2 Copyright (C) 2003-2016 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 3, or (at your option) any later
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
19 You should have received a copy of the GNU General Public License
20 along with GCC; see the file COPYING3. If not see
21 <http://www.gnu.org/licenses/>. */
26 /* TPF wants the following macros defined/undefined as follows. */
30 #define ASM_APP_ON "#APP\n"
32 #define ASM_APP_OFF "#NO_APP\n"
33 #define NO_IMPLICIT_EXTERN_C
34 #define TARGET_POSIX_IO
37 #define SIZE_TYPE ("long unsigned int")
39 #define PTRDIFF_TYPE ("long int")
41 #define WCHAR_TYPE "int"
42 #undef WCHAR_TYPE_SIZE
43 #define WCHAR_TYPE_SIZE 32
46 /* TPF OS specific stack-pointer offset. */
47 #undef STACK_POINTER_OFFSET
48 #define STACK_POINTER_OFFSET 448
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. */
53 #define TARGET_DEFAULT (MASK_TPF_PROFILING | MASK_64BIT | MASK_ZARCH \
54 | MASK_HARD_DFP | MASK_BACKCHAIN)
56 /* Exception handling. */
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
62 /* TPF OS specific compiler settings. */
63 #undef TARGET_OS_CPP_BUILTINS
64 #define TARGET_OS_CPP_BUILTINS() \
67 builtin_define_std ("tpf"); \
68 builtin_assert ("system=tpf"); \
69 builtin_define ("__ELF__"); \
75 { "entry_spec", ENTRY_SPEC }
77 /* Make TPF specific spec file settings here. */
80 #define STARTFILE_SPEC \
81 "%{mmain:crt0%O%s} crtbeginS%O%s crt3%O%s"
84 #define ENDFILE_SPEC "crtendS%O%s"
87 #define CC1_SPEC "%{!fverbose-asm: -fverbose-asm}"
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)"
93 /* Rewrite -march=arch* options to the original CPU name in order to
94 make it work with older binutils. */
97 "%{m31&m64}%{mesa&mzarch}%{march=z*}" \
98 "%{march=arch3:-march=g5}" \
99 "%{march=arch5:-march=z900}" \
100 "%{march=arch6:-march=z990}" \
101 "%{march=arch7:-march=z9-ec}" \
102 "%{march=arch8:-march=z10}" \
103 "%{march=arch9:-march=z196}" \
104 "%{march=arch10:-march=zEC12}" \
105 "%{march=arch11:-march=z13}" \
109 #define LIB_SPEC "-lCTIS -lCISO -lCLBM -lCTAL -lCFVS -lCTBX -lCTXO \
110 -lCJ00 -lCTDF -lCOMX -lCOMS -lCTHD -lCTAD -lTPFSTUB"
112 #define ENTRY_SPEC "%{mmain:-entry=_start} \
115 /* All linking is done shared on TPF-OS. */
116 /* FIXME: When binutils patch for new emulation is committed
117 then change emulation to elf64_s390_tpf. */
121 %{static:%estatic is not supported on TPF-OS} \
126 /* IBM copies these libraries over with these names. */
127 #define MATH_LIBRARY "CLBM"
128 #define LIBSTDCXX "CPP1"
130 #undef TARGET_LIBC_HAS_FUNCTION
131 #define TARGET_LIBC_HAS_FUNCTION gnu_libc_has_function
133 /* GAS supports it, but the debuggers don't, so avoid it. */
134 #define SUPPORTS_DISCRIMINATOR 0
136 #endif /* ! _TPF_H */