]>
git.ipfire.org Git - thirdparty/gcc.git/blob - gcc/config/s390/tpf.h
1 /* Definitions for target OS TPF for GNU compiler, for IBM S/390 hardware
2 Copyright (C) 2003, 2004 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, 59 Temple Place - Suite 330, 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_HAS_F_SETLKW
37 #undef MD_STARTFILE_PREFIX
40 #define SIZE_TYPE ("long unsigned int")
42 #define PTRDIFF_TYPE ("long int")
44 #define WCHAR_TYPE "int"
45 #undef WCHAR_TYPE_SIZE
46 #define WCHAR_TYPE_SIZE 32
49 /* Basic record keeping for the TPF OS name. */
51 #define TARGET_VERSION fprintf (stderr, " (TPF: zSeries)");
53 /* TPF OS specific stack-pointer offset. */
54 #undef STACK_POINTER_OFFSET
55 #define STACK_POINTER_OFFSET 448
57 /* When building for TPF, set a generic default target that is 64 bits.
58 Also, enable TPF profiling support and the standard backchain by default. */
60 #define TARGET_DEFAULT (MASK_64BIT | MASK_ZARCH | MASK_HARD_FLOAT \
61 | MASK_TPF_PROFILING | MASK_BACKCHAIN)
62 /* Exception handling. */
64 /* Select a format to encode pointers in exception handling data. */
65 #undef ASM_PREFERRED_EH_DATA_FORMAT
66 #define ASM_PREFERRED_EH_DATA_FORMAT(CODE, GLOBAL) DW_EH_PE_absptr
68 /* TPF OS specific compiler settings. */
69 #undef TARGET_OS_CPP_BUILTINS
70 #define TARGET_OS_CPP_BUILTINS() \
73 builtin_define_std ("tpf"); \
74 builtin_assert ("system=tpf"); \
75 builtin_define ("__ELF__"); \
78 builtin_define ("__PIC__"); \
79 builtin_define ("__pic__"); \
85 /* Make TPF specific spec file settings here. */
88 #define STARTFILE_SPEC \
90 %{pg:gcrt1.o%s} %{!pg:%{p:gcrt1.o%s} \
91 %{!p:%{profile:gcrt1.o%s} \
92 %{!profile:crt1.o%s}}}} \
93 crti.o%s %{static:crtbeginT.o%s} \
94 %{!static:%{!shared:crtbegin.o%s} %{shared:crtbeginS.o%s}}"
97 #define ENDFILE_SPEC \
98 "%{!shared:crtend.o%s} %{shared:crtendS.o%s} crtn.o%s"
100 /* The GNU C++ standard library requires that these macros be defined. */
101 #undef CPLUSPLUS_CPP_SPEC
102 #define CPLUSPLUS_CPP_SPEC "-D_GNU_SOURCE %(cpp)"
105 #define ASM_SPEC "%{m31&m64}%{mesa&mzarch}%{march=*}"
108 #define LIB_SPEC "%{pthread:-lpthread} -lc"
110 #undef TARGET_C99_FUNCTIONS
111 #define TARGET_C99_FUNCTIONS 1
120 %{rdynamic:-export-dynamic} \
121 %{!dynamic-linker:-dynamic-linker /lib/ld64.so}}}"
123 #define MD_UNWIND_SUPPORT "config/s390/tpf-unwind.h"
125 #endif /* ! _TPF_H */