~ubuntu-branches/debian/sid/gcc-4.8/sid

« back to all changes in this revision

Viewing changes to .svn/pristine/4e/4ea2374b4f063f17d7bc4a97faac4e75816b3875.svn-base

  • Committer: Package Import Robot
  • Author(s): Matthias Klose
  • Date: 2014-12-19 19:48:34 UTC
  • Revision ID: package-import@ubuntu.com-20141219194834-4dz1q7rrn5pad823
Tags: 4.8.4-1
* GCC 4.8.4 release.
  - Fix PR target/61407 (darwin), PR middle-end/58624 (ice),
    PR sanitizer/64265 (wrong code).
* Require recent binutils to pass go test failures.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
# DP: Implements D OS version conditions.
 
2
 
 
3
This implements the following official versions:
 
4
* Windows
 
5
** Win32
 
6
** Win64
 
7
** Cygwin
 
8
** MinGW
 
9
* linux
 
10
* OSX
 
11
* FreeBSD
 
12
* OpenBSD
 
13
* NetBSD
 
14
* Solaris
 
15
* Posix
 
16
* AIX
 
17
* SysV4
 
18
* Hurd
 
19
* Android
 
20
 
 
21
These gdc specific versions are also implemented:
 
22
* GNU_MinGW64 (for mingw-w64)
 
23
* GNU_OpenSolaris (for opensolaris)
 
24
* GNU_GLibc (implemented for linux & bsd & opensolaris)
 
25
* GNU_UCLibc (implemented for linux)
 
26
* GNU_Bionic (implemented for linux)
 
27
 
 
28
These official OS versions are not implemented:
 
29
* DragonFlyBSD
 
30
* BSD (other BSDs)
 
31
* Haiku
 
32
* SkyOS
 
33
* SysV3
 
34
 
 
35
--- a/src/gcc/config/alpha/linux.h
 
36
+++ b/src/gcc/config/alpha/linux.h
 
37
@@ -33,6 +33,16 @@ along with GCC; see the file COPYING3.
 
38
          builtin_define ("_GNU_SOURCE");                       \
 
39
     } while (0)
 
40
 
 
41
+#undef TARGET_OS_D_BUILTINS 
 
42
+#define TARGET_OS_D_BUILTINS()                                 \
 
43
+    do {                                                       \
 
44
+       if (OPTION_GLIBC)                                       \
 
45
+         builtin_define ("GNU_GLibc");                         \
 
46
+                                                               \
 
47
+       builtin_define ("linux");                               \
 
48
+       builtin_define ("Posix");                               \
 
49
+    } while (0)
 
50
+
 
51
 #undef LIB_SPEC
 
52
 #define LIB_SPEC \
 
53
   "%{pthread:-lpthread} \
 
54
--- a/src/gcc/config/arm/linux-eabi.h
 
55
+++ b/src/gcc/config/arm/linux-eabi.h
 
56
@@ -30,6 +30,15 @@
 
57
     }                                          \
 
58
   while (false)
 
59
 
 
60
+#undef  TARGET_OS_D_BUILTINS
 
61
+#define TARGET_OS_D_BUILTINS()                         \
 
62
+  do                                           \
 
63
+    {                                          \
 
64
+      TARGET_GENERIC_LINUX_OS_D_BUILTINS();    \
 
65
+      ANDROID_TARGET_OS_D_BUILTINS();          \
 
66
+    }                                          \
 
67
+  while (false)
 
68
+
 
69
 /* We default to a soft-float ABI so that binaries can run on all
 
70
    target hardware.  If you override this to use the hard-float ABI then
 
71
    change the setting of GLIBC_DYNAMIC_LINKER_DEFAULT as well.  */
 
72
--- a/src/gcc/config/darwin.h
 
73
+++ b/src/gcc/config/darwin.h
 
