* xvasprintf.c: New file.
[official-gcc.git] / gcc / config / s390 / tpf.h
blobe71037479f2a9babe244b3d01ff42d02796cc00d
1 /* Definitions for target OS TPF for GNU compiler, for IBM S/390 hardware
2 Copyright (C) 2003-2014 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
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 COPYING3. If not see
21 <http://www.gnu.org/licenses/>. */
23 #ifndef _TPF_H
24 #define _TPF_H
26 /* TPF wants the following macros defined/undefined as follows. */
27 #undef TARGET_TPF
28 #define TARGET_TPF 1
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
34 #define TARGET_POSIX_IO
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
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. */
52 #undef TARGET_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() \
65 do \
66 { \
67 builtin_define_std ("tpf"); \
68 builtin_assert ("system=tpf"); \
69 builtin_define ("__ELF__"); \
70 } \
71 while (0)
74 #define EXTRA_SPECS \
75 { "entry_spec", ENTRY_SPEC }
77 /* Make TPF specific spec file settings here. */
79 #undef STARTFILE_SPEC
80 #define STARTFILE_SPEC \
81 "%{mmain:crt0%O%s} crtbeginS%O%s crt3%O%s"
83 #undef ENDFILE_SPEC
84 #define ENDFILE_SPEC "crtendS%O%s"
86 #undef CC1_SPEC
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 #undef ASM_SPEC
94 #define ASM_SPEC "%{m31&m64}%{mesa&mzarch}%{march=*} \
95 -alshd=%b.lst"
97 #define ENTRY_SPEC "%{mmain:-entry=_start} \
98 %{!mmain:-entry=0}"
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. */
103 #undef LINK_SPEC
104 #define LINK_SPEC \
105 "-m elf64_s390 \
106 %{static:%estatic is not supported on TPF-OS} \
107 %{shared: -shared} \
108 %{!shared:-shared} \
109 %(entry_spec)"
111 /* IBM copies these libraries over with these names. */
112 #define MATH_LIBRARY "CLBM"
113 #define LIBSTDCXX "CPP2"
115 #undef TARGET_LIBC_HAS_FUNCTION
116 #define TARGET_LIBC_HAS_FUNCTION gnu_libc_has_function
118 #endif /* ! _TPF_H */