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

« back to all changes in this revision

Viewing changes to .svn/pristine/b9/b9b36779e9994756cc55fb68e0fa5b078e432ec4.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
gcc/ada/
 
2
 
 
3
2011-10-12  Mikael Pettersson  <mikpe@it.uu.se>
 
4
 
 
5
        PR ada/48835
 
6
        * gcc-interface/Makefile.in: Add support for m68k-linux.
 
7
        * system-linux-m68k.ads: New file based on system-linux-ppc.ads
 
8
        and system-vxworks-m68k.ads.
 
9
        * s-memory.adb (Gnat_Malloc): New wrapper around Alloc, returning
 
10
        the memory address as a pointer not an integer.
 
11
        Add Gnat_Malloc -> __gnat_malloc export.
 
12
        * s-memory.ads: Remove Alloc -> __gnat_malloc export.
 
13
 
 
14
--- a/src/gcc/ada/gcc-interface/Makefile.in
 
15
+++ b/src/gcc/ada/gcc-interface/Makefile.in
 
16
@@ -1919,6 +1919,35 @@ ifeq ($(strip $(filter-out arm%-linux,$(
 
17
   LIBRARY_VERSION := $(LIB_VERSION)
 
18
 endif
 
19
 
 
20
+# m68k Linux
 
21
+ifeq ($(strip $(filter-out m68k% linux%,$(arch) $(osys))),)
 
22
+  LIBGNAT_TARGET_PAIRS = \
 
23
+  a-intnam.ads<a-intnam-linux.ads \
 
24
+  s-inmaop.adb<s-inmaop-posix.adb \
 
25
+  s-intman.adb<s-intman-posix.adb \
 
26
+  s-linux.ads<s-linux.ads \
 
27
+  s-osinte.adb<s-osinte-posix.adb \
 
28
+  s-osinte.ads<s-osinte-linux.ads \
 
29
+  s-osprim.adb<s-osprim-posix.adb \
 
30
+  s-taprop.adb<s-taprop-linux.adb \
 
31
+  s-tasinf.ads<s-tasinf-linux.ads \
 
32
+  s-tasinf.adb<s-tasinf-linux.adb \
 
33
+  s-taspri.ads<s-taspri-posix-noaltstack.ads \
 
34
+  s-tpopsp.adb<s-tpopsp-posix-foreign.adb \
 
35
+  system.ads<system-linux-m68k.ads
 
36
+
 
37
+  TOOLS_TARGET_PAIRS =  \
 
38
+    mlib-tgt-specific.adb<mlib-tgt-specific-linux.adb \
 
39
+    indepsw.adb<indepsw-gnu.adb
 
40
+
 
41
+  EXTRA_GNATRTL_TASKING_OBJS=s-linux.o
 
42
+  EH_MECHANISM=-gcc
 
43
+  THREADSLIB = -lpthread
 
44
+  GNATLIB_SHARED = gnatlib-shared-dual
 
45
+  GMEM_LIB = gmemlib
 
46
+  LIBRARY_VERSION := $(LIB_VERSION)
 
47
+endif
 
48
+
 
49
 # Sparc Linux
 
50
 ifeq ($(strip $(filter-out sparc% linux%,$(arch) $(osys))),)
 
51
   LIBGNAT_TARGET_PAIRS_COMMON = \
 
52
--- a/src/gcc/ada/s-memory.adb
 
53
+++ b/src/gcc/ada/s-memory.adb
 
54
@@ -47,6 +47,7 @@ with Ada.Exceptions;
 
55
 with System.Soft_Links;
 
56
 with System.Parameters;
 
57
 with System.CRTL;
 
58
+with Ada.Unchecked_Conversion;
 
59
 
 
60
 package body System.Memory is
 
61
 
 
62
@@ -100,6 +101,22 @@ package body System.Memory is
 
63
       return Result;
 
64
    end Alloc;
 
65
 
 
66
+   type Char_Ptr is access all Character;
 
67
+   pragma Convention (C, Char_Ptr);
 
68
+   pragma No_Strict_Aliasing (Char_Ptr);
 
69
+
 
70
+   function To_Char_Ptr is
 
71
+      new Ada.Unchecked_Conversion (System.Address, Char_Ptr);
 
72
+
 
73
+   --  The function exported as __gnat_malloc MUST return a pointer type.
 
74
+   function Gnat_Malloc (Size : size_t) return Char_Ptr;
 
75
+   pragma Export (C, Gnat_Malloc, "__gnat_malloc");
 
76
+
 
77
+   function Gnat_Malloc (Size : size_t) return Char_Ptr is
 
78
+   begin
 
79
+      return To_Char_Ptr (Alloc (Size));
 
80
+   end Gnat_Malloc;
 
81
+
 
82
    ----------
 
83
    -- Free --
 
84
    ----------
 
85
--- a/src/gcc/ada/s-memory.ads
 
86
+++ b/src/gcc/ada/s-memory.ads
 
87
@@ -100,7 +100,6 @@ private
 
88
 
 
89
    --  The following names are used from the generated compiler code
 
90
 
 
91
-   pragma Export (C, Alloc,   "__gnat_malloc");
 
92
    pragma Export (C, Free,    "__gnat_free");
 
93
    pragma Export (C, Realloc, "__gnat_realloc");
 
94
 
 
95
--- /dev/null
 
96
+++ b/src/gcc/ada/system-linux-m68k.ads
 
97
@@ -0,0 +1,153 @@
 
98
+------------------------------------------------------------------------------
 
99
+--                                                                          --
 
100
+--                        GNAT RUN-TIME COMPONENTS                          --
 
101
+--                                                                          --
 
102
+--                               S Y S T E M                                --
 
103
+--                                                                          --
 
104
+--                                 S p e c                                  --
 
105
+--                         (GNU-Linux/M68K Version)                         --
 
106
+--                                                                          --
 
107
+--          Copyright (C) 1992-2009, Free Software Foundation, Inc.         --
 
108
+--                                                                          --
 
109
+-- This specification is derived from the Ada Reference Manual for use with --
 
110
+-- GNAT. The copyright notice above, and the license provisions that follow --
 
111
+-- apply solely to the  contents of the part following the private keyword. --
 
112
+--                                                                          --
 
113
+-- GNAT is free software;  you can  redistribute it  and/or modify it under --
 
114
+-- terms of the  GNU General Public License as published  by the Free Soft- --
 
115
+-- ware  Foundation;  either version 3,  or (at your option) any later ver- --
 
116
+-- sion.  GNAT is distributed in the hope that it will be useful, but WITH- --
 
117
+-- OUT ANY WARRANTY;  without even the  implied warranty of MERCHANTABILITY --
 
118
+-- or FITNESS FOR A PARTICULAR PURPOSE.                                     --
 
119
+--                                                                          --
 
120
+-- As a special exception under Section 7 of GPL version 3, you are granted --
 
121
+-- additional permissions described in the GCC Runtime Library Exception,   --
 
122
+-- version 3.1, as published by the Free Software Foundation.               --
 
123
+--                                                                          --
 
124
+-- You should have received a copy of the GNU General Public License and    --
 
125
+-- a copy of the GCC Runtime Library Exception along with this program;     --
 
126
+-- see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see    --
 
127
+-- <http://www.gnu.org/licenses/>.                                          --
 
128
+--                                                                          --
 
129
+-- GNAT was originally developed  by the GNAT team at  New York University. --
 
130
+-- Extensive contributions were provided by Ada Core Technologies Inc.      --
 
131
+--                                                                          --
 
132
+------------------------------------------------------------------------------
 
133
+
 
134
+package System is
 
135
+   pragma Pure;
 
136
+   --  Note that we take advantage of the implementation permission to make
 
137
+   --  this unit Pure instead of Preelaborable; see RM 13.7.1(15). In Ada
 
138
+   --  2005, this is Pure in any case (AI-362).
 
139
+
 
140
+   type Name is (SYSTEM_NAME_GNAT);
 
141
+   System_Name : constant Name := SYSTEM_NAME_GNAT;
 
142
+
 
143
+   --  System-Dependent Named Numbers
 
144
+
 
145
+   Min_Int               : constant := Long_Long_Integer'First;
 
146
+   Max_Int               : constant := Long_Long_Integer'Last;
 
147
+
 
148
+   Max_Binary_Modulus    : constant := 2 ** Long_Long_Integer'Size;
 
149
+   Max_Nonbinary_Modulus : constant := 2 ** Integer'Size - 1;
 
150
+
 
151
+   Max_Base_Digits       : constant := Long_Long_Float'Digits;
 
152
+   Max_Digits            : constant := Long_Long_Float'Digits;
 
153
+
 
154
+   Max_Mantissa          : constant := 63;
 
155
+   Fine_Delta            : constant := 2.0 ** (-Max_Mantissa);
 
156
+
 
157
+   Tick                  : constant := 0.000_001;
 
158
+
 
159
+   --  Storage-related Declarations
 
160
+
 
161
+   type Address is private;
 
162
+   pragma Preelaborable_Initialization (Address);
 
163
+   Null_Address : constant Address;
 
164
+
 
165
+   Storage_Unit : constant := 8;
 
166
+   Word_Size    : constant := 32;
 
167
+   Memory_Size  : constant := 2 ** 32;
 
168
+
 
169
+   --  Address comparison
 
170
+
 
171
+   function "<"  (Left, Right : Address) return Boolean;
 
172
+   function "<=" (Left, Right : Address) return Boolean;
 
173
+   function ">"  (Left, Right : Address) return Boolean;
 
174
+   function ">=" (Left, Right : Address) return Boolean;
 
175
+   function "="  (Left, Right : Address) return Boolean;
 
176
+
 
177
+   pragma Import (Intrinsic, "<");
 
178
+   pragma Import (Intrinsic, "<=");
 
179
+   pragma Import (Intrinsic, ">");
 
180
+   pragma Import (Intrinsic, ">=");
 
181
+   pragma Import (Intrinsic, "=");
 
182
+
 
183
+   --  Other System-Dependent Declarations
 
184
+
 
185
+   type Bit_Order is (High_Order_First, Low_Order_First);
 
186
+   Default_Bit_Order : constant Bit_Order := High_Order_First;
 
187
+   pragma Warnings (Off, Default_Bit_Order); -- kill constant condition warning
 
188
+
 
189
+   --  Priority-related Declarations (RM D.1)
 
190
+
 
191
+   --  0 .. 98 corresponds to the system priority range 1 .. 99.
 
192
+   --
 
193
+   --  If the scheduling policy is SCHED_FIFO or SCHED_RR the runtime makes use
 
194
+   --  of the entire range provided by the system.
 
195
+   --
 
196
+   --  If the scheduling policy is SCHED_OTHER the only valid system priority
 
197
+   --  is 1 and other values are simply ignored.
 
198
+
 
199
+   Max_Priority           : constant Positive := 97;
 
200
+   Max_Interrupt_Priority : constant Positive := 98;
 
201
+
 
202
+   subtype Any_Priority       is Integer      range  0 .. 98;
 
203
+   subtype Priority           is Any_Priority range  0 .. 97;
 
204
+   subtype Interrupt_Priority is Any_Priority range 98 .. 98;
 
205
+
 
206
+   Default_Priority : constant Priority := 48;
 
207
+
 
208
+private
 
209
+
 
210
+   type Address is mod Memory_Size;
 
211
+   Null_Address : constant Address := 0;
 
212
+
 
213
+   --------------------------------------
 
214
+   -- System Implementation Parameters --
 
215
+   --------------------------------------
 
216
+
 
217
+   --  These parameters provide information about the target that is used
 
218
+   --  by the compiler. They are in the private part of System, where they
 
219
+   --  can be accessed using the special circuitry in the Targparm unit
 
220
+   --  whose source should be consulted for more detailed descriptions
 
221
+   --  of the individual switch values.
 
222
+
 
223
+   Backend_Divide_Checks     : constant Boolean := False;
 
224
+   Backend_Overflow_Checks   : constant Boolean := True;
 
225
+   Command_Line_Args         : constant Boolean := True;
 
226
+   Configurable_Run_Time     : constant Boolean := False;
 
227
+   Denorm                    : constant Boolean := True;
 
228
+   Duration_32_Bits          : constant Boolean := False;
 
229
+   Exit_Status_Supported     : constant Boolean := True;
 
230
+   Fractional_Fixed_Ops      : constant Boolean := False;
 
231
+   Frontend_Layout           : constant Boolean := False;
 
232
+   Machine_Overflows         : constant Boolean := False;
 
233
+   Machine_Rounds            : constant Boolean := True;
 
234
+   Preallocated_Stacks       : constant Boolean := False;
 
235
+   Signed_Zeros              : constant Boolean := False;
 
236
+   Stack_Check_Default       : constant Boolean := False;
 
237
+   Stack_Check_Probes        : constant Boolean := False;
 
238
+   Stack_Check_Limits        : constant Boolean := False;
 
239
+   Support_64_Bit_Divides    : constant Boolean := True;
 
240
+   Support_Aggregates        : constant Boolean := True;
 
241
+   Support_Composite_Assign  : constant Boolean := True;
 
242
+   Support_Composite_Compare : constant Boolean := True;
 
243
+   Support_Long_Shifts       : constant Boolean := True;
 
244
+   Always_Compatible_Rep     : constant Boolean := True;
 
245
+   Suppress_Standard_Library : constant Boolean := False;
 
246
+   Use_Ada_Main_Program_Name : constant Boolean := False;
 
247
+   ZCX_By_Default            : constant Boolean := True;
 
248
+   GCC_ZCX_Support           : constant Boolean := True;
 
249
+
 
250
+end System;