74
@@ -921,4 +921,10 @@ extern void darwin_driver_init (unsigned
 
75
    providing an osx-version-min of this unless overridden by the User.  */
 
76
 #define DEF_MIN_OSX_VERSION "10.4"
 
77
 
 
78
+#define TARGET_OS_D_BUILTINS()                                 \
 
79
+    do {                                                       \
 
80
+       builtin_define ("OSX");                                 \
 
81
+       builtin_define ("Posix");                               \
 
82
+    } while (0)
 
83
+
 
84
 #endif /* CONFIG_DARWIN_H */
 
85
--- a/src/gcc/config/freebsd.h
 
86
+++ b/src/gcc/config/freebsd.h
 
87
@@ -32,6 +32,13 @@ along with GCC; see the file COPYING3.
 
88
 #undef  TARGET_OS_CPP_BUILTINS
 
89
 #define TARGET_OS_CPP_BUILTINS() FBSD_TARGET_OS_CPP_BUILTINS()
 
90
 
 
91
+#undef TARGET_OS_D_BUILTINS
 
92
+#define TARGET_OS_D_BUILTINS()                                 \
 
93
+    do {                                                       \
 
94
+       builtin_define ("FreeBSD");                             \
 
95
+       builtin_define ("Posix");                               \
 
96
+    } while (0)
 
97
+
 
98
 #undef  CPP_SPEC
 
99
 #define CPP_SPEC FBSD_CPP_SPEC
 
100
 
 
101
--- a/src/gcc/config/gnu.h
 
102
+++ b/src/gcc/config/gnu.h
 
103
@@ -39,3 +39,11 @@ along with GCC.  If not, see <http://www
 
104
        builtin_assert ("system=unix");         \
 
105
        builtin_assert ("system=posix");        \
 
106
     } while (0)
 
107
+
 
108
+#undef TARGET_OS_D_BUILTINS
 
109
+#define TARGET_OS_D_BUILTINS()                                 \
 
110
+    do {                                                       \
 
111
+                                                               \
 
112
+       builtin_define ("Hurd");                                \
 
113
+       builtin_define ("Posix");                               \
 
114
+    } while (0)
 
115
--- a/src/gcc/config/i386/cygwin.h
 
116
+++ b/src/gcc/config/i386/cygwin.h
 
117
@@ -20,6 +20,13 @@ along with GCC; see the file COPYING3.
 
118
 
 
119
 #define EXTRA_OS_CPP_BUILTINS()  /* Nothing.  */
 
120
 
 
121
+#define TARGET_OS_D_BUILTINS()                                 \
 
122
+    do {                                                       \
 
123
+      builtin_define ("Windows");                              \
 
124
+      builtin_define ("Cygwin");                               \
 
125
+      builtin_define ("Posix");                                        \
 
126
+    } while (0)
 
127
+
 
128
 #undef CPP_SPEC
 
129
 #define CPP_SPEC "%(cpp_cpu) %{posix:-D_POSIX_SOURCE} \
 
130
   -D__CYGWIN32__ -D__CYGWIN__ %{!ansi:-Dunix} -D__unix__ -D__unix \
 
131
--- a/src/gcc/config/i386/linux-common.h
 
132
+++ b/src/gcc/config/i386/linux-common.h
 
133
@@ -27,6 +27,15 @@ along with GCC; see the file COPYING3.
 
134
     }                                          \
 
135
   while (0)
 
136
 
 
137
+#undef  TARGET_OS_D_BUILTINS
 
138
+#define TARGET_OS_D_BUILTINS()                         \
 
139
+  do                                           \
 
140
+    {                                          \
 
141
+      TARGET_GENERIC_LINUX_OS_D_BUILTINS();    \
 
142
+      ANDROID_TARGET_OS_D_BUILTINS();          \
 
143
+    }                                          \
 
144
+  while (0)
 
145
+
 
146
 #undef CC1_SPEC
 
147
 #define CC1_SPEC \
 
148
   LINUX_OR_ANDROID_CC (GNU_USER_TARGET_CC1_SPEC, \
 
149
--- a/src/gcc/config/i386/mingw32.h
 
150
+++ b/src/gcc/config/i386/mingw32.h
 
151
@@ -53,6 +53,18 @@ along with GCC; see the file COPYING3.
 
152
     }                                                          \
 
