Mercurial > hg > CbC > CbC_gcc
annotate gcc/config/rs6000/linux.h @ 131:84e7813d76e9
gcc-8.2
author | mir3636 |
---|---|
date | Thu, 25 Oct 2018 07:37:49 +0900 |
parents | 04ced10e8804 |
children | 1830386684a0 |
rev | line source |
---|---|
0 | 1 /* Definitions of target machine for GNU compiler, |
2 for PowerPC machines running Linux. | |
131 | 3 Copyright (C) 1996-2018 Free Software Foundation, Inc. |
0 | 4 Contributed by Michael Meissner (meissner@cygnus.com). |
5 | |
6 This file is part of GCC. | |
7 | |
8 GCC is free software; you can redistribute it and/or modify it | |
9 under the terms of the GNU General Public License as published | |
10 by the Free Software Foundation; either version 3, or (at your | |
11 option) any later version. | |
12 | |
13 GCC is distributed in the hope that it will be useful, but WITHOUT | |
14 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY | |
15 or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public | |
16 License for more details. | |
17 | |
18 You should have received a copy of the GNU General Public License | |
19 along with GCC; see the file COPYING3. If not see | |
20 <http://www.gnu.org/licenses/>. */ | |
21 | |
22 /* Linux doesn't support saving and restoring 64-bit regs in a 32-bit | |
23 process. */ | |
24 #define OS_MISSING_POWERPC64 1 | |
25 | |
26 /* We use glibc _mcount for profiling. */ | |
27 #define NO_PROFILE_COUNTERS 1 | |
28 | |
67
f6334be47118
update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
29 #ifdef SINGLE_LIBC |
f6334be47118
update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
30 #define OPTION_GLIBC (DEFAULT_LIBC == LIBC_GLIBC) |
111 | 31 #define OPTION_UCLIBC (DEFAULT_LIBC == LIBC_UCLIBC) |
32 #define OPTION_BIONIC (DEFAULT_LIBC == LIBC_BIONIC) | |
33 #undef OPTION_MUSL | |
34 #define OPTION_MUSL (DEFAULT_LIBC == LIBC_MUSL) | |
67
f6334be47118
update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
35 #else |
f6334be47118
update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
36 #define OPTION_GLIBC (linux_libc == LIBC_GLIBC) |
111 | 37 #define OPTION_UCLIBC (linux_libc == LIBC_UCLIBC) |
38 #define OPTION_BIONIC (linux_libc == LIBC_BIONIC) | |
39 #undef OPTION_MUSL | |
40 #define OPTION_MUSL (linux_libc == LIBC_MUSL) | |
67
f6334be47118
update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
41 #endif |
f6334be47118
update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
42 |
111 | 43 /* Determine what functions are present at the runtime; |
44 this includes full c99 runtime and sincos. */ | |
45 #undef TARGET_LIBC_HAS_FUNCTION | |
46 #define TARGET_LIBC_HAS_FUNCTION linux_libc_has_function | |
0 | 47 |
48 #undef TARGET_OS_CPP_BUILTINS | |
49 #define TARGET_OS_CPP_BUILTINS() \ | |
50 do \ | |
51 { \ | |
52 builtin_define_std ("PPC"); \ | |
53 builtin_define_std ("powerpc"); \ | |
54 builtin_assert ("cpu=powerpc"); \ | |
55 builtin_assert ("machine=powerpc"); \ | |
56 TARGET_OS_SYSV_CPP_BUILTINS (); \ | |
57 } \ | |
58 while (0) | |
59 | |
60 #undef CPP_OS_DEFAULT_SPEC | |
61 #define CPP_OS_DEFAULT_SPEC "%(cpp_os_linux)" | |
62 | |
63 #undef LINK_SHLIB_SPEC | |
111 | 64 #define LINK_SHLIB_SPEC "%{shared:-shared} %{!shared: %{static:-static}} \ |
65 %{static-pie:-static -pie --no-dynamic-linker -z text}" | |
0 | 66 |
67 #undef LIB_DEFAULT_SPEC | |
68 #define LIB_DEFAULT_SPEC "%(lib_linux)" | |
69 | |
70 #undef STARTFILE_DEFAULT_SPEC | |
71 #define STARTFILE_DEFAULT_SPEC "%(startfile_linux)" | |
72 | |
73 #undef ENDFILE_DEFAULT_SPEC | |
74 #define ENDFILE_DEFAULT_SPEC "%(endfile_linux)" | |
75 | |
76 #undef LINK_START_DEFAULT_SPEC | |
77 #define LINK_START_DEFAULT_SPEC "%(link_start_linux)" | |
78 | |
79 #undef LINK_OS_DEFAULT_SPEC | |
80 #define LINK_OS_DEFAULT_SPEC "%(link_os_linux)" | |
81 | |
111 | 82 #undef DEFAULT_ASM_ENDIAN |
83 #if (TARGET_DEFAULT & MASK_LITTLE_ENDIAN) | |
84 #define DEFAULT_ASM_ENDIAN " -mlittle" | |
85 #define LINK_OS_LINUX_EMUL ENDIAN_SELECT(" -m elf32ppclinux", \ | |
86 " -m elf32lppclinux", \ | |
87 " -m elf32lppclinux") | |
88 #else | |
89 #define DEFAULT_ASM_ENDIAN " -mbig" | |
90 #define LINK_OS_LINUX_EMUL ENDIAN_SELECT(" -m elf32ppclinux", \ | |
91 " -m elf32lppclinux", \ | |
92 " -m elf32ppclinux") | |
0 | 93 #endif |
94 | |
111 | 95 #undef LINK_OS_LINUX_SPEC |
96 #define LINK_OS_LINUX_SPEC LINK_OS_LINUX_EMUL " %{!shared: %{!static: \ | |
97 %{!static-pie: \ | |
98 %{rdynamic:-export-dynamic} \ | |
99 -dynamic-linker " GNU_USER_DYNAMIC_LINKER "}}}" | |
0 | 100 |
101 /* For backward compatibility, we must continue to use the AIX | |
102 structure return convention. */ | |
103 #undef DRAFT_V4_STRUCT_RET | |
104 #define DRAFT_V4_STRUCT_RET 1 | |
105 | |
106 /* We are 32-bit all the time, so optimize a little. */ | |
107 #undef TARGET_64BIT | |
108 #define TARGET_64BIT 0 | |
109 | |
110 /* We don't need to generate entries in .fixup, except when | |
111 -mrelocatable or -mrelocatable-lib is given. */ | |
112 #undef RELOCATABLE_NEEDS_FIXUP | |
113 #define RELOCATABLE_NEEDS_FIXUP \ | |
111 | 114 (rs6000_isa_flags & rs6000_isa_flags_explicit & OPTION_MASK_RELOCATABLE) |
0 | 115 |
116 #ifdef TARGET_LIBC_PROVIDES_SSP | |
117 /* ppc32 glibc provides __stack_chk_guard in -0x7008(2). */ | |
118 #define TARGET_THREAD_SSP_OFFSET -0x7008 | |
119 #endif | |
120 | |
121 #define POWERPC_LINUX | |
122 | |
123 /* ppc linux has 128-bit long double support in glibc 2.4 and later. */ | |
124 #ifdef TARGET_DEFAULT_LONG_DOUBLE_128 | |
125 #define RS6000_DEFAULT_LONG_DOUBLE_SIZE 128 | |
126 #endif | |
67
f6334be47118
update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
127 |
f6334be47118
update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
128 /* Static stack checking is supported by means of probes. */ |
f6334be47118
update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
129 #define STACK_CHECK_STATIC_BUILTIN 1 |
111 | 130 |
131 /* Software floating point support for exceptions and rounding modes | |
132 depends on the C library in use. */ | |
133 #undef TARGET_FLOAT_EXCEPTIONS_ROUNDING_SUPPORTED_P | |
134 #define TARGET_FLOAT_EXCEPTIONS_ROUNDING_SUPPORTED_P \ | |
135 rs6000_linux_float_exceptions_rounding_supported_p | |
136 | |
137 /* Support for TARGET_ATOMIC_ASSIGN_EXPAND_FENV without FPRs depends | |
138 on glibc 2.19 or greater. */ | |
139 #if TARGET_GLIBC_MAJOR > 2 \ | |
140 || (TARGET_GLIBC_MAJOR == 2 && TARGET_GLIBC_MINOR >= 19) | |
141 #define RS6000_GLIBC_ATOMIC_FENV 1 | |
142 #endif |