Mercurial > hg > CbC > CbC_gcc
comparison gcc/config/s390/linux.h @ 111:04ced10e8804
gcc 7
author | kono |
---|---|
date | Fri, 27 Oct 2017 22:46:09 +0900 |
parents | f6334be47118 |
children | 84e7813d76e9 |
comparison
equal
deleted
inserted
replaced
68:561a7518be6b | 111:04ced10e8804 |
---|---|
1 /* Definitions for Linux for S/390. | 1 /* Definitions for Linux for S/390. |
2 Copyright (C) 1999, 2000, 2001, 2002, 2004, 2005, 2006, 2007, 2010 | 2 Copyright (C) 1999-2017 Free Software Foundation, Inc. |
3 Free Software Foundation, Inc. | |
4 Contributed by Hartmut Penner (hpenner@de.ibm.com) and | 3 Contributed by Hartmut Penner (hpenner@de.ibm.com) and |
5 Ulrich Weigand (uweigand@de.ibm.com). | 4 Ulrich Weigand (uweigand@de.ibm.com). |
6 | 5 |
7 This file is part of GCC. | 6 This file is part of GCC. |
8 | 7 |
21 <http://www.gnu.org/licenses/>. */ | 20 <http://www.gnu.org/licenses/>. */ |
22 | 21 |
23 #ifndef _LINUX_H | 22 #ifndef _LINUX_H |
24 #define _LINUX_H | 23 #define _LINUX_H |
25 | 24 |
26 /* Target specific version string. */ | |
27 | |
28 #ifdef DEFAULT_TARGET_64BIT | |
29 #undef TARGET_VERSION | |
30 #define TARGET_VERSION fprintf (stderr, " (Linux for zSeries)"); | |
31 #else | |
32 #undef TARGET_VERSION | |
33 #define TARGET_VERSION fprintf (stderr, " (Linux for S/390)"); | |
34 #endif | |
35 | |
36 | |
37 /* Target specific type definitions. */ | 25 /* Target specific type definitions. */ |
38 | 26 |
39 /* ??? Do we really want long as size_t on 31-bit? */ | 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. */ | |
40 #undef SIZE_TYPE | 31 #undef SIZE_TYPE |
41 #define SIZE_TYPE (TARGET_64BIT ? "long unsigned int" : "long unsigned int") | 32 #define SIZE_TYPE "long unsigned int" |
42 #undef PTRDIFF_TYPE | 33 #undef PTRDIFF_TYPE |
43 #define PTRDIFF_TYPE (TARGET_64BIT ? "long int" : "int") | 34 #define PTRDIFF_TYPE (TARGET_64BIT ? "long int" : "int") |
44 | 35 |
45 #undef WCHAR_TYPE | 36 #undef WCHAR_TYPE |
46 #define WCHAR_TYPE "int" | 37 #define WCHAR_TYPE "int" |
51 /* Target specific preprocessor settings. */ | 42 /* Target specific preprocessor settings. */ |
52 | 43 |
53 #define TARGET_OS_CPP_BUILTINS() \ | 44 #define TARGET_OS_CPP_BUILTINS() \ |
54 do \ | 45 do \ |
55 { \ | 46 { \ |
56 LINUX_TARGET_OS_CPP_BUILTINS(); \ | 47 GNU_USER_TARGET_OS_CPP_BUILTINS(); \ |
57 } \ | 48 } \ |
58 while (0) | 49 while (0) |
59 | 50 |
60 | 51 |
61 /* Target specific assembler settings. */ | 52 /* Target specific assembler settings. */ |
62 | 53 /* Rewrite -march=arch* options to the original CPU name in order to |
54 make it work with older binutils. */ | |
63 #undef ASM_SPEC | 55 #undef ASM_SPEC |
64 #define ASM_SPEC "%{m31&m64}%{mesa&mzarch}%{march=*}" | 56 #define ASM_SPEC \ |
57 "%{m31&m64}%{mesa&mzarch}%{march=z*}" \ | |
58 "%{march=arch3:-march=g5}" \ | |
59 "%{march=arch5:-march=z900}" \ | |
60 "%{march=arch6:-march=z990}" \ | |
61 "%{march=arch7:-march=z9-ec}" \ | |
62 "%{march=arch8:-march=z10}" \ | |
63 "%{march=arch9:-march=z196}" \ | |
64 "%{march=arch10:-march=zEC12}" \ | |
65 "%{march=arch11:-march=z13}" | |
65 | 66 |
66 | 67 |
67 /* Target specific linker settings. */ | 68 /* Target specific linker settings. */ |
68 | 69 |
69 #ifdef DEFAULT_TARGET_64BIT | 70 #ifdef DEFAULT_TARGET_64BIT |
79 #define LINK_SPEC \ | 80 #define LINK_SPEC \ |
80 "%{m31:-m elf_s390}%{m64:-m elf64_s390} \ | 81 "%{m31:-m elf_s390}%{m64:-m elf64_s390} \ |
81 %{shared:-shared} \ | 82 %{shared:-shared} \ |
82 %{!shared: \ | 83 %{!shared: \ |
83 %{static:-static} \ | 84 %{static:-static} \ |
84 %{!static: \ | 85 %{!static:%{!static-pie: \ |
85 %{rdynamic:-export-dynamic} \ | 86 %{rdynamic:-export-dynamic} \ |
86 %{m31:-dynamic-linker " LINUX_DYNAMIC_LINKER32 "} \ | 87 %{m31:-dynamic-linker " GNU_USER_DYNAMIC_LINKER32 "} \ |
87 %{m64:-dynamic-linker " LINUX_DYNAMIC_LINKER64 "}}}" | 88 %{m64:-dynamic-linker " GNU_USER_DYNAMIC_LINKER64 "}}}} \ |
89 %{static-pie:-static -pie --no-dynamic-linker -z text}" | |
88 | 90 |
89 #define CPP_SPEC "%{posix:-D_POSIX_SOURCE} %{pthread:-D_REENTRANT}" | 91 #define CPP_SPEC "%{posix:-D_POSIX_SOURCE} %{pthread:-D_REENTRANT}" |
90 | 92 |
91 #define TARGET_ASM_FILE_END file_end_indicate_exec_stack | 93 #define TARGET_ASM_FILE_END file_end_indicate_exec_stack |
92 | |
93 #define MD_UNWIND_SUPPORT "config/s390/linux-unwind.h" | |
94 | 94 |
95 #ifdef TARGET_LIBC_PROVIDES_SSP | 95 #ifdef TARGET_LIBC_PROVIDES_SSP |
96 /* s390 glibc provides __stack_chk_guard in 0x14(tp), | 96 /* s390 glibc provides __stack_chk_guard in 0x14(tp), |
97 s390x glibc provides it at 0x28(tp). */ | 97 s390x glibc provides it at 0x28(tp). */ |
98 #define TARGET_THREAD_SSP_OFFSET (TARGET_64BIT ? 0x28 : 0x14) | 98 #define TARGET_THREAD_SSP_OFFSET (TARGET_64BIT ? 0x28 : 0x14) |
99 #endif | 99 #endif |
100 | 100 |
101 /* Define if long doubles should be mangled as 'g'. */ | 101 /* Define if long doubles should be mangled as 'g'. */ |
102 #define TARGET_ALTERNATE_LONG_DOUBLE_MANGLING | 102 #define TARGET_ALTERNATE_LONG_DOUBLE_MANGLING |
103 | 103 |
104 #undef TARGET_LIBC_HAS_FUNCTION | |
105 #define TARGET_LIBC_HAS_FUNCTION gnu_libc_has_function | |
106 | |
107 /* Uninitialized common symbols in non-PIE executables, even with | |
108 strong definitions in dependent shared libraries, will resolve | |
109 to COPY relocated symbol in the executable. See PR65780. */ | |
110 #undef TARGET_BINDS_LOCAL_P | |
111 #define TARGET_BINDS_LOCAL_P default_binds_local_p_2 | |
112 | |
104 #endif | 113 #endif |