]> git.ipfire.org Git - thirdparty/gcc.git/blob - gcc/config/s390/tpf.h
config.gcc (s390x-ibm-tpf*): New target.
[thirdparty/gcc.git] / gcc / config / s390 / tpf.h
1 /* Definitions for target OS TPF for GNU compiler, for IBM S/390 hardware
2 Copyright (C) 2003 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).
6
7 This file is part of GCC.
8
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
12 version.
13
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.
18
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
22 02111-1307, USA. */
23
24 #ifndef _TPF_H
25 #define _TPF_H
26
27 /* TPF wants the following macros defined/undefined as follows. */
28 #undef ASM_APP_ON
29 #define ASM_APP_ON "#APP\n"
30 #undef ASM_APP_OFF
31 #define ASM_APP_OFF "#NO_APP\n"
32 #define NO_IMPLICIT_EXTERN_C
33 #define TARGET_HAS_F_SETLKW
34 #undef MD_EXEC_PREFIX
35 #undef MD_STARTFILE_PREFIX
36
37 #undef SIZE_TYPE
38 #define SIZE_TYPE ("long unsigned int")
39 #undef PTRDIFF_TYPE
40 #define PTRDIFF_TYPE ("long int")
41 #undef WCHAR_TYPE
42 #define WCHAR_TYPE "int"
43 #undef WCHAR_TYPE_SIZE
44 #define WCHAR_TYPE_SIZE 32
45
46
47 /* Basic record keeping for the TPF OS name. */
48 #undef TARGET_VERSION
49 #define TARGET_VERSION fprintf (stderr, " (TPF: zSeries)");
50
51 /* TPF OS specific stack-pointer offset. */
52 #undef STACK_POINTER_OFFSET
53 #define STACK_POINTER_OFFSET 280
54
55 /* When building for TPF, set a generic default target that is 64 bits. */
56 #undef TARGET_DEFAULT
57 #define TARGET_DEFAULT 0x33
58
59 /* TPF OS specific compiler settings. */
60 #undef TARGET_OS_CPP_BUILTINS
61 #define TARGET_OS_CPP_BUILTINS() \
62 do \
63 { \
64 builtin_define_std ("tpf"); \
65 builtin_assert ("system=tpf"); \
66 builtin_define ("__ELF__"); \
67 if (flag_pic) \
68 { \
69 builtin_define ("__PIC__"); \
70 builtin_define ("__pic__"); \
71 } \
72 } \
73 while (0)
74
75
76 /* Make TPF specific spec file settings here. */
77
78 #undef STARTFILE_SPEC
79 #define STARTFILE_SPEC \
80 "%{!shared: \
81 %{pg:gcrt1.o%s} %{!pg:%{p:gcrt1.o%s} \
82 %{!p:%{profile:gcrt1.o%s} \
83 %{!profile:crt1.o%s}}}} \
84 crti.o%s %{static:crtbeginT.o%s} \
85 %{!static:%{!shared:crtbegin.o%s} %{shared:crtbeginS.o%s}}"
86
87 #undef ENDFILE_SPEC
88 #define ENDFILE_SPEC \
89 "%{!shared:crtend.o%s} %{shared:crtendS.o%s} crtn.o%s"
90
91 /* The GNU C++ standard library requires that these macros be defined. */
92 #undef CPLUSPLUS_CPP_SPEC
93 #define CPLUSPLUS_CPP_SPEC "-D_GNU_SOURCE %(cpp)"
94
95 #undef LIB_SPEC
96 #define LIB_SPEC "%{pthread:-lpthread} -lc"
97
98 #undef TARGET_C99_FUNCTIONS
99 #define TARGET_C99_FUNCTIONS 1
100
101 #undef LINK_SPEC
102 #define LINK_SPEC \
103 "-m elf64_s390 \
104 %{shared:-shared} \
105 %{!shared: \
106 %{static:-static} \
107 %{!static: \
108 %{rdynamic:-export-dynamic} \
109 %{!dynamic-linker:-dynamic-linker /lib/ld64.so}}}"
110
111 #endif /* ! _TPF_H */
112