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

« back to all changes in this revision

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