153
   while (0)
 
154
 
 
155
+#define TARGET_OS_D_BUILTINS() TARGET_GENERIC_MINGW_OS_D_BUILTINS()
 
156
+#define TARGET_GENERIC_MINGW_OS_D_BUILTINS()                   \
 
157
+    do {                                                       \
 
158
+      builtin_define ("Windows");                              \
 
159
+      builtin_define ("MinGW");                                        \
 
160
+                                                               \
 
161
+      if (TARGET_64BIT && ix86_abi == MS_ABI)                  \
 
162
+         builtin_define ("Win64");                             \
 
163
+      else if (!TARGET_64BIT)                                  \
 
164
+        builtin_define ("Win32");                              \
 
165
+    } while (0)
 
166
+
 
167
 #ifndef TARGET_USE_PTHREAD_BY_DEFAULT
 
168
 #define SPEC_PTHREAD1 "pthread"
 
169
 #define SPEC_PTHREAD2 "!no-pthread"
 
170
--- a/src/gcc/config/i386/mingw-w64.h
 
171
+++ b/src/gcc/config/i386/mingw-w64.h
 
172
@@ -84,3 +84,10 @@ along with GCC; see the file COPYING3.
 
173
   %{static:-Bstatic} %{!static:-Bdynamic} \
 
174
   %{shared|mdll: " SUB_LINK_ENTRY " --enable-auto-image-base} \
 
175
   %(shared_libgcc_undefs)"
 
176
+
 
177
+#undef TARGET_OS_D_BUILTINS
 
178
+#define TARGET_OS_D_BUILTINS()                                 \
 
179
+    do {                                                       \
 
180
+      TARGET_GENERIC_MINGW_OS_D_BUILTINS();                    \
 
181
+      builtin_define ("GNU_MinGW64");                          \
 
182
+    } while (0)
 
183
--- a/src/gcc/config/kfreebsd-gnu.h
 
184
+++ b/src/gcc/config/kfreebsd-gnu.h
 
185
@@ -29,6 +29,14 @@ along with GCC; see the file COPYING3.
 
186
     }                                          \
 
187
   while (0)
 
188
 
 
189
+#undef TARGET_OS_D_BUILTINS
 
190
+#define TARGET_OS_D_BUILTINS()                                 \
 
191
+    do {                                                       \
 
192
+       builtin_define ("FreeBSD");                             \
 
193
+       builtin_define ("Posix");                               \
 
194
+       builtin_define ("GNU_GLibc");                           \
 
195
+    } while (0)
 
196
+
 
197
 #define GNU_USER_DYNAMIC_LINKER        GLIBC_DYNAMIC_LINKER
 
198
 #define GNU_USER_DYNAMIC_LINKER32      GLIBC_DYNAMIC_LINKER32
 
199
 #define GNU_USER_DYNAMIC_LINKER64      GLIBC_DYNAMIC_LINKER64
 
200
--- a/src/gcc/config/knetbsd-gnu.h
 
201
+++ b/src/gcc/config/knetbsd-gnu.h
 
202
@@ -30,6 +30,16 @@ along with GCC; see the file COPYING3.
 
203
     }                                          \
 
204
   while (0)
 
205
 
 
206
+#undef TARGET_OS_D_BUILTINS
 
207
+#define TARGET_OS_D_BUILTINS()                 \
 
208
+  do                                           \
 
209
+    {                                          \
 
210
+      builtin_define ("NetBSD");               \
 
211
+      builtin_define ("Posix");                        \
 
212
+      builtin_define ("GNU_GLibc");            \
 
213
+    }                                          \
 
214
+  while (0)
 
215
+
 
216
 
 
217
 #undef GNU_USER_DYNAMIC_LINKER
 
218
 #define GNU_USER_DYNAMIC_LINKER "/lib/ld.so.1"
 
219
--- a/src/gcc/config/kopensolaris-gnu.h
 
220
+++ b/src/gcc/config/kopensolaris-gnu.h
 
