]> CyberLeo.Net >> Repos - FreeBSD/releng/9.2.git/blob - contrib/gcc/config/s390/linux.h
- Copy stable/9 to releng/9.2 as part of the 9.2-RELEASE cycle.
[FreeBSD/releng/9.2.git] / contrib / gcc / config / s390 / linux.h
1 /* Definitions for Linux for S/390.
2    Copyright (C) 1999, 2000, 2001, 2002, 2004, 2005, 2006
3    Free Software Foundation, Inc.
4    Contributed by 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, 51 Franklin Street, Fifth Floor, Boston, MA
22 02110-1301, USA.  */
23
24 #ifndef _LINUX_H
25 #define _LINUX_H
26
27 /* Target specific version string.  */
28
29 #ifdef DEFAULT_TARGET_64BIT
30 #undef  TARGET_VERSION
31 #define TARGET_VERSION fprintf (stderr, " (Linux for zSeries)");
32 #else
33 #undef  TARGET_VERSION
34 #define TARGET_VERSION fprintf (stderr, " (Linux for S/390)");
35 #endif
36
37
38 /* Target specific type definitions.  */
39
40 /* ??? Do we really want long as size_t on 31-bit?  */
41 #undef  SIZE_TYPE
42 #define SIZE_TYPE (TARGET_64BIT ? "long unsigned int" : "long unsigned int")
43 #undef  PTRDIFF_TYPE
44 #define PTRDIFF_TYPE (TARGET_64BIT ? "long int" : "int")
45
46 #undef  WCHAR_TYPE
47 #define WCHAR_TYPE "int"
48 #undef  WCHAR_TYPE_SIZE
49 #define WCHAR_TYPE_SIZE 32
50
51
52 /* Target specific preprocessor settings.  */
53
54 #define TARGET_OS_CPP_BUILTINS()                \
55   do                                            \
56     {                                           \
57       LINUX_TARGET_OS_CPP_BUILTINS();           \
58     }                                           \
59   while (0)
60
61
62 /* Target specific assembler settings.  */
63
64 #undef  ASM_SPEC
65 #define ASM_SPEC "%{m31&m64}%{mesa&mzarch}%{march=*}"
66
67
68 /* Target specific linker settings.  */
69
70 #ifdef DEFAULT_TARGET_64BIT
71 #define MULTILIB_DEFAULTS { "m64" }
72 #else
73 #define MULTILIB_DEFAULTS { "m31" }
74 #endif
75
76 #define GLIBC_DYNAMIC_LINKER32 "/lib/ld.so.1"
77 #define GLIBC_DYNAMIC_LINKER64 "/lib/ld64.so.1"
78
79 #undef  LINK_SPEC
80 #define LINK_SPEC \
81   "%{m31:-m elf_s390}%{m64:-m elf64_s390} \
82    %{shared:-shared} \
83    %{!shared: \
84       %{static:-static} \
85       %{!static: \
86         %{rdynamic:-export-dynamic} \
87         %{!dynamic-linker: \
88           %{m31:-dynamic-linker " LINUX_DYNAMIC_LINKER32 "} \
89           %{m64:-dynamic-linker " LINUX_DYNAMIC_LINKER64 "}}}}"
90
91 #define CPP_SPEC "%{posix:-D_POSIX_SOURCE} %{pthread:-D_REENTRANT}"
92
93 #define TARGET_ASM_FILE_END file_end_indicate_exec_stack
94
95 #define MD_UNWIND_SUPPORT "config/s390/linux-unwind.h"
96
97 #ifdef TARGET_LIBC_PROVIDES_SSP
98 /* s390 glibc provides __stack_chk_guard in 0x14(tp),
99    s390x glibc provides it at 0x28(tp).  */
100 #define TARGET_THREAD_SSP_OFFSET        (TARGET_64BIT ? 0x28 : 0x14)
101 #endif
102
103 /* Define if long doubles should be mangled as 'g'.  */
104 #define TARGET_ALTERNATE_LONG_DOUBLE_MANGLING
105
106 #endif