1 /* Definitions for target OS TPF for GNU compiler, for IBM S/390 hardware
2 Copyright (C) 2003, 2004, 2005 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
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 COPYING. If not, write to the Free
21 Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA
27 /* TPF wants the following macros defined/undefined as follows. */
31 #define ASM_APP_ON "#APP\n"
33 #define ASM_APP_OFF "#NO_APP\n"
34 #define NO_IMPLICIT_EXTERN_C
35 #define TARGET_POSIX_IO
38 #define SIZE_TYPE ("long unsigned int")
40 #define PTRDIFF_TYPE ("long int")
42 #define WCHAR_TYPE "int"
43 #undef WCHAR_TYPE_SIZE
44 #define WCHAR_TYPE_SIZE 32
47 /* Basic record keeping for the TPF OS name. */
49 #define TARGET_VERSION fprintf (stderr, " (TPF: zSeries)");
51 /* TPF OS specific stack-pointer offset. */
52 #undef STACK_POINTER_OFFSET
53 #define STACK_POINTER_OFFSET 448
55 /* When building for TPF, set a generic default target that is 64 bits. Also
56 enable TPF profiling support and the standard backchain by default. */
58 #define TARGET_DEFAULT (MASK_TPF_PROFILING | MASK_64BIT | MASK_ZARCH \
59 | MASK_HARD_FLOAT | MASK_BACKCHAIN)
61 /* Exception handling. */
63 /* Select a format to encode pointers in exception handling data. */
64 #undef ASM_PREFERRED_EH_DATA_FORMAT
65 #define ASM_PREFERRED_EH_DATA_FORMAT(CODE, GLOBAL) DW_EH_PE_absptr
67 /* TPF OS specific compiler settings. */
68 #undef TARGET_OS_CPP_BUILTINS
69 #define TARGET_OS_CPP_BUILTINS() \
72 builtin_define_std ("tpf"); \
73 builtin_assert ("system=tpf"); \
74 builtin_define ("__ELF__"); \
77 builtin_define ("__PIC__"); \
78 builtin_define ("__pic__"); \
85 { "entry_spec", ENTRY_SPEC }
87 /* Make TPF specific spec file settings here. */
90 #define STARTFILE_SPEC \
91 "%{mmain:crt0%O%s} crtbeginS%O%s crt3%O%s"
94 #define ENDFILE_SPEC "crtendS%O%s"
97 #define CC1_SPEC "%{!fverbose-asm: -fverbose-asm}"
99 /* The GNU C++ standard library requires that these macros be defined. */
100 #undef CPLUSPLUS_CPP_SPEC
101 #define CPLUSPLUS_CPP_SPEC "-D_GNU_SOURCE %(cpp)"
104 #define ASM_SPEC "%{m31&m64}%{mesa&mzarch}%{march=*} \
107 /* It would be nice to get the system linker script define the ones that it
110 #define LIB_SPEC "-lCTIS -lCISO -lCLBM -lCTAL -lCFVS -lCTBX -lCTXO \
111 -lCJ00 -lCTDF -lCOMX -lCOMS -lCTHD -lCTAD -lTPFSTUB"
113 #undef TARGET_C99_FUNCTIONS
114 #define TARGET_C99_FUNCTIONS 1
116 #define ENTRY_SPEC "%{mmain:-entry=_start} \
119 /* All linking is done shared on TPF-OS. */
120 /* FIXME: When binutils patch for new emulation is committed
121 then change emulation to elf64_s390_tpf. */
125 %{static:%estatic is not supported on TPF-OS} \
130 #define MD_UNWIND_SUPPORT "config/s390/tpf-unwind.h"
132 /* IBM copies these libraries over with these names. */
133 #define MATH_LIBRARY "-lCLBM"
134 #define LIBSTDCXX "-lCPP1"
135 #endif /* ! _TPF_H */