221
@@ -30,5 +30,15 @@ along with GCC; see the file COPYING3.
 
222
     }                                          \
 
223
   while (0)
 
224
 
 
225
+#define TARGET_OS_D_BUILTINS()                         \
 
226
+  do                                                   \
 
227
+    {                                                  \
 
228
+       builtin_define ("Solaris");                     \
 
229
+       builtin_define ("Posix");                       \
 
230
+       builtin_define ("GNU_OpenSolaris");             \
 
231
+       builtin_define ("GNU_GLibc");                   \
 
232
+    }                                                  \
 
233
+  while (0)
 
234
+
 
235
 #undef GNU_USER_DYNAMIC_LINKER
 
236
 #define GNU_USER_DYNAMIC_LINKER "/lib/ld.so.1"
 
237
--- a/src/gcc/config/linux-android.h
 
238
+++ b/src/gcc/config/linux-android.h
 
239
@@ -25,6 +25,12 @@
 
240
          builtin_define ("__ANDROID__");                       \
 
241
     } while (0)
 
242
 
 
243
+#define ANDROID_TARGET_OS_D_BUILTINS()                         \
 
244
+    do {                                                       \
 
245
+       if (TARGET_ANDROID)                                     \
 
246
+         builtin_define ("Android");                           \
 
247
+    } while (0)
 
248
+
 
249
 #if ANDROID_DEFAULT
 
250
 # define NOANDROID "mno-android"
 
251
 #else
 
252
--- a/src/gcc/config/linux.h
 
253
+++ b/src/gcc/config/linux.h
 
254
@@ -49,6 +49,20 @@ see the files COPYING3 and COPYING.RUNTI
 
255
        builtin_assert ("system=posix");                        \
 
256
     } while (0)
 
257
 
 
258
+#define TARGET_OS_D_BUILTINS() TARGET_GENERIC_LINUX_OS_D_BUILTINS()
 
259
+#define TARGET_GENERIC_LINUX_OS_D_BUILTINS()                   \
 
260
+    do {                                                       \
 
261
+       if (OPTION_GLIBC)                                       \
 
262
+         builtin_define ("GNU_GLibc");                         \
 
263
+       else if (OPTION_UCLIBC)                                 \
 
264
+         builtin_define ("GNU_UCLibc");                        \
 
265
+       else if (OPTION_BIONIC)                                 \
 
266
+         builtin_define ("GNU_Bionic");                        \
 
267
+                                                               \
 
268
+       builtin_define ("linux");                               \
 
269
+       builtin_define ("Posix");                               \
 
270
+    } while (0)
 
271
+
 
272
 /* Determine which dynamic linker to use depending on whether GLIBC or
 
273
    uClibc or Bionic is the default C library and whether
 
274
    -muclibc or -mglibc or -mbionic has been passed to change the default.  */
 
275
--- a/src/gcc/config/mips/linux-common.h
 
276
+++ b/src/gcc/config/mips/linux-common.h
 
277
@@ -27,6 +27,15 @@ along with GCC; see the file COPYING3.
 
278
     ANDROID_TARGET_OS_CPP_BUILTINS();                          \
 
279
   } while (0)
 
280
 
 
281
+#undef  TARGET_OS_D_BUILTINS
 
282
+#define TARGET_OS_D_BUILTINS()                         \
 
283
+  do                                           \
 
284
+    {                                          \
 
285
+      TARGET_GENERIC_LINUX_OS_D_BUILTINS();    \
 
286
+      ANDROID_TARGET_OS_D_BUILTINS();          \
 
287
+    }                                          \
 
288
+  while (0)
 
289
+
 
290
 #undef  LINK_SPEC
 
291
 #define LINK_SPEC                                                      \
 
292
   LINUX_OR_ANDROID_LD (GNU_USER_TARGET_LINK_SPEC,                      \
 
293
--- a/src/gcc/config/netbsd.h
 
294
+++ b/src/gcc/config/netbsd.h
 
295
@@ -29,6 +29,14 @@ along with GCC; see the file COPYING3.
 
296
     }                                          \
 
