]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/config/s390/linux.h
Update copyright years.
[thirdparty/gcc.git] / gcc / config / s390 / linux.h
CommitLineData
9db1d521 1/* Definitions for Linux for S/390.
a5544970 2 Copyright (C) 1999-2019 Free Software Foundation, Inc.
9db1d521 3 Contributed by Hartmut Penner (hpenner@de.ibm.com) and
f314b9b1 4 Ulrich Weigand (uweigand@de.ibm.com).
9db1d521 5
58add37a 6This file is part of GCC.
9db1d521 7
58add37a
UW
8GCC is free software; you can redistribute it and/or modify it under
9the terms of the GNU General Public License as published by the Free
2f83c7d6 10Software Foundation; either version 3, or (at your option) any later
58add37a 11version.
9db1d521 12
58add37a
UW
13GCC is distributed in the hope that it will be useful, but WITHOUT ANY
14WARRANTY; without even the implied warranty of MERCHANTABILITY or
15FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
16for more details.
9db1d521
HP
17
18You should have received a copy of the GNU General Public License
2f83c7d6
NC
19along with GCC; see the file COPYING3. If not see
20<http://www.gnu.org/licenses/>. */
9db1d521
HP
21
22#ifndef _LINUX_H
23#define _LINUX_H
24
58d10f89
UW
25/* Target specific type definitions. */
26
df9e7ffb
AK
27/* For 31 bit our size type differs from most other targets (where it
28 is "unsigned int"). The difference tends to cause trouble e.g.:
29 Glibc BZ #16712, GCC BZ #79358 but cannot be changed due to ABI
30 issues. */
58d10f89 31#undef SIZE_TYPE
df9e7ffb 32#define SIZE_TYPE "long unsigned int"
58d10f89
UW
33#undef PTRDIFF_TYPE
34#define PTRDIFF_TYPE (TARGET_64BIT ? "long int" : "int")
9db1d521 35
58d10f89
UW
36#undef WCHAR_TYPE
37#define WCHAR_TYPE "int"
38#undef WCHAR_TYPE_SIZE
39#define WCHAR_TYPE_SIZE 32
40
41
42/* Target specific preprocessor settings. */
43
dd3fbd93
UW
44#define TARGET_OS_CPP_BUILTINS() \
45 do \
46 { \
107fd1c1 47 GNU_USER_TARGET_OS_CPP_BUILTINS(); \
dd3fbd93
UW
48 } \
49 while (0)
58d10f89 50
9db1d521 51
58d10f89 52/* Target specific assembler settings. */
0dbb19f0
AK
53/* Rewrite -march=arch* options to the original CPU name in order to
54 make it work with older binutils. */
58d10f89 55#undef ASM_SPEC
0dbb19f0
AK
56#define ASM_SPEC \
57 "%{m31&m64}%{mesa&mzarch}%{march=z*}" \
0dbb19f0
AK
58 "%{march=arch5:-march=z900}" \
59 "%{march=arch6:-march=z990}" \
60 "%{march=arch7:-march=z9-ec}" \
61 "%{march=arch8:-march=z10}" \
62 "%{march=arch9:-march=z196}" \
63 "%{march=arch10:-march=zEC12}" \
64 "%{march=arch11:-march=z13}"
58d10f89
UW
65
66
67/* Target specific linker settings. */
68
b5798b2a
UW
69#ifdef DEFAULT_TARGET_64BIT
70#define MULTILIB_DEFAULTS { "m64" }
71#else
72#define MULTILIB_DEFAULTS { "m31" }
73#endif
74
7bd85ce0
JM
75#define GLIBC_DYNAMIC_LINKER32 "/lib/ld.so.1"
76#define GLIBC_DYNAMIC_LINKER64 "/lib/ld64.so.1"
77
f13e0d4e
UW
78#undef LINK_SPEC
79#define LINK_SPEC \
80 "%{m31:-m elf_s390}%{m64:-m elf64_s390} \
58d10f89
UW
81 %{shared:-shared} \
82 %{!shared: \
83 %{static:-static} \
8c6562e1 84 %{!static:%{!static-pie: \
9db1d521 85 %{rdynamic:-export-dynamic} \
107fd1c1 86 %{m31:-dynamic-linker " GNU_USER_DYNAMIC_LINKER32 "} \
8c6562e1
JJ
87 %{m64:-dynamic-linker " GNU_USER_DYNAMIC_LINKER64 "}}}} \
88 %{static-pie:-static -pie --no-dynamic-linker -z text}"
58d10f89 89
c2431a62 90#define CPP_SPEC "%{posix:-D_POSIX_SOURCE} %{pthread:-D_REENTRANT}"
58d10f89 91
a5fe455b 92#define TARGET_ASM_FILE_END file_end_indicate_exec_stack
9db1d521 93
7b8acc34
AK
94#ifdef TARGET_LIBC_PROVIDES_SSP
95/* s390 glibc provides __stack_chk_guard in 0x14(tp),
96 s390x glibc provides it at 0x28(tp). */
97#define TARGET_THREAD_SSP_OFFSET (TARGET_64BIT ? 0x28 : 0x14)
98#endif
99
7269aee7
AH
100/* Define if long doubles should be mangled as 'g'. */
101#define TARGET_ALTERNATE_LONG_DOUBLE_MANGLING
102
bcba7ecc
AK
103#undef TARGET_LIBC_HAS_FUNCTION
104#define TARGET_LIBC_HAS_FUNCTION gnu_libc_has_function
105
cbddf64c
JJ
106/* Uninitialized common symbols in non-PIE executables, even with
107 strong definitions in dependent shared libraries, will resolve
108 to COPY relocated symbol in the executable. See PR65780. */
109#undef TARGET_BINDS_LOCAL_P
110#define TARGET_BINDS_LOCAL_P default_binds_local_p_2
111
9db1d521 112#endif