annotate gcc/config/darwin.h @ 158:494b0b89df80 default tip

...
author Shinji KONO <kono@ie.u-ryukyu.ac.jp>
date Mon, 25 May 2020 18:13:55 +0900
parents 1830386684a0
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1 /* Target definitions for Darwin (Mac OS X) systems.
145
1830386684a0 gcc-9.2.0
anatofuz
parents: 131
diff changeset
2 Copyright (C) 1989-2020 Free Software Foundation, Inc.
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3 Contributed by Apple Computer Inc.
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
5 This file is part of GCC.
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
6
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
7 GCC is free software; you can redistribute it and/or modify
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
8 it under the terms of the GNU General Public License as published by
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
9 the Free Software Foundation; either version 3, or (at your option)
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
10 any later version.
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
11
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
12 GCC is distributed in the hope that it will be useful,
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
15 GNU General Public License for more details.
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
16
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
17 Under Section 7 of GPL version 3, you are granted additional
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
18 permissions described in the GCC Runtime Library Exception, version
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
19 3.1, as published by the Free Software Foundation.
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
20
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
21 You should have received a copy of the GNU General Public License and
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
22 a copy of the GCC Runtime Library Exception along with this program;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
23 see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
24 <http://www.gnu.org/licenses/>. */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
25
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
26 #ifndef CONFIG_DARWIN_H
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
27 #define CONFIG_DARWIN_H
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
28
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
29 /* The definitions in this file are common to all processor types
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
30 running Darwin, which is the kernel for Mac OS X. Darwin is
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
31 basically a BSD user layer laid over a Mach kernel, then evolved
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
32 for many years (at NeXT) in parallel with other Unix systems. So
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
33 while the runtime is a somewhat idiosyncratic Mach-based thing,
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
34 other definitions look like they would for a BSD variant. */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
35
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
36 /* Although NeXT ran on many different architectures, as of Jan 2001
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
37 the only supported Darwin targets are PowerPC and x86. */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
38
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
39 /* One of Darwin's NeXT legacies is the Mach-O format, which is partly
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
40 like a.out and partly like COFF, with additional features like
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
41 multi-architecture binary support. */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
42
67
f6334be47118 update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 63
diff changeset
43 #define DARWIN_X86 0
f6334be47118 update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 63
diff changeset
44 #define DARWIN_PPC 0
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
45
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
46 /* Suppress g++ attempt to link in the math library automatically. */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
47 #define MATH_LIBRARY ""
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
48
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
49 /* We have atexit. */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
50
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
51 #define HAVE_ATEXIT
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
52
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
53 /* Define an empty body for the function do_global_dtors() in libgcc2.c. */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
54
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
55 #define DO_GLOBAL_DTORS_BODY
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
56
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
57 /* The string value for __SIZE_TYPE__. */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
58
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
59 #ifndef SIZE_TYPE
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
60 #define SIZE_TYPE "long unsigned int"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
61 #endif
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
62
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
63 /* Type used for ptrdiff_t, as a string used in a declaration. */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
64
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
65 #undef PTRDIFF_TYPE
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
66 #define PTRDIFF_TYPE "int"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
67
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
68 /* wchar_t is int. */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
69
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
70 #undef WCHAR_TYPE
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
71 #define WCHAR_TYPE "int"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
72 #undef WCHAR_TYPE_SIZE
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
73 #define WCHAR_TYPE_SIZE 32
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
74
55
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
75 #define INT8_TYPE "signed char"
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
76 #define INT16_TYPE "short int"
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
77 #define INT32_TYPE "int"
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
78 #define INT64_TYPE "long long int"
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
79 #define UINT8_TYPE "unsigned char"
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
80 #define UINT16_TYPE "short unsigned int"
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
81 #define UINT32_TYPE "unsigned int"
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
82 #define UINT64_TYPE "long long unsigned int"
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
83
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
84 #define INT_LEAST8_TYPE "signed char"
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
85 #define INT_LEAST16_TYPE "short int"
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
86 #define INT_LEAST32_TYPE "int"
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
87 #define INT_LEAST64_TYPE "long long int"
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
88 #define UINT_LEAST8_TYPE "unsigned char"
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
89 #define UINT_LEAST16_TYPE "short unsigned int"
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
90 #define UINT_LEAST32_TYPE "unsigned int"
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
91 #define UINT_LEAST64_TYPE "long long unsigned int"
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
92
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
93 #define INT_FAST8_TYPE "signed char"
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
94 #define INT_FAST16_TYPE "short int"
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
95 #define INT_FAST32_TYPE "int"
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
96 #define INT_FAST64_TYPE "long long int"
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
97 #define UINT_FAST8_TYPE "unsigned char"
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
98 #define UINT_FAST16_TYPE "short unsigned int"
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
99 #define UINT_FAST32_TYPE "unsigned int"
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
100 #define UINT_FAST64_TYPE "long long unsigned int"
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
101
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
102 #define INTPTR_TYPE "long int"
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
103 #define UINTPTR_TYPE "long unsigned int"
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
104
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
105 #define SIG_ATOMIC_TYPE "int"
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
106
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
107 /* Default to using the NeXT-style runtime, since that's what is
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
108 pre-installed on Darwin systems. */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
109
111
kono
parents: 67
diff changeset
110 #define NEXT_OBJC_RUNTIME 1
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
111
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
112 /* Don't default to pcc-struct-return, because gcc is the only compiler, and
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
113 we want to retain compatibility with older gcc versions. */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
114
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
115 #undef DEFAULT_PCC_STRUCT_RETURN
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
116 #define DEFAULT_PCC_STRUCT_RETURN 0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
117
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
118 /* True if pragma ms_struct is in effect. */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
119 extern GTY(()) int darwin_ms_struct;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
120
145
1830386684a0 gcc-9.2.0
anatofuz
parents: 131
diff changeset
121 /* The majority of Darwin's special driver opts are direct access to ld flags
1830386684a0 gcc-9.2.0
anatofuz
parents: 131
diff changeset
122 (to save the user typing -Wl,xxxxx or Xlinker xxxxx) but we can't process
1830386684a0 gcc-9.2.0
anatofuz
parents: 131
diff changeset
123 them here, since doing so will make it appear that there are linker infiles
1830386684a0 gcc-9.2.0
anatofuz
parents: 131
diff changeset
124 and the linker will invoked even when it is not necessary.
1830386684a0 gcc-9.2.0
anatofuz
parents: 131
diff changeset
125
1830386684a0 gcc-9.2.0
anatofuz
parents: 131
diff changeset
126 However, a few can be handled and we can elide options that are silently-
1830386684a0 gcc-9.2.0
anatofuz
parents: 131
diff changeset
127 ignored defaults, plus warn on obsolete ones that no longer function. */
1830386684a0 gcc-9.2.0
anatofuz
parents: 131
diff changeset
128 #undef SUBTARGET_DRIVER_SELF_SPECS
1830386684a0 gcc-9.2.0
anatofuz
parents: 131
diff changeset
129 #define SUBTARGET_DRIVER_SELF_SPECS \
1830386684a0 gcc-9.2.0
anatofuz
parents: 131
diff changeset
130 "%{fapple-kext|mkernel:-static}", \
1830386684a0 gcc-9.2.0
anatofuz
parents: 131
diff changeset
131 "%{gfull:-g -fno-eliminate-unused-debug-symbols} %<gfull", \
1830386684a0 gcc-9.2.0
anatofuz
parents: 131
diff changeset
132 "%{gsplit-dwarf:%ngsplit-dwarf is not supported on this platform} \
1830386684a0 gcc-9.2.0
anatofuz
parents: 131
diff changeset
133 %<gsplit-dwarf", \
1830386684a0 gcc-9.2.0
anatofuz
parents: 131
diff changeset
134 "%{gused:-g -feliminate-unused-debug-symbols} %<gused", \
1830386684a0 gcc-9.2.0
anatofuz
parents: 131
diff changeset
135 "%{shared:-Zdynamiclib} %<shared", \
1830386684a0 gcc-9.2.0
anatofuz
parents: 131
diff changeset
136 "%{static:%{Zdynamic:%e conflicting code gen style switches are used}}",\
1830386684a0 gcc-9.2.0
anatofuz
parents: 131
diff changeset
137 "%{y*:%nthe y option is obsolete and ignored} %<y*", \
1830386684a0 gcc-9.2.0
anatofuz
parents: 131
diff changeset
138 "%<Mach %<X"
1830386684a0 gcc-9.2.0
anatofuz
parents: 131
diff changeset
139
1830386684a0 gcc-9.2.0
anatofuz
parents: 131
diff changeset
140 #if LD64_HAS_EXPORT_DYNAMIC
1830386684a0 gcc-9.2.0
anatofuz
parents: 131
diff changeset
141 #define DARWIN_RDYNAMIC "%{rdynamic:-export_dynamic}"
1830386684a0 gcc-9.2.0
anatofuz
parents: 131
diff changeset
142 #else
1830386684a0 gcc-9.2.0
anatofuz
parents: 131
diff changeset
143 #define DARWIN_RDYNAMIC "%{rdynamic:%nrdynamic is not supported}"
1830386684a0 gcc-9.2.0
anatofuz
parents: 131
diff changeset
144 #endif
1830386684a0 gcc-9.2.0
anatofuz
parents: 131
diff changeset
145
1830386684a0 gcc-9.2.0
anatofuz
parents: 131
diff changeset
146 /* FIXME: we should check that the linker supports the -pie and -no_pie.
1830386684a0 gcc-9.2.0
anatofuz
parents: 131
diff changeset
147 options. */
1830386684a0 gcc-9.2.0
anatofuz
parents: 131
diff changeset
148 #define DARWIN_PIE_SPEC \
1830386684a0 gcc-9.2.0
anatofuz
parents: 131
diff changeset
149 "%{pie|fpie|fPIE:\
1830386684a0 gcc-9.2.0
anatofuz
parents: 131
diff changeset
150 %{mdynamic-no-pic: \
1830386684a0 gcc-9.2.0
anatofuz
parents: 131
diff changeset
151 %n'-mdynamic-no-pic' overrides '-pie', '-fpie' or '-fPIE'; \
1830386684a0 gcc-9.2.0
anatofuz
parents: 131
diff changeset
152 :%:version-compare(>= 10.5 mmacosx-version-min= -pie) }} "
1830386684a0 gcc-9.2.0
anatofuz
parents: 131
diff changeset
153
1830386684a0 gcc-9.2.0
anatofuz
parents: 131
diff changeset
154 #define DARWIN_NOPIE_SPEC \
1830386684a0 gcc-9.2.0
anatofuz
parents: 131
diff changeset
155 "%{no-pie|fno-pie|fno-PIE: \
1830386684a0 gcc-9.2.0
anatofuz
parents: 131
diff changeset
156 %:version-compare(>= 10.7 mmacosx-version-min= -no_pie) }"
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
157
67
f6334be47118 update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 63
diff changeset
158 #define DARWIN_CC1_SPEC \
f6334be47118 update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 63
diff changeset
159 "%{findirect-virtual-calls: -fapple-kext} %<findirect-virtual-calls " \
f6334be47118 update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 63
diff changeset
160 "%{fterminated-vtables: -fapple-kext} %<fterminated-vtables " \
f6334be47118 update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 63
diff changeset
161 "%<filelist* %<framework*"
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
162
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
163 #define SUBSUBTARGET_OVERRIDE_OPTIONS \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
164 do { \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
165 darwin_override_options (); \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
166 } while (0)
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
167
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
168 #define SUBTARGET_C_COMMON_OVERRIDE_OPTIONS do { \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
169 if (flag_mkernel || flag_apple_kext) \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
170 { \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
171 if (flag_use_cxa_atexit == 2) \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
172 flag_use_cxa_atexit = 0; \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
173 /* kexts should always be built without the coalesced sections \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
174 because the kernel loader doesn't grok such sections. */ \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
175 flag_weak = 0; \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
176 /* No RTTI in kexts. */ \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
177 flag_rtti = 0; \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
178 } \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
179 } while (0)
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
180
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
181 /* Machine dependent cpp options. Don't add more options here, add
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
182 them to darwin_cpp_builtins in darwin-c.c. */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
183
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
184 #undef CPP_SPEC
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
185 #define CPP_SPEC "%{static:%{!dynamic:-D__STATIC__}}%{!static:-D__DYNAMIC__}" \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
186 " %{pthread:-D_REENTRANT}"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
187
145
1830386684a0 gcc-9.2.0
anatofuz
parents: 131
diff changeset
188 /* This is a fix for PR41260 by passing -no_compact_unwind on darwin10 and
1830386684a0 gcc-9.2.0
anatofuz
parents: 131
diff changeset
189 later until the assembler, linker and libunwind are able to deal with the
1830386684a0 gcc-9.2.0
anatofuz
parents: 131
diff changeset
190 output from GCC.
1830386684a0 gcc-9.2.0
anatofuz
parents: 131
diff changeset
191
1830386684a0 gcc-9.2.0
anatofuz
parents: 131
diff changeset
192 FIXME: we should check that the linker supports the option.
1830386684a0 gcc-9.2.0
anatofuz
parents: 131
diff changeset
193 */
1830386684a0 gcc-9.2.0
anatofuz
parents: 131
diff changeset
194
1830386684a0 gcc-9.2.0
anatofuz
parents: 131
diff changeset
195 #define DARWIN_NOCOMPACT_UNWIND \
1830386684a0 gcc-9.2.0
anatofuz
parents: 131
diff changeset
196 " %:version-compare(>= 10.6 mmacosx-version-min= -no_compact_unwind) "
1830386684a0 gcc-9.2.0
anatofuz
parents: 131
diff changeset
197
1830386684a0 gcc-9.2.0
anatofuz
parents: 131
diff changeset
198 /* In Darwin linker specs we can put -lcrt0.o and ld will search the library
1830386684a0 gcc-9.2.0
anatofuz
parents: 131
diff changeset
199 path for crt0.o or -lcrtx.a and it will search for for libcrtx.a. As for
1830386684a0 gcc-9.2.0
anatofuz
parents: 131
diff changeset
200 other ports, we can also put xxx.{o,a}%s and get the appropriate complete
1830386684a0 gcc-9.2.0
anatofuz
parents: 131
diff changeset
201 startfile absolute directory. This latter point is important when we want
1830386684a0 gcc-9.2.0
anatofuz
parents: 131
diff changeset
202 to override ld's rule of .dylib being found ahead of .a and the user wants
1830386684a0 gcc-9.2.0
anatofuz
parents: 131
diff changeset
203 the convenience library to be linked. */
1830386684a0 gcc-9.2.0
anatofuz
parents: 131
diff changeset
204
1830386684a0 gcc-9.2.0
anatofuz
parents: 131
diff changeset
205 /* The LINK_COMMAND spec is mostly a clone of the standard LINK_COMMAND_SPEC,
1830386684a0 gcc-9.2.0
anatofuz
parents: 131
diff changeset
206 plus precomp, libtool, and fat build additions.
67
f6334be47118 update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 63
diff changeset
207
f6334be47118 update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 63
diff changeset
208 In general, random Darwin linker flags should go into LINK_SPEC
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
209 instead of LINK_COMMAND_SPEC. The command spec is better for
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
210 specifying the handling of options understood by generic Unix
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
211 linkers, and for positional arguments like libraries. */
67
f6334be47118 update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 63
diff changeset
212
f6334be47118 update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 63
diff changeset
213 #define LINK_COMMAND_SPEC_A \
f6334be47118 update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 63
diff changeset
214 "%{!fdump=*:%{!fsyntax-only:%{!c:%{!M:%{!MM:%{!E:%{!S:\
111
kono
parents: 67
diff changeset
215 %(linker)" \
kono
parents: 67
diff changeset
216 LINK_PLUGIN_SPEC \
kono
parents: 67
diff changeset
217 "%{flto*:%<fcompare-debug*} \
131
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
218 %{flto} %{fno-lto} %{flto=*} \
111
kono
parents: 67
diff changeset
219 %l " LINK_COMPRESS_DEBUG_SPEC \
kono
parents: 67
diff changeset
220 "%X %{s} %{t} %{Z} %{u*} \
67
f6334be47118 update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 63
diff changeset
221 %{e*} %{r} \
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
222 %{o*}%{!o:-o a.out} \
131
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
223 %{!nostdlib:%{!r:%{!nostartfiles:%S}}} \
63
b7f97abdc517 update gcc from gcc-4.5.0 to gcc-4.6
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 55
diff changeset
224 %{L*} %(link_libgcc) %o %{fprofile-arcs|fprofile-generate*|coverage:-lgcov} \
111
kono
parents: 67
diff changeset
225 %{fopenacc|fopenmp|%:gt(%{ftree-parallelize-loops=*:%*} 1): \
55
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
226 %{static|static-libgcc|static-libstdc++|static-libgfortran: libgomp.a%s; : -lgomp } } \
111
kono
parents: 67
diff changeset
227 %{fgnu-tm: \
kono
parents: 67
diff changeset
228 %{static|static-libgcc|static-libstdc++|static-libgfortran: libitm.a%s; : -litm } } \
131
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
229 %{!nostdlib:%{!r:%{!nodefaultlibs:\
111
kono
parents: 67
diff changeset
230 %{%:sanitize(address): -lasan } \
kono
parents: 67
diff changeset
231 %{%:sanitize(undefined): -lubsan } \
kono
parents: 67
diff changeset
232 %(link_ssp) \
kono
parents: 67
diff changeset
233 %(link_gcc_c_sequence) \
131
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
234 }}}\
145
1830386684a0 gcc-9.2.0
anatofuz
parents: 131
diff changeset
235 %{!nostdlib:%{!r:%{!nostartfiles:%E}}} %{T*} %{F*} "\
1830386684a0 gcc-9.2.0
anatofuz
parents: 131
diff changeset
236 DARWIN_PIE_SPEC \
1830386684a0 gcc-9.2.0
anatofuz
parents: 131
diff changeset
237 DARWIN_NOPIE_SPEC \
1830386684a0 gcc-9.2.0
anatofuz
parents: 131
diff changeset
238 DARWIN_RDYNAMIC \
1830386684a0 gcc-9.2.0
anatofuz
parents: 131
diff changeset
239 DARWIN_NOCOMPACT_UNWIND \
1830386684a0 gcc-9.2.0
anatofuz
parents: 131
diff changeset
240 "}}}}}}} %<pie %<no-pie %<rdynamic "
67
f6334be47118 update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 63
diff changeset
241
f6334be47118 update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 63
diff changeset
242 #define DSYMUTIL "\ndsymutil"
f6334be47118 update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 63
diff changeset
243
f6334be47118 update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 63
diff changeset
244 #define DSYMUTIL_SPEC \
f6334be47118 update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 63
diff changeset
245 "%{!fdump=*:%{!fsyntax-only:%{!c:%{!M:%{!MM:%{!E:%{!S:\
f6334be47118 update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 63
diff changeset
246 %{v} \
111
kono
parents: 67
diff changeset
247 %{gdwarf-2:%{!gstabs*:%{%:debug-level-gt(0): -idsym}}}\
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
248 %{.c|.cc|.C|.cpp|.cp|.c++|.cxx|.CPP|.m|.mm: \
111
kono
parents: 67
diff changeset
249 %{gdwarf-2:%{!gstabs*:%{%:debug-level-gt(0): -dsym}}}}}}}}}}}"
67
f6334be47118 update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 63
diff changeset
250
f6334be47118 update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 63
diff changeset
251 #define LINK_COMMAND_SPEC LINK_COMMAND_SPEC_A DSYMUTIL_SPEC
f6334be47118 update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 63
diff changeset
252
f6334be47118 update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 63
diff changeset
253 /* Tell collect2 to run dsymutil for us as necessary. */
f6334be47118 update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 63
diff changeset
254 #define COLLECT_RUN_DSYMUTIL 1
f6334be47118 update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 63
diff changeset
255
f6334be47118 update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 63
diff changeset
256 /* We only want one instance of %G, since libSystem (Darwin's -lc) does not depend
f6334be47118 update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 63
diff changeset
257 on libgcc. */
f6334be47118 update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 63
diff changeset
258 #undef LINK_GCC_C_SEQUENCE_SPEC
131
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
259 #define LINK_GCC_C_SEQUENCE_SPEC "%G %{!nolibc:%L}"
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
260
111
kono
parents: 67
diff changeset
261 /* ld64 supports a sysroot, it just has a different name and there's no easy
kono
parents: 67
diff changeset
262 way to check for it at config time. */
kono
parents: 67
diff changeset
263 #undef HAVE_LD_SYSROOT
kono
parents: 67
diff changeset
264 #define HAVE_LD_SYSROOT 1
kono
parents: 67
diff changeset
265 /* It seems the only (working) way to get a space after %R is to append a
kono
parents: 67
diff changeset
266 dangling '/'. */
kono
parents: 67
diff changeset
267 #define SYSROOT_SPEC "%{!isysroot*:-syslibroot %R/ }"
kono
parents: 67
diff changeset
268
kono
parents: 67
diff changeset
269 /* Do the same as clang, for now, and insert the sysroot for ld when an
kono
parents: 67
diff changeset
270 isysroot is specified. */
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
271 #define LINK_SYSROOT_SPEC "%{isysroot*:-syslibroot %*}"
111
kono
parents: 67
diff changeset
272
kono
parents: 67
diff changeset
273 /* Suppress the addition of extra prefix paths when a sysroot is in use. */
kono
parents: 67
diff changeset
274 #define STANDARD_STARTFILE_PREFIX_1 ""
kono
parents: 67
diff changeset
275 #define STANDARD_STARTFILE_PREFIX_2 ""
kono
parents: 67
diff changeset
276
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
277 /* Please keep the random linker options in alphabetical order (modulo
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
278 'Z' and 'no' prefixes). Note that options taking arguments may appear
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
279 multiple times on a command line with different arguments each time,
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
280 so put a * after their names so all of them get passed. */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
281 #define LINK_SPEC \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
282 "%{static}%{!static:-dynamic} \
67
f6334be47118 update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 63
diff changeset
283 %:remove-outfile(-ldl) \
f6334be47118 update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 63
diff changeset
284 %:remove-outfile(-lm) \
f6334be47118 update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 63
diff changeset
285 %:remove-outfile(-lpthread) \
55
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
286 %{fgnu-runtime: %{static|static-libgcc: \
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
287 %:replace-outfile(-lobjc libobjc-gnu.a%s); \
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
288 :%:replace-outfile(-lobjc -lobjc-gnu ) } }\
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
289 %{static|static-libgcc|static-libgfortran:%:replace-outfile(-lgfortran libgfortran.a%s)}\
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
290 %{static|static-libgcc|static-libstdc++|static-libgfortran:%:replace-outfile(-lgomp libgomp.a%s)}\
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
291 %{static|static-libgcc|static-libstdc++:%:replace-outfile(-lstdc++ libstdc++.a%s)}\
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
292 %{!Zdynamiclib: \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
293 %{Zforce_cpusubtype_ALL:-arch %(darwin_arch) -force_cpusubtype_ALL} \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
294 %{!Zforce_cpusubtype_ALL:-arch %(darwin_subarch)} \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
295 %{Zbundle:-bundle} \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
296 %{Zbundle_loader*:-bundle_loader %*} \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
297 %{client_name*} \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
298 %{compatibility_version*:%e-compatibility_version only allowed with -dynamiclib\
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
299 } \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
300 %{current_version*:%e-current_version only allowed with -dynamiclib} \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
301 %{Zforce_flat_namespace:-force_flat_namespace} \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
302 %{Zinstall_name*:%e-install_name only allowed with -dynamiclib} \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
303 %{keep_private_externs} \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
304 %{private_bundle} \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
305 } \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
306 %{Zdynamiclib: -dylib \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
307 %{Zbundle:%e-bundle not allowed with -dynamiclib} \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
308 %{Zbundle_loader*:%e-bundle_loader not allowed with -dynamiclib} \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
309 %{client_name*:%e-client_name not allowed with -dynamiclib} \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
310 %{compatibility_version*:-dylib_compatibility_version %*} \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
311 %{current_version*:-dylib_current_version %*} \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
312 %{Zforce_cpusubtype_ALL:-arch %(darwin_arch)} \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
313 %{!Zforce_cpusubtype_ALL: -arch %(darwin_subarch)} \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
314 %{Zforce_flat_namespace:%e-force_flat_namespace not allowed with -dynamiclib} \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
315 %{Zinstall_name*:-dylib_install_name %*} \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
316 %{keep_private_externs:%e-keep_private_externs not allowed with -dynamiclib} \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
317 %{private_bundle:%e-private_bundle not allowed with -dynamiclib} \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
318 } \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
319 %{Zall_load:-all_load} \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
320 %{Zallowable_client*:-allowable_client %*} \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
321 %{Zbind_at_load:-bind_at_load} \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
322 %{Zarch_errors_fatal:-arch_errors_fatal} \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
323 %{Zdead_strip:-dead_strip} \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
324 %{Zno_dead_strip_inits_and_terms:-no_dead_strip_inits_and_terms} \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
325 %{Zdylib_file*:-dylib_file %*} \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
326 %{Zdynamic:-dynamic}\
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
327 %{Zexported_symbols_list*:-exported_symbols_list %*} \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
328 %{Zflat_namespace:-flat_namespace} \
67
f6334be47118 update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 63
diff changeset
329 %{headerpad_max_install_names} \
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
330 %{Zimage_base*:-image_base %*} \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
331 %{Zinit*:-init %*} \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
332 %{mmacosx-version-min=*:-macosx_version_min %*} \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
333 %{nomultidefs} \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
334 %{Zmulti_module:-multi_module} %{Zsingle_module:-single_module} \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
335 %{Zmultiply_defined*:-multiply_defined %*} \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
336 %{!Zmultiply_defined*:%{shared-libgcc: \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
337 %:version-compare(< 10.5 mmacosx-version-min= -multiply_defined) \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
338 %:version-compare(< 10.5 mmacosx-version-min= suppress)}} \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
339 %{Zmultiplydefinedunused*:-multiply_defined_unused %*} \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
340 %{prebind} %{noprebind} %{nofixprebinding} %{prebind_all_twolevel_modules} \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
341 %{read_only_relocs} \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
342 %{sectcreate*} %{sectorder*} %{seg1addr*} %{segprot*} \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
343 %{Zsegaddr*:-segaddr %*} \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
344 %{Zsegs_read_only_addr*:-segs_read_only_addr %*} \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
345 %{Zsegs_read_write_addr*:-segs_read_write_addr %*} \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
346 %{Zseg_addr_table*: -seg_addr_table %*} \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
347 %{Zfn_seg_addr_table_filename*:-seg_addr_table_filename %*} \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
348 %{sub_library*} %{sub_umbrella*} \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
349 " LINK_SYSROOT_SPEC " \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
350 %{twolevel_namespace} %{twolevel_namespace_hints} \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
351 %{Zumbrella*: -umbrella %*} \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
352 %{undefined*} \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
353 %{Zunexported_symbols_list*:-unexported_symbols_list %*} \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
354 %{Zweak_reference_mismatches*:-weak_reference_mismatches %*} \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
355 %{!Zweak_reference_mismatches*:-weak_reference_mismatches non-weak} \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
356 %{w} \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
357 %{pagezero_size*} %{segs_read_*} %{seglinkedit} %{noseglinkedit} \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
358 %{sectalign*} %{sectobjectsymbols*} %{segcreate*} %{whyload} \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
359 %{whatsloaded} %{dylinker_install_name*} \
145
1830386684a0 gcc-9.2.0
anatofuz
parents: 131
diff changeset
360 %{dylinker} "
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
361
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
362
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
363 /* Machine dependent libraries. */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
364
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
365 #define LIB_SPEC "%{!static:-lSystem}"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
366
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
367 /* Support -mmacosx-version-min by supplying different (stub) libgcc_s.dylib
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
368 libraries to link against, and by not linking against libgcc_s on
145
1830386684a0 gcc-9.2.0
anatofuz
parents: 131
diff changeset
369 earlier-than-10.3.9. If we need exceptions, prior to 10.3.9, then we have
1830386684a0 gcc-9.2.0
anatofuz
parents: 131
diff changeset
370 to link the static eh lib, since there's no shared version on the system.
1830386684a0 gcc-9.2.0
anatofuz
parents: 131
diff changeset
371
1830386684a0 gcc-9.2.0
anatofuz
parents: 131
diff changeset
372 Note that by default, except as above, -lgcc_eh is not linked against.
1830386684a0 gcc-9.2.0
anatofuz
parents: 131
diff changeset
373 This is because,in general, we need to unwind through system libraries that
1830386684a0 gcc-9.2.0
anatofuz
parents: 131
diff changeset
374 are linked with the shared unwinder in libunwind (or libgcc_s for 10.4/5).
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
375
145
1830386684a0 gcc-9.2.0
anatofuz
parents: 131
diff changeset
376 The static version of the current libgcc unwinder (which differs from the
1830386684a0 gcc-9.2.0
anatofuz
parents: 131
diff changeset
377 implementation in libunwind.dylib on systems Darwin10 [10.6]+) can be used
1830386684a0 gcc-9.2.0
anatofuz
parents: 131
diff changeset
378 by specifying -static-libgcc.
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
379
145
1830386684a0 gcc-9.2.0
anatofuz
parents: 131
diff changeset
380 If libgcc_eh is linked against, it has to be before -lgcc, because it might
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
381 need symbols from -lgcc. */
145
1830386684a0 gcc-9.2.0
anatofuz
parents: 131
diff changeset
382
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
383 #undef REAL_LIBGCC_SPEC
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
384 #define REAL_LIBGCC_SPEC \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
385 "%{static-libgcc|static: -lgcc_eh -lgcc; \
145
1830386684a0 gcc-9.2.0
anatofuz
parents: 131
diff changeset
386 shared-libgcc|fexceptions|fobjc-exceptions|fgnu-runtime: \
1830386684a0 gcc-9.2.0
anatofuz
parents: 131
diff changeset
387 %:version-compare(!> 10.3.9 mmacosx-version-min= -lgcc_eh) \
1830386684a0 gcc-9.2.0
anatofuz
parents: 131
diff changeset
388 %:version-compare(>< 10.3.9 10.5 mmacosx-version-min= -lgcc_s.10.4) \
67
f6334be47118 update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 63
diff changeset
389 %:version-compare(>< 10.5 10.6 mmacosx-version-min= -lgcc_s.10.5) \
145
1830386684a0 gcc-9.2.0
anatofuz
parents: 131
diff changeset
390 %:version-compare(>< 10.3.9 10.5 mmacosx-version-min= -lgcc_ext.10.4) \
55
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
391 %:version-compare(>= 10.5 mmacosx-version-min= -lgcc_ext.10.5) \
67
f6334be47118 update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 63
diff changeset
392 -lgcc ; \
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
393 :%:version-compare(>< 10.3.9 10.5 mmacosx-version-min= -lgcc_s.10.4) \
67
f6334be47118 update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 63
diff changeset
394 %:version-compare(>< 10.5 10.6 mmacosx-version-min= -lgcc_s.10.5) \
145
1830386684a0 gcc-9.2.0
anatofuz
parents: 131
diff changeset
395 %:version-compare(>< 10.3.9 10.5 mmacosx-version-min= -lgcc_ext.10.4) \
55
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
396 %:version-compare(>= 10.5 mmacosx-version-min= -lgcc_ext.10.5) \
67
f6334be47118 update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 63
diff changeset
397 -lgcc }"
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
398
145
1830386684a0 gcc-9.2.0
anatofuz
parents: 131
diff changeset
399 /* We specify crt0.o as -lcrt0.o so that ld will search the library path. */
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
400
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
401 #undef STARTFILE_SPEC
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
402 #define STARTFILE_SPEC \
145
1830386684a0 gcc-9.2.0
anatofuz
parents: 131
diff changeset
403 "%{Zdynamiclib: %(darwin_dylib1) %{fgnu-tm: -lcrttms.o}} \
1830386684a0 gcc-9.2.0
anatofuz
parents: 131
diff changeset
404 %{!Zdynamiclib:%{Zbundle:%(darwin_bundle1)} \
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
405 %{!Zbundle:%{pg:%{static:-lgcrt0.o} \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
406 %{!static:%{object:-lgcrt0.o} \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
407 %{!object:%{preload:-lgcrt0.o} \
111
kono
parents: 67
diff changeset
408 %{!preload:-lgcrt1.o \
kono
parents: 67
diff changeset
409 %:version-compare(>= 10.8 mmacosx-version-min= -no_new_main) \
kono
parents: 67
diff changeset
410 %(darwin_crt2)}}}} \
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
411 %{!pg:%{static:-lcrt0.o} \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
412 %{!static:%{object:-lcrt0.o} \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
413 %{!object:%{preload:-lcrt0.o} \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
414 %{!preload: %(darwin_crt1) \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
415 %(darwin_crt2)}}}}}} \
145
1830386684a0 gcc-9.2.0
anatofuz
parents: 131
diff changeset
416 %(darwin_crt3)"
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
417
111
kono
parents: 67
diff changeset
418 /* We want a destructor last in the list. */
kono
parents: 67
diff changeset
419 #define TM_DESTRUCTOR "%{fgnu-tm: -lcrttme.o}"
kono
parents: 67
diff changeset
420 #define ENDFILE_SPEC TM_DESTRUCTOR
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
421
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
422 #define DARWIN_EXTRA_SPECS \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
423 { "darwin_crt1", DARWIN_CRT1_SPEC }, \
145
1830386684a0 gcc-9.2.0
anatofuz
parents: 131
diff changeset
424 { "darwin_crt2", DARWIN_CRT2_SPEC }, \
1830386684a0 gcc-9.2.0
anatofuz
parents: 131
diff changeset
425 { "darwin_crt3", DARWIN_CRT3_SPEC }, \
1830386684a0 gcc-9.2.0
anatofuz
parents: 131
diff changeset
426 { "darwin_dylib1", DARWIN_DYLIB1_SPEC }, \
1830386684a0 gcc-9.2.0
anatofuz
parents: 131
diff changeset
427 { "darwin_bundle1", DARWIN_BUNDLE1_SPEC },
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
428
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
429 #define DARWIN_CRT1_SPEC \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
430 "%:version-compare(!> 10.5 mmacosx-version-min= -lcrt1.o) \
111
kono
parents: 67
diff changeset
431 %:version-compare(>< 10.5 10.6 mmacosx-version-min= -lcrt1.10.5.o) \
kono
parents: 67
diff changeset
432 %:version-compare(>< 10.6 10.8 mmacosx-version-min= -lcrt1.10.6.o) \
kono
parents: 67
diff changeset
433 %{fgnu-tm: -lcrttms.o}"
kono
parents: 67
diff changeset
434
145
1830386684a0 gcc-9.2.0
anatofuz
parents: 131
diff changeset
435 #define DARWIN_CRT2_SPEC ""
1830386684a0 gcc-9.2.0
anatofuz
parents: 131
diff changeset
436
1830386684a0 gcc-9.2.0
anatofuz
parents: 131
diff changeset
437 /* crt3.o provides __cxa_atexit on systems that don't have it (and a fix
1830386684a0 gcc-9.2.0
anatofuz
parents: 131
diff changeset
438 up for faulty versions on 10.4). Since it's only used with C++, which
1830386684a0 gcc-9.2.0
anatofuz
parents: 131
diff changeset
439 requires passing -shared-libgcc, key off that to avoid unnecessarily
1830386684a0 gcc-9.2.0
anatofuz
parents: 131
diff changeset
440 adding a destructor to every program built for 10.4 or earlier. */
1830386684a0 gcc-9.2.0
anatofuz
parents: 131
diff changeset
441
1830386684a0 gcc-9.2.0
anatofuz
parents: 131
diff changeset
442 #define DARWIN_CRT3_SPEC \
1830386684a0 gcc-9.2.0
anatofuz
parents: 131
diff changeset
443 "%{shared-libgcc:%:version-compare(< 10.5 mmacosx-version-min= crt3.o%s)}"
1830386684a0 gcc-9.2.0
anatofuz
parents: 131
diff changeset
444
1830386684a0 gcc-9.2.0
anatofuz
parents: 131
diff changeset
445 #define DARWIN_DYLIB1_SPEC \
1830386684a0 gcc-9.2.0
anatofuz
parents: 131
diff changeset
446 "%:version-compare(!> 10.5 mmacosx-version-min= -ldylib1.o) \
1830386684a0 gcc-9.2.0
anatofuz
parents: 131
diff changeset
447 %:version-compare(>< 10.5 10.6 mmacosx-version-min= -ldylib1.10.5.o)"
1830386684a0 gcc-9.2.0
anatofuz
parents: 131
diff changeset
448
1830386684a0 gcc-9.2.0
anatofuz
parents: 131
diff changeset
449 #define DARWIN_BUNDLE1_SPEC \
1830386684a0 gcc-9.2.0
anatofuz
parents: 131
diff changeset
450 "%{!static:%:version-compare(< 10.6 mmacosx-version-min= -lbundle1.o) \
1830386684a0 gcc-9.2.0
anatofuz
parents: 131
diff changeset
451 %{fgnu-tm: -lcrttms.o}}"
1830386684a0 gcc-9.2.0
anatofuz
parents: 131
diff changeset
452
111
kono
parents: 67
diff changeset
453 #ifdef HAVE_AS_MMACOSX_VERSION_MIN_OPTION
kono
parents: 67
diff changeset
454 /* Emit macosx version (but only major). */
kono
parents: 67
diff changeset
455 #define ASM_MMACOSX_VERSION_MIN_SPEC \
kono
parents: 67
diff changeset
456 " %{asm_macosx_version_min=*: -mmacosx-version-min=%*} %<asm_macosx_version_min=*"
kono
parents: 67
diff changeset
457 #else
kono
parents: 67
diff changeset
458 #define ASM_MMACOSX_VERSION_MIN_SPEC " %<asm_macosx_version_min=*"
kono
parents: 67
diff changeset
459 #endif
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
460
111
kono
parents: 67
diff changeset
461 /* When we detect that we're cctools or llvm as, we need to insert the right
kono
parents: 67
diff changeset
462 additional options. */
kono
parents: 67
diff changeset
463 #if HAVE_GNU_AS
kono
parents: 67
diff changeset
464 #define ASM_OPTIONS ""
kono
parents: 67
diff changeset
465 #else
kono
parents: 67
diff changeset
466 #define ASM_OPTIONS "%{v} %{w:-W} %{I*}"
kono
parents: 67
diff changeset
467 #endif
kono
parents: 67
diff changeset
468
kono
parents: 67
diff changeset
469 /* Default Darwin ASM_SPEC, very simple. */
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
470 #define ASM_SPEC "-arch %(darwin_arch) \
111
kono
parents: 67
diff changeset
471 " ASM_OPTIONS " \
67
f6334be47118 update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 63
diff changeset
472 %{Zforce_cpusubtype_ALL:-force_cpusubtype_ALL} \
111
kono
parents: 67
diff changeset
473 %{static}" ASM_MMACOSX_VERSION_MIN_SPEC
kono
parents: 67
diff changeset
474
kono
parents: 67
diff changeset
475 /* Default ASM_DEBUG_SPEC. Darwin's as cannot currently produce dwarf
kono
parents: 67
diff changeset
476 debugging data. */
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
477
111
kono
parents: 67
diff changeset
478 #define ASM_DEBUG_SPEC "%{g*:%{%:debug-level-gt(0):%{!gdwarf*:--gstabs}}}"
131
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
479 #define ASM_FINAL_SPEC \
145
1830386684a0 gcc-9.2.0
anatofuz
parents: 131
diff changeset
480 "%{gsplit-dwarf:%ngsplit-dwarf is not supported on this platform} %<gsplit-dwarf"
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
481
111
kono
parents: 67
diff changeset
482 /* We still allow output of STABS if the assembler supports it. */
kono
parents: 67
diff changeset
483 #ifdef HAVE_AS_STABS_DIRECTIVE
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
484 #define DBX_DEBUGGING_INFO 1
111
kono
parents: 67
diff changeset
485 #define PREFERRED_DEBUGGING_TYPE DBX_DEBUG
kono
parents: 67
diff changeset
486 #endif
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
487
55
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
488 #define DWARF2_DEBUGGING_INFO 1
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
489
131
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
490 #define DEBUG_FRAME_SECTION "__DWARF,__debug_frame,regular,debug"
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
491 #define DEBUG_INFO_SECTION "__DWARF,__debug_info,regular,debug"
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
492 #define DEBUG_ABBREV_SECTION "__DWARF,__debug_abbrev,regular,debug"
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
493 #define DEBUG_ARANGES_SECTION "__DWARF,__debug_aranges,regular,debug"
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
494 #define DEBUG_MACINFO_SECTION "__DWARF,__debug_macinfo,regular,debug"
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
495 #define DEBUG_LINE_SECTION "__DWARF,__debug_line,regular,debug"
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
496 #define DEBUG_LOC_SECTION "__DWARF,__debug_loc,regular,debug"
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
497 #define DEBUG_LOCLISTS_SECTION "__DWARF,__debug_loclists,regular,debug"
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
498
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
499 #define DEBUG_STR_SECTION "__DWARF,__debug_str,regular,debug"
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
500 #define DEBUG_STR_OFFSETS_SECTION "__DWARF,__debug_str_offs,regular,debug"
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
501 #define DEBUG_RANGES_SECTION "__DWARF,__debug_ranges,regular,debug"
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
502 #define DEBUG_RNGLISTS_SECTION "__DWARF,__debug_rnglists,regular,debug"
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
503 #define DEBUG_MACRO_SECTION "__DWARF,__debug_macro,regular,debug"
111
kono
parents: 67
diff changeset
504
kono
parents: 67
diff changeset
505 #define DEBUG_LTO_INFO_SECTION "__GNU_DWARF_LTO,__debug_info,regular,debug"
kono
parents: 67
diff changeset
506 #define DEBUG_LTO_ABBREV_SECTION "__GNU_DWARF_LTO,__debug_abbrev,regular,debug"
kono
parents: 67
diff changeset
507 #define DEBUG_LTO_MACINFO_SECTION "__GNU_DWARF_LTO,__debug_macinfo,regular,debug"
kono
parents: 67
diff changeset
508 #define DEBUG_LTO_LINE_SECTION "__GNU_DWARF_LTO,__debug_line,regular,debug"
kono
parents: 67
diff changeset
509 #define DEBUG_LTO_STR_SECTION "__GNU_DWARF_LTO,__debug_str,regular,debug"
kono
parents: 67
diff changeset
510 #define DEBUG_LTO_MACRO_SECTION "__GNU_DWARF_LTO,__debug_macro,regular,debug"
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
511
67
f6334be47118 update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 63
diff changeset
512 #define TARGET_WANT_DEBUG_PUB_SECTIONS true
131
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
513 #define DEBUG_PUBNAMES_SECTION ((debug_generate_pub_sections == 2) \
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
514 ? "__DWARF,__debug_gnu_pubn,regular,debug" \
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
515 : "__DWARF,__debug_pubnames,regular,debug")
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
516
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
517 #define DEBUG_PUBTYPES_SECTION ((debug_generate_pub_sections == 2) \
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
518 ? "__DWARF,__debug_gnu_pubt,regular,debug" \
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
519 : "__DWARF,__debug_pubtypes,regular,debug")
67
f6334be47118 update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 63
diff changeset
520
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
521 /* When generating stabs debugging, use N_BINCL entries. */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
522
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
523 #define DBX_USE_BINCL
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
524
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
525 /* There is no limit to the length of stabs strings. */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
526
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
527 #define DBX_CONTIN_LENGTH 0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
528
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
529 /* gdb needs a null N_SO at the end of each file for scattered loading. */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
530
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
531 #define DBX_OUTPUT_NULL_N_SO_AT_MAIN_SOURCE_FILE_END
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
532
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
533 /* GCC's definition of 'one_only' is the same as its definition of 'weak'. */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
534 #define MAKE_DECL_ONE_ONLY(DECL) (DECL_WEAK (DECL) = 1)
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
535
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
536 /* Mach-O supports 'weak imports', and 'weak definitions' in coalesced
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
537 sections. machopic_select_section ensures that weak variables go in
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
538 coalesced sections. Weak aliases (or any other kind of aliases) are
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
539 not supported. Weak symbols that aren't visible outside the .s file
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
540 are not supported. */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
541 #define ASM_WEAKEN_DECL(FILE, DECL, NAME, ALIAS) \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
542 do { \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
543 if (ALIAS) \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
544 { \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
545 warning (0, "alias definitions not supported in Mach-O; ignored"); \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
546 break; \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
547 } \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
548 \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
549 if (! DECL_EXTERNAL (DECL) && TREE_PUBLIC (DECL)) \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
550 targetm.asm_out.globalize_label (FILE, NAME); \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
551 if (DECL_EXTERNAL (DECL)) \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
552 fputs ("\t.weak_reference ", FILE); \
63
b7f97abdc517 update gcc from gcc-4.5.0 to gcc-4.6
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 55
diff changeset
553 else if (lookup_attribute ("weak_import", DECL_ATTRIBUTES (DECL))) \
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
554 break; \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
555 else if (TREE_PUBLIC (DECL)) \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
556 fputs ("\t.weak_definition ", FILE); \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
557 else \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
558 break; \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
559 assemble_name (FILE, NAME); \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
560 fputc ('\n', FILE); \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
561 } while (0)
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
562
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
563 /* Darwin has the pthread routines in libSystem, which every program
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
564 links to, so there's no need for weak-ness for that. */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
565 #define GTHREAD_USE_WEAK 0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
566
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
567 /* On Darwin, we don't (at the time of writing) have linkonce sections
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
568 with names, so it's safe to make the class data not comdat. */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
569 #define TARGET_CXX_CLASS_DATA_ALWAYS_COMDAT hook_bool_void_false
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
570
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
571 /* For efficiency, on Darwin the RTTI information that is always
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
572 emitted in the standard C++ library should not be COMDAT. */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
573 #define TARGET_CXX_LIBRARY_RTTI_COMDAT hook_bool_void_false
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
574
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
575 /* We make exception information linkonce. */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
576 #undef TARGET_USES_WEAK_UNWIND_INFO
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
577 #define TARGET_USES_WEAK_UNWIND_INFO 1
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
578
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
579 /* We need to use a nonlocal label for the start of an EH frame: the
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
580 Darwin linker requires that a coalesced section start with a label.
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
581 Unfortunately, it also requires that 'debug' sections don't contain
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
582 labels. */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
583 #undef FRAME_BEGIN_LABEL
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
584 #define FRAME_BEGIN_LABEL (for_eh ? "EH_frame" : "Lframe")
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
585
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
586 /* Emit a label for the FDE corresponding to DECL. EMPTY means
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
587 emit a label for an empty FDE. */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
588 #define TARGET_ASM_EMIT_UNWIND_LABEL darwin_emit_unwind_label
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
589
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
590 /* Emit a label to separate the exception table. */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
591 #define TARGET_ASM_EMIT_EXCEPT_TABLE_LABEL darwin_emit_except_table_label
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
592
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
593 /* Our profiling scheme doesn't LP labels and counter words. */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
594
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
595 #define NO_PROFILE_COUNTERS 1
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
596
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
597 #undef INIT_SECTION_ASM_OP
111
kono
parents: 67
diff changeset
598 #define INIT_SECTION_ASM_OP ""
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
599
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
600 #undef INVOKE__main
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
601
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
602 #define TARGET_ASM_CONSTRUCTOR machopic_asm_out_constructor
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
603 #define TARGET_ASM_DESTRUCTOR machopic_asm_out_destructor
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
604
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
605 /* Always prefix with an underscore. */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
606
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
607 #define USER_LABEL_PREFIX "_"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
608
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
609 /* A dummy symbol that will be replaced with the function base name. */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
610 #define MACHOPIC_FUNCTION_BASE_NAME "<pic base>"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
611
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
612 /* Don't output a .file directive. That is only used by the assembler for
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
613 error reporting. */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
614 #undef TARGET_ASM_FILE_START_FILE_DIRECTIVE
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
615 #define TARGET_ASM_FILE_START_FILE_DIRECTIVE false
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
616
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
617 #undef TARGET_ASM_FILE_END
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
618 #define TARGET_ASM_FILE_END darwin_file_end
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
619
63
b7f97abdc517 update gcc from gcc-4.5.0 to gcc-4.6
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 55
diff changeset
620 /* Because Mach-O relocations have a counter from 1 to 255 for the
b7f97abdc517 update gcc from gcc-4.5.0 to gcc-4.6
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 55
diff changeset
621 section number they apply to, it is necessary to output all
b7f97abdc517 update gcc from gcc-4.5.0 to gcc-4.6
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 55
diff changeset
622 normal sections before the LTO sections, to make sure that the
b7f97abdc517 update gcc from gcc-4.5.0 to gcc-4.6
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 55
diff changeset
623 sections that may have relocations always have a section number
b7f97abdc517 update gcc from gcc-4.5.0 to gcc-4.6
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 55
diff changeset
624 smaller than 255. */
b7f97abdc517 update gcc from gcc-4.5.0 to gcc-4.6
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 55
diff changeset
625 #undef TARGET_ASM_LTO_START
b7f97abdc517 update gcc from gcc-4.5.0 to gcc-4.6
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 55
diff changeset
626 #define TARGET_ASM_LTO_START darwin_asm_lto_start
b7f97abdc517 update gcc from gcc-4.5.0 to gcc-4.6
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 55
diff changeset
627 #undef TARGET_ASM_LTO_END
b7f97abdc517 update gcc from gcc-4.5.0 to gcc-4.6
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 55
diff changeset
628 #define TARGET_ASM_LTO_END darwin_asm_lto_end
b7f97abdc517 update gcc from gcc-4.5.0 to gcc-4.6
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 55
diff changeset
629
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
630 #define ASM_OUTPUT_SKIP(FILE,SIZE) \
111
kono
parents: 67
diff changeset
631 fprintf (FILE, "\t.space " HOST_WIDE_INT_PRINT_UNSIGNED"\n", SIZE)
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
632
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
633 /* Give ObjC methods pretty symbol names. */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
634
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
635 #undef OBJC_GEN_METHOD_LABEL
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
636 #define OBJC_GEN_METHOD_LABEL(BUF,IS_INST,CLASS_NAME,CAT_NAME,SEL_NAME,NUM) \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
637 do { if (CAT_NAME) \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
638 sprintf (BUF, "%c[%s(%s) %s]", (IS_INST) ? '-' : '+', \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
639 (CLASS_NAME), (CAT_NAME), (SEL_NAME)); \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
640 else \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
641 sprintf (BUF, "%c[%s %s]", (IS_INST) ? '-' : '+', \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
642 (CLASS_NAME), (SEL_NAME)); \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
643 } while (0)
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
644
67
f6334be47118 update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 63
diff changeset
645 #undef ASM_DECLARE_OBJECT_NAME
f6334be47118 update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 63
diff changeset
646 #define ASM_DECLARE_OBJECT_NAME(FILE, NAME, DECL) \
f6334be47118 update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 63
diff changeset
647 darwin_asm_declare_object_name ((FILE), (NAME), (DECL))
f6334be47118 update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 63
diff changeset
648
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
649 /* The RTTI data (e.g., __ti4name) is common and public (and static),
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
650 but it does need to be referenced via indirect PIC data pointers.
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
651 The machopic_define_symbol calls are telling the machopic subsystem
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
652 that the name *is* defined in this module, so it doesn't need to
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
653 make them indirect. */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
654
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
655 #define ASM_DECLARE_FUNCTION_NAME(FILE, NAME, DECL) \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
656 do { \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
657 const char *xname = NAME; \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
658 if (GET_CODE (XEXP (DECL_RTL (DECL), 0)) != SYMBOL_REF) \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
659 xname = IDENTIFIER_POINTER (DECL_NAME (DECL)); \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
660 if (! DECL_WEAK (DECL) \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
661 && ((TREE_STATIC (DECL) \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
662 && (!DECL_COMMON (DECL) || !TREE_PUBLIC (DECL))) \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
663 || DECL_INITIAL (DECL))) \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
664 machopic_define_symbol (DECL_RTL (DECL)); \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
665 if ((TREE_STATIC (DECL) \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
666 && (!DECL_COMMON (DECL) || !TREE_PUBLIC (DECL))) \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
667 || DECL_INITIAL (DECL)) \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
668 (* targetm.encode_section_info) (DECL, DECL_RTL (DECL), false); \
67
f6334be47118 update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 63
diff changeset
669 ASM_OUTPUT_FUNCTION_LABEL (FILE, xname, DECL); \
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
670 } while (0)
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
671
67
f6334be47118 update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 63
diff changeset
672 #undef TARGET_ASM_DECLARE_CONSTANT_NAME
f6334be47118 update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 63
diff changeset
673 #define TARGET_ASM_DECLARE_CONSTANT_NAME darwin_asm_declare_constant_name
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
674
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
675 /* Wrap new method names in quotes so the assembler doesn't gag.
55
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
676 Make Objective-C internal symbols local and in doing this, we need
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
677 to accommodate the name mangling done by c++ on file scope locals. */
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
678
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
679 int darwin_label_is_anonymous_local_objc_name (const char *name);
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
680
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
681 #undef ASM_OUTPUT_LABELREF
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
682 #define ASM_OUTPUT_LABELREF(FILE,NAME) \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
683 do { \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
684 const char *xname = (NAME); \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
685 if (! strcmp (xname, MACHOPIC_FUNCTION_BASE_NAME)) \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
686 machopic_output_function_base_name(FILE); \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
687 else if (xname[0] == '&' || xname[0] == '*') \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
688 { \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
689 int len = strlen (xname); \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
690 if (len > 6 && !strcmp ("$stub", xname + len - 5)) \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
691 machopic_validate_stub_or_non_lazy_ptr (xname); \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
692 else if (len > 7 && !strcmp ("$stub\"", xname + len - 6)) \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
693 machopic_validate_stub_or_non_lazy_ptr (xname); \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
694 else if (len > 14 && !strcmp ("$non_lazy_ptr", xname + len - 13)) \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
695 machopic_validate_stub_or_non_lazy_ptr (xname); \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
696 else if (len > 15 && !strcmp ("$non_lazy_ptr\"", xname + len - 14)) \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
697 machopic_validate_stub_or_non_lazy_ptr (xname); \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
698 if (xname[1] != '"' && name_needs_quotes (&xname[1])) \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
699 fprintf (FILE, "\"%s\"", &xname[1]); \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
700 else \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
701 fputs (&xname[1], FILE); \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
702 } \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
703 else if (xname[0] == '+' || xname[0] == '-') \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
704 fprintf (FILE, "\"%s\"", xname); \
67
f6334be47118 update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 63
diff changeset
705 else if (darwin_label_is_anonymous_local_objc_name (xname)) \
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
706 fprintf (FILE, "L%s", xname); \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
707 else if (xname[0] != '"' && name_needs_quotes (xname)) \
111
kono
parents: 67
diff changeset
708 asm_fprintf (FILE, "\"%U%s\"", xname); \
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
709 else \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
710 asm_fprintf (FILE, "%U%s", xname); \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
711 } while (0)
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
712
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
713 /* Output before executable code. */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
714 #undef TEXT_SECTION_ASM_OP
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
715 #define TEXT_SECTION_ASM_OP "\t.text"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
716
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
717 /* Output before writable data. */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
718
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
719 #undef DATA_SECTION_ASM_OP
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
720 #define DATA_SECTION_ASM_OP "\t.data"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
721
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
722 #undef ALIGN_ASM_OP
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
723 #define ALIGN_ASM_OP ".align"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
724
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
725 #undef ASM_OUTPUT_ALIGN
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
726 #define ASM_OUTPUT_ALIGN(FILE,LOG) \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
727 if ((LOG) != 0) \
67
f6334be47118 update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 63
diff changeset
728 fprintf (FILE, "\t%s\t%d\n", ALIGN_ASM_OP, (LOG))
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
729
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
730 /* The maximum alignment which the object file format can support in
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
731 bits. For Mach-O, this is 2^15 bytes. */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
732
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
733 #undef MAX_OFILE_ALIGNMENT
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
734 #define MAX_OFILE_ALIGNMENT (0x8000 * 8)
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
735
67
f6334be47118 update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 63
diff changeset
736 #define L2_MAX_OFILE_ALIGNMENT 15
f6334be47118 update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 63
diff changeset
737
f6334be47118 update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 63
diff changeset
738 /* These are the three variants that emit referenced blank space. */
f6334be47118 update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 63
diff changeset
739 #define ASM_OUTPUT_ALIGNED_BSS(FILE, DECL, NAME, SIZE, ALIGN) \
f6334be47118 update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 63
diff changeset
740 darwin_output_aligned_bss ((FILE), (DECL), (NAME), (SIZE), (ALIGN))
f6334be47118 update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 63
diff changeset
741
f6334be47118 update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 63
diff changeset
742 #undef ASM_OUTPUT_ALIGNED_DECL_LOCAL
f6334be47118 update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 63
diff changeset
743 #define ASM_OUTPUT_ALIGNED_DECL_LOCAL(FILE, DECL, NAME, SIZE, ALIGN) \
f6334be47118 update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 63
diff changeset
744 darwin_asm_output_aligned_decl_local \
f6334be47118 update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 63
diff changeset
745 ((FILE), (DECL), (NAME), (SIZE), (ALIGN))
f6334be47118 update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 63
diff changeset
746
f6334be47118 update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 63
diff changeset
747 #undef ASM_OUTPUT_ALIGNED_DECL_COMMON
f6334be47118 update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 63
diff changeset
748 #define ASM_OUTPUT_ALIGNED_DECL_COMMON(FILE, DECL, NAME, SIZE, ALIGN) \
f6334be47118 update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 63
diff changeset
749 darwin_asm_output_aligned_decl_common \
f6334be47118 update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 63
diff changeset
750 ((FILE), (DECL), (NAME), (SIZE), (ALIGN))
f6334be47118 update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 63
diff changeset
751
f6334be47118 update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 63
diff changeset
752 /* The generic version, archs should over-ride where required. */
f6334be47118 update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 63
diff changeset
753 #define MACHOPIC_NL_SYMBOL_PTR_SECTION ".non_lazy_symbol_pointer"
f6334be47118 update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 63
diff changeset
754
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
755 /* Declare the section variables. */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
756 #ifndef USED_FOR_TARGET
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
757 enum darwin_section_enum {
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
758 #define DEF_SECTION(NAME, FLAGS, DIRECTIVE, OBJC) NAME,
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
759 #include "darwin-sections.def"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
760 #undef DEF_SECTION
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
761 NUM_DARWIN_SECTIONS
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
762 };
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
763 extern GTY(()) section * darwin_sections[NUM_DARWIN_SECTIONS];
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
764 #endif
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
765
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
766 #undef TARGET_ASM_SELECT_SECTION
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
767 #define TARGET_ASM_SELECT_SECTION machopic_select_section
67
f6334be47118 update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 63
diff changeset
768
f6334be47118 update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 63
diff changeset
769 #undef TARGET_ASM_FUNCTION_SECTION
f6334be47118 update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 63
diff changeset
770 #define TARGET_ASM_FUNCTION_SECTION darwin_function_section
f6334be47118 update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 63
diff changeset
771
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
772 #undef TARGET_ASM_SELECT_RTX_SECTION
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
773 #define TARGET_ASM_SELECT_RTX_SECTION machopic_select_rtx_section
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
774 #undef TARGET_ASM_UNIQUE_SECTION
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
775 #define TARGET_ASM_UNIQUE_SECTION darwin_unique_section
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
776 #undef TARGET_ASM_FUNCTION_RODATA_SECTION
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
777 #define TARGET_ASM_FUNCTION_RODATA_SECTION default_no_function_rodata_section
111
kono
parents: 67
diff changeset
778
kono
parents: 67
diff changeset
779 #undef TARGET_ASM_TM_CLONE_TABLE_SECTION
kono
parents: 67
diff changeset
780 #define TARGET_ASM_TM_CLONE_TABLE_SECTION darwin_tm_clone_table_section
kono
parents: 67
diff changeset
781
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
782 #undef TARGET_ASM_RELOC_RW_MASK
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
783 #define TARGET_ASM_RELOC_RW_MASK machopic_reloc_rw_mask
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
784
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
785 /* Globalizing directive for a label. */
67
f6334be47118 update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 63
diff changeset
786 #define GLOBAL_ASM_OP "\t.globl "
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
787 #define TARGET_ASM_GLOBALIZE_LABEL darwin_globalize_label
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
788
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
789 /* Emit an assembler directive to set visibility for a symbol. Used
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
790 to support visibility attribute and Darwin's private extern
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
791 feature. */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
792 #undef TARGET_ASM_ASSEMBLE_VISIBILITY
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
793 #define TARGET_ASM_ASSEMBLE_VISIBILITY darwin_assemble_visibility
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
794
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
795 /* Extra attributes for Darwin. */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
796 #define SUBTARGET_ATTRIBUTE_TABLE \
131
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
797 /* { name, min_len, max_len, decl_req, type_req, fn_type_req, \
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
798 affects_type_identity, handler, exclude } */ \
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
799 { "apple_kext_compatibility", 0, 0, false, true, false, false, \
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
800 darwin_handle_kext_attribute, NULL }, \
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
801 { "weak_import", 0, 0, true, false, false, false, \
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
802 darwin_handle_weak_import_attribute, NULL }
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
803
111
kono
parents: 67
diff changeset
804 /* Make local constant labels linker-visible, so that if one follows a
kono
parents: 67
diff changeset
805 weak_global constant, ld64 will be able to separate the atoms. */
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
806 #undef ASM_GENERATE_INTERNAL_LABEL
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
807 #define ASM_GENERATE_INTERNAL_LABEL(LABEL,PREFIX,NUM) \
111
kono
parents: 67
diff changeset
808 do { \
kono
parents: 67
diff changeset
809 if (strcmp ("LC", PREFIX) == 0) \
kono
parents: 67
diff changeset
810 sprintf (LABEL, "*%s%ld", "lC", (long)(NUM)); \
kono
parents: 67
diff changeset
811 else \
kono
parents: 67
diff changeset
812 sprintf (LABEL, "*%s%ld", PREFIX, (long)(NUM)); \
kono
parents: 67
diff changeset
813 } while (0)
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
814
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
815 #undef TARGET_ASM_MARK_DECL_PRESERVED
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
816 #define TARGET_ASM_MARK_DECL_PRESERVED darwin_mark_decl_preserved
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
817
145
1830386684a0 gcc-9.2.0
anatofuz
parents: 131
diff changeset
818 /* Any port using this header needs to define the first available
1830386684a0 gcc-9.2.0
anatofuz
parents: 131
diff changeset
819 subtarget symbol bit: SYMBOL_FLAG_SUBT_DEP. */
1830386684a0 gcc-9.2.0
anatofuz
parents: 131
diff changeset
820
1830386684a0 gcc-9.2.0
anatofuz
parents: 131
diff changeset
821 /* Is a variable. */
1830386684a0 gcc-9.2.0
anatofuz
parents: 131
diff changeset
822 #define MACHO_SYMBOL_FLAG_VARIABLE (SYMBOL_FLAG_SUBT_DEP)
1830386684a0 gcc-9.2.0
anatofuz
parents: 131
diff changeset
823 #define MACHO_SYMBOL_VARIABLE_P(RTX) \
1830386684a0 gcc-9.2.0
anatofuz
parents: 131
diff changeset
824 ((SYMBOL_REF_FLAGS (RTX) & MACHO_SYMBOL_FLAG_VARIABLE) != 0)
1830386684a0 gcc-9.2.0
anatofuz
parents: 131
diff changeset
825
1830386684a0 gcc-9.2.0
anatofuz
parents: 131
diff changeset
826 /* Set on a symbol that must be indirected, even when there is a
1830386684a0 gcc-9.2.0
anatofuz
parents: 131
diff changeset
827 definition in the TU. The ABI mandates that common symbols are so
1830386684a0 gcc-9.2.0
anatofuz
parents: 131
diff changeset
828 indirected, as are weak. If 'fix-and-continue' is operational then
1830386684a0 gcc-9.2.0
anatofuz
parents: 131
diff changeset
829 data symbols might also be. */
1830386684a0 gcc-9.2.0
anatofuz
parents: 131
diff changeset
830
1830386684a0 gcc-9.2.0
anatofuz
parents: 131
diff changeset
831 #define MACHO_SYMBOL_FLAG_MUST_INDIRECT ((SYMBOL_FLAG_SUBT_DEP) << 1)
1830386684a0 gcc-9.2.0
anatofuz
parents: 131
diff changeset
832 #define MACHO_SYMBOL_MUST_INDIRECT_P(RTX) \
1830386684a0 gcc-9.2.0
anatofuz
parents: 131
diff changeset
833 ((SYMBOL_REF_FLAGS (RTX) & MACHO_SYMBOL_FLAG_MUST_INDIRECT) != 0)
1830386684a0 gcc-9.2.0
anatofuz
parents: 131
diff changeset
834
1830386684a0 gcc-9.2.0
anatofuz
parents: 131
diff changeset
835 /* Set on a symbol with SYMBOL_FLAG_FUNCTION or MACHO_SYMBOL_FLAG_VARIABLE
1830386684a0 gcc-9.2.0
anatofuz
parents: 131
diff changeset
836 to indicate that the function or variable is considered defined in this
1830386684a0 gcc-9.2.0
anatofuz
parents: 131
diff changeset
837 translation unit. */
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
838
145
1830386684a0 gcc-9.2.0
anatofuz
parents: 131
diff changeset
839 #define MACHO_SYMBOL_FLAG_DEFINED ((SYMBOL_FLAG_SUBT_DEP) << 2)
1830386684a0 gcc-9.2.0
anatofuz
parents: 131
diff changeset
840 #define MACHO_SYMBOL_DEFINED_P(RTX) \
1830386684a0 gcc-9.2.0
anatofuz
parents: 131
diff changeset
841 ((SYMBOL_REF_FLAGS (RTX) & MACHO_SYMBOL_FLAG_DEFINED) != 0)
1830386684a0 gcc-9.2.0
anatofuz
parents: 131
diff changeset
842
1830386684a0 gcc-9.2.0
anatofuz
parents: 131
diff changeset
843 /* Set on a symbol that has specified non-default visibility. */
1830386684a0 gcc-9.2.0
anatofuz
parents: 131
diff changeset
844
1830386684a0 gcc-9.2.0
anatofuz
parents: 131
diff changeset
845 #define MACHO_SYMBOL_FLAG_HIDDEN_VIS ((SYMBOL_FLAG_SUBT_DEP) << 3)
1830386684a0 gcc-9.2.0
anatofuz
parents: 131
diff changeset
846 #define MACHO_SYMBOL_HIDDEN_VIS_P(RTX) \
1830386684a0 gcc-9.2.0
anatofuz
parents: 131
diff changeset
847 ((SYMBOL_REF_FLAGS (RTX) & MACHO_SYMBOL_FLAG_HIDDEN_VIS) != 0)
1830386684a0 gcc-9.2.0
anatofuz
parents: 131
diff changeset
848
1830386684a0 gcc-9.2.0
anatofuz
parents: 131
diff changeset
849 /* Set on a symbol that should be made visible to the linker (overriding
1830386684a0 gcc-9.2.0
anatofuz
parents: 131
diff changeset
850 'L' symbol prefixes). */
1830386684a0 gcc-9.2.0
anatofuz
parents: 131
diff changeset
851
1830386684a0 gcc-9.2.0
anatofuz
parents: 131
diff changeset
852 #define MACHO_SYMBOL_FLAG_LINKER_VIS ((SYMBOL_FLAG_SUBT_DEP) << 4)
1830386684a0 gcc-9.2.0
anatofuz
parents: 131
diff changeset
853 #define MACHO_SYMBOL_LINKER_VIS_P(RTX) \
1830386684a0 gcc-9.2.0
anatofuz
parents: 131
diff changeset
854 ((SYMBOL_REF_FLAGS (RTX) & MACHO_SYMBOL_FLAG_LINKER_VIS) != 0)
1830386684a0 gcc-9.2.0
anatofuz
parents: 131
diff changeset
855
1830386684a0 gcc-9.2.0
anatofuz
parents: 131
diff changeset
856 /* Set on a symbol that is a pic stub or symbol indirection (i.e. the
1830386684a0 gcc-9.2.0
anatofuz
parents: 131
diff changeset
857 L_xxxxx${stub,non_lazy_ptr,lazy_ptr}. */
1830386684a0 gcc-9.2.0
anatofuz
parents: 131
diff changeset
858
1830386684a0 gcc-9.2.0
anatofuz
parents: 131
diff changeset
859 #define MACHO_SYMBOL_FLAG_INDIRECTION ((SYMBOL_FLAG_SUBT_DEP) << 5)
1830386684a0 gcc-9.2.0
anatofuz
parents: 131
diff changeset
860 #define MACHO_SYMBOL_INDIRECTION_P(RTX) \
1830386684a0 gcc-9.2.0
anatofuz
parents: 131
diff changeset
861 ((SYMBOL_REF_FLAGS (RTX) & MACHO_SYMBOL_FLAG_INDIRECTION) != 0)
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
862
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
863 /* Set on a symbol to indicate when fix-and-continue style code
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
864 generation is being used and the symbol refers to a static symbol
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
865 that should be rebound from new instances of a translation unit to
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
866 the original instance of the data. */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
867
145
1830386684a0 gcc-9.2.0
anatofuz
parents: 131
diff changeset
868 #define MACHO_SYMBOL_FLAG_STATIC ((SYMBOL_FLAG_SUBT_DEP) << 6)
1830386684a0 gcc-9.2.0
anatofuz
parents: 131
diff changeset
869 #define MACHO_SYMBOL_STATIC_P(RTX) \
1830386684a0 gcc-9.2.0
anatofuz
parents: 131
diff changeset
870 ((SYMBOL_REF_FLAGS (RTX) & MACHO_SYMBOL_FLAG_STATIC) != 0)
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
871
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
872 /* Symbolic names for various things we might know about a symbol. */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
873
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
874 enum machopic_addr_class {
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
875 MACHOPIC_UNDEFINED,
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
876 MACHOPIC_DEFINED_DATA,
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
877 MACHOPIC_UNDEFINED_DATA,
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
878 MACHOPIC_DEFINED_FUNCTION,
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
879 MACHOPIC_UNDEFINED_FUNCTION
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
880 };
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
881
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
882 /* Macros defining the various PIC cases. */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
883
67
f6334be47118 update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 63
diff changeset
884 #undef MACHO_DYNAMIC_NO_PIC_P
f6334be47118 update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 63
diff changeset
885 #define MACHO_DYNAMIC_NO_PIC_P (TARGET_MACHO_DYNAMIC_NO_PIC)
f6334be47118 update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 63
diff changeset
886 #undef MACHOPIC_INDIRECT
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
887 #define MACHOPIC_INDIRECT (flag_pic || MACHO_DYNAMIC_NO_PIC_P)
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
888 #define MACHOPIC_JUST_INDIRECT (MACHO_DYNAMIC_NO_PIC_P)
67
f6334be47118 update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 63
diff changeset
889 #undef MACHOPIC_PURE
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
890 #define MACHOPIC_PURE (flag_pic && ! MACHO_DYNAMIC_NO_PIC_P)
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
891
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
892 #undef TARGET_ENCODE_SECTION_INFO
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
893 #define TARGET_ENCODE_SECTION_INFO darwin_encode_section_info
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
894 #undef TARGET_STRIP_NAME_ENCODING
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
895 #define TARGET_STRIP_NAME_ENCODING default_strip_name_encoding
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
896
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
897 #define GEN_BINDER_NAME_FOR_STUB(BUF,STUB,STUB_LENGTH) \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
898 do { \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
899 const char *const stub_ = (STUB); \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
900 char *buffer_ = (BUF); \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
901 strcpy (buffer_, stub_); \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
902 if (stub_[0] == '"') \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
903 { \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
904 strcpy (buffer_ + (STUB_LENGTH) - 1, "_binder\""); \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
905 } \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
906 else \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
907 { \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
908 strcpy (buffer_ + (STUB_LENGTH), "_binder"); \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
909 } \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
910 } while (0)
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
911
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
912 #define GEN_SYMBOL_NAME_FOR_SYMBOL(BUF,SYMBOL,SYMBOL_LENGTH) \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
913 do { \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
914 const char *const symbol_ = (SYMBOL); \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
915 char *buffer_ = (BUF); \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
916 if (name_needs_quotes (symbol_) && symbol_[0] != '"') \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
917 { \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
918 sprintf (buffer_, "\"%s\"", symbol_); \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
919 } \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
920 else \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
921 { \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
922 strcpy (buffer_, symbol_); \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
923 } \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
924 } while (0)
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
925
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
926 /* Given a symbol name string, create the lazy pointer version
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
927 of the symbol name. */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
928
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
929 #define GEN_LAZY_PTR_NAME_FOR_SYMBOL(BUF,SYMBOL,SYMBOL_LENGTH) \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
930 do { \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
931 const char *symbol_ = (SYMBOL); \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
932 char *buffer_ = (BUF); \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
933 if (symbol_[0] == '"') \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
934 { \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
935 strcpy (buffer_, "\"L"); \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
936 strcpy (buffer_ + 2, symbol_ + 1); \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
937 strcpy (buffer_ + (SYMBOL_LENGTH), "$lazy_ptr\""); \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
938 } \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
939 else if (name_needs_quotes (symbol_)) \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
940 { \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
941 strcpy (buffer_, "\"L"); \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
942 strcpy (buffer_ + 2, symbol_); \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
943 strcpy (buffer_ + (SYMBOL_LENGTH) + 2, "$lazy_ptr\""); \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
944 } \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
945 else \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
946 { \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
947 strcpy (buffer_, "L"); \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
948 strcpy (buffer_ + 1, symbol_); \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
949 strcpy (buffer_ + (SYMBOL_LENGTH) + 1, "$lazy_ptr"); \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
950 } \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
951 } while (0)
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
952
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
953 #define EH_FRAME_SECTION_NAME "__TEXT"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
954 #define EH_FRAME_SECTION_ATTR ",coalesced,no_toc+strip_static_syms+live_support"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
955
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
956 #undef ASM_PREFERRED_EH_DATA_FORMAT
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
957 #define ASM_PREFERRED_EH_DATA_FORMAT(CODE,GLOBAL) \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
958 (((CODE) == 2 && (GLOBAL) == 1) \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
959 ? (DW_EH_PE_pcrel | DW_EH_PE_indirect | DW_EH_PE_sdata4) : \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
960 ((CODE) == 1 || (GLOBAL) == 0) ? DW_EH_PE_pcrel : DW_EH_PE_absptr)
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
961
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
962 #define ASM_OUTPUT_DWARF_DELTA(FILE,SIZE,LABEL1,LABEL2) \
111
kono
parents: 67
diff changeset
963 darwin_asm_output_dwarf_delta (FILE, SIZE, LABEL1, LABEL2, 0)
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
964
111
kono
parents: 67
diff changeset
965 #define ASM_OUTPUT_DWARF_OFFSET(FILE,SIZE,LABEL,OFFSET,BASE) \
kono
parents: 67
diff changeset
966 darwin_asm_output_dwarf_offset (FILE, SIZE, LABEL, OFFSET, BASE)
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
967
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
968 #define ASM_MAYBE_OUTPUT_ENCODED_ADDR_RTX(ASM_OUT_FILE, ENCODING, SIZE, ADDR, DONE) \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
969 if (ENCODING == ASM_PREFERRED_EH_DATA_FORMAT (2, 1)) { \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
970 darwin_non_lazy_pcrel (ASM_OUT_FILE, ADDR); \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
971 goto DONE; \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
972 }
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
973
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
974 /* Experimentally, putting jump tables in text is faster on SPEC.
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
975 Also this is needed for correctness for coalesced functions. */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
976
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
977 #ifndef JUMP_TABLES_IN_TEXT_SECTION
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
978 #define JUMP_TABLES_IN_TEXT_SECTION 1
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
979 #endif
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
980
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
981 #define TARGET_TERMINATE_DW2_EH_FRAME_INFO false
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
982
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
983 #define TARGET_ASM_INIT_SECTIONS darwin_init_sections
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
984 #undef TARGET_ASM_NAMED_SECTION
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
985 #define TARGET_ASM_NAMED_SECTION darwin_asm_named_section
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
986
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
987 #define DARWIN_REGISTER_TARGET_PRAGMAS() \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
988 do { \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
989 if (!flag_preprocess_only) \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
990 cpp_register_pragma (parse_in, NULL, "mark", \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
991 darwin_pragma_ignore, false); \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
992 c_register_pragma (0, "options", darwin_pragma_options); \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
993 c_register_pragma (0, "segment", darwin_pragma_ignore); \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
994 c_register_pragma (0, "unused", darwin_pragma_unused); \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
995 c_register_pragma (0, "ms_struct", darwin_pragma_ms_struct); \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
996 } while (0)
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
997
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
998 #undef ASM_APP_ON
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
999 #define ASM_APP_ON ""
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1000 #undef ASM_APP_OFF
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1001 #define ASM_APP_OFF ""
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1002
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1003 void darwin_register_frameworks (const char *, const char *, int);
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1004 void darwin_register_objc_includes (const char *, const char *, int);
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1005 #define TARGET_EXTRA_PRE_INCLUDES darwin_register_objc_includes
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1006 #define TARGET_EXTRA_INCLUDES darwin_register_frameworks
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1007
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1008 void add_framework_path (char *);
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1009 #define TARGET_OPTF add_framework_path
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1010
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1011 #define TARGET_POSIX_IO
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1012
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1013 #define WINT_TYPE "int"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1014
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1015 /* Every program on darwin links against libSystem which contains the pthread
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1016 routines, so there's no need to explicitly call out when doing threaded
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1017 work. */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1018
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1019 #undef GOMP_SELF_SPECS
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1020 #define GOMP_SELF_SPECS ""
111
kono
parents: 67
diff changeset
1021 #undef GTM_SELF_SPECS
kono
parents: 67
diff changeset
1022 #define GTM_SELF_SPECS ""
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1023
67
f6334be47118 update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 63
diff changeset
1024 /* Darwin disables section anchors by default.
f6334be47118 update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 63
diff changeset
1025 They should be enabled per arch where support exists in that arch. */
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1026 #define TARGET_ASM_OUTPUT_ANCHOR NULL
67
f6334be47118 update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 63
diff changeset
1027 #define DARWIN_SECTION_ANCHORS 0
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1028
111
kono
parents: 67
diff changeset
1029 #define HAVE_ENABLE_EXECUTE_STACK
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1030
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1031 /* For Apple KEXTs, we make the constructors return this to match gcc
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1032 2.95. */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1033 #define TARGET_CXX_CDTOR_RETURNS_THIS (darwin_kextabi_p)
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1034 #define TARGET_KEXTABI flag_apple_kext
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1035
67
f6334be47118 update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 63
diff changeset
1036 /* We have target-specific builtins. */
111
kono
parents: 67
diff changeset
1037 #define SUBTARGET_FOLD_BUILTIN darwin_fold_builtin
67
f6334be47118 update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 63
diff changeset
1038
f6334be47118 update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 63
diff changeset
1039 #define TARGET_N_FORMAT_TYPES 1
f6334be47118 update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 63
diff changeset
1040 #define TARGET_FORMAT_TYPES darwin_additional_format_types
f6334be47118 update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 63
diff changeset
1041
f6334be47118 update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 63
diff changeset
1042 #ifndef USED_FOR_TARGET
f6334be47118 update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 63
diff changeset
1043 extern void darwin_driver_init (unsigned int *,struct cl_decoded_option **);
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1044 #define GCC_DRIVER_HOST_INITIALIZATION \
67
f6334be47118 update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 63
diff changeset
1045 darwin_driver_init (&decoded_options_count, &decoded_options)
f6334be47118 update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 63
diff changeset
1046 #endif
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1047
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1048 /* The Apple assembler and linker do not support constructor priorities. */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1049 #undef SUPPORTS_INIT_PRIORITY
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1050 #define SUPPORTS_INIT_PRIORITY 0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1051
111
kono
parents: 67
diff changeset
1052 /* When building cross-compilers (and native crosses) we shall default to
kono
parents: 67
diff changeset
1053 providing an osx-version-min of this unless overridden by the User.
kono
parents: 67
diff changeset
1054 10.5 is the only version that fully supports all our archs so that's the
kono
parents: 67
diff changeset
1055 fall-back default. */
kono
parents: 67
diff changeset
1056 #define DEF_MIN_OSX_VERSION "10.5"
kono
parents: 67
diff changeset
1057
kono
parents: 67
diff changeset
1058 /* Later versions of ld64 support coalescing weak code/data without requiring
kono
parents: 67
diff changeset
1059 that they be placed in specially identified sections. This is the earliest
kono
parents: 67
diff changeset
1060 _tested_ version known to support this so far. */
kono
parents: 67
diff changeset
1061 #define MIN_LD64_NO_COAL_SECTS "236.4"
kono
parents: 67
diff changeset
1062
145
1830386684a0 gcc-9.2.0
anatofuz
parents: 131
diff changeset
1063 /* From at least version 62.1, ld64 can build symbol indirection stubs as
1830386684a0 gcc-9.2.0
anatofuz
parents: 131
diff changeset
1064 needed, and there is no need for the compiler to emit them. */
1830386684a0 gcc-9.2.0
anatofuz
parents: 131
diff changeset
1065 #define MIN_LD64_OMIT_STUBS "62.1"
1830386684a0 gcc-9.2.0
anatofuz
parents: 131
diff changeset
1066
111
kono
parents: 67
diff changeset
1067 #ifndef LD64_VERSION
145
1830386684a0 gcc-9.2.0
anatofuz
parents: 131
diff changeset
1068 #define LD64_VERSION "62.1"
111
kono
parents: 67
diff changeset
1069 #else
kono
parents: 67
diff changeset
1070 #define DEF_LD64 LD64_VERSION
kono
parents: 67
diff changeset
1071 #endif
kono
parents: 67
diff changeset
1072
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1073 #endif /* CONFIG_DARWIN_H */