297
   while (0)
 
298
 
 
299
+#define TARGET_OS_D_BUILTINS()                 \
 
300
+  do                                           \
 
301
+    {                                          \
 
302
+      builtin_define ("NetBSD");               \
 
303
+      builtin_define ("Posix");                        \
 
304
+    }                                          \
 
305
+  while (0)
 
306
+
 
307
 /* CPP_SPEC parts common to all NetBSD targets.  */
 
308
 #define NETBSD_CPP_SPEC                                \
 
309
   "%{posix:-D_POSIX_SOURCE} \
 
310
--- a/src/gcc/config/openbsd.h
 
311
+++ b/src/gcc/config/openbsd.h
 
312
@@ -84,6 +84,14 @@ along with GCC; see the file COPYING3.
 
313
     }                                          \
 
314
   while (0)
 
315
 
 
316
+#define TARGET_OS_D_BUILTINS()                 \
 
317
+  do                                           \
 
318
+    {                                          \
 
319
+      builtin_define ("OpenBSD");              \
 
320
+      builtin_define ("Posix");                        \
 
321
+    }                                          \
 
322
+  while (0)
 
323
+
 
324
 /* TARGET_OS_CPP_BUILTINS() common to all OpenBSD ELF targets.  */
 
325
 #define OPENBSD_OS_CPP_BUILTINS_ELF()          \
 
326
   do                                           \
 
327
--- a/src/gcc/config/rs6000/aix.h
 
328
+++ b/src/gcc/config/rs6000/aix.h
 
329
@@ -110,6 +110,13 @@
 
330
     }                                          \
 
331
   while (0)
 
332
 
 
333
+#define TARGET_OS_D_BUILTINS()                                 \
 
334
+    do {                                                       \
 
335
+                                                               \
 
336
+       builtin_define ("AIX");                                 \
 
337
+       builtin_define ("Posix");                               \
 
338
+    } while (0)
 
339
+
 
340
 /* Define appropriate architecture macros for preprocessor depending on
 
341
    target switches.  */
 
342
 
 
343
--- a/src/gcc/config/rs6000/linux64.h
 
344
+++ b/src/gcc/config/rs6000/linux64.h
 
345
@@ -333,6 +333,17 @@ extern int dot_symbols;
 
346
     }                                                  \
 
347
   while (0)
 
348
 
 
349
+#undef  TARGET_OS_D_BUILTINS
 
350
+#define TARGET_OS_D_BUILTINS()                         \
 
351
+  do                                                   \
 
352
+    {                                                  \
 
353
+      builtin_define ("linux");                                \
 
354
+      builtin_define ("Posix");                                \
 
355
+      if (OPTION_GLIBC)                                        \
 
356
+       builtin_define ("GNU_GLibc");                   \
 
357
+    }                                                  \
 
358
+  while (0)
 
359
+
 
360
 #undef  CPP_OS_DEFAULT_SPEC
 
361
 #define CPP_OS_DEFAULT_SPEC "%(cpp_os_linux)"
 
362
 
 
363
--- a/src/gcc/config/rs6000/linux.h
 
364
+++ b/src/gcc/config/rs6000/linux.h
 
365
@@ -52,6 +52,17 @@
 
366
     }                                          \
 
367
   while (0)
 
368
 
 
369
+#undef  TARGET_OS_D_BUILTINS
 
370
+#define TARGET_OS_D_BUILTINS()                 \
 
371
+  do                                           \
 
372
+    {                                          \
 
373
+      builtin_define ("linux");                        \
 
374
+      builtin_define ("Posix");                        \
 
375
+      if (OPTION_GLIBC)                                \
 
376
+       builtin_define ("GNU_GLibc");           \
 
377
+    }                                          \
 
378
+  while (0)
 
379
+
 
380
 #undef CPP_OS_DEFAULT_SPEC
 
381
 #define CPP_OS_DEFAULT_SPEC "%(cpp_os_linux)"
 
382