From 049e777401bbd6e320f91ccb3d974991a9c8bb99 Mon Sep 17 00:00:00 2001
From: John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>
Date: Sat, 15 Jul 2017 17:01:03 +0000
Subject: [PATCH] re PR ada/81446 (building Ada fails due to missing No_Elaboration_Code_All)

PR ada/81446
	* system-linux-m68k.ads: Add pragma No_Elaboration_Code_All.

From-SVN: r250224
---
 gcc/ada/ChangeLog             | 6 ++++++
 gcc/ada/system-linux-m68k.ads | 7 +++++--
 2 files changed, 11 insertions(+), 2 deletions(-)

diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog
index dc8f279..595d819 100644
--- a/gcc/ada/ChangeLog
+++ b/gcc/ada/ChangeLog
@@ -1,3 +1,9 @@
+2017-07-15  John Paul Adrian Glaubitz  <glaubitz@physik.fu-berlin.de>
+
+	PR ada/81446
+	* system-linux-m68k.ads: Add pragma No_Elaboration_Code_All.
+	(Backend_Overflow_Checks): Set to True.
+
 2017-06-23  Jakub Jelinek  <jakub@redhat.com>
 
 	* gcc-interface/trans.c (gnat_to_gnu): Initialize sync to false to
diff --git a/gcc/ada/system-linux-m68k.ads b/gcc/ada/system-linux-m68k.ads
index 9aa6143..71d4f57 100644
--- a/gcc/ada/system-linux-m68k.ads
+++ b/gcc/ada/system-linux-m68k.ads
@@ -7,7 +7,7 @@
 --                                 S p e c                                  --
 --                         (GNU/Linux/m68k Version)                         --
 --                                                                          --
---          Copyright (C) 2014-2016, Free Software Foundation, Inc.         --
+--          Copyright (C) 2014-2017, Free Software Foundation, Inc.         --
 --                                                                          --
 -- This specification is derived from the Ada Reference Manual for use with --
 -- GNAT. The copyright notice above, and the license provisions that follow --
@@ -40,6 +40,9 @@ package System is
    --  this unit Pure instead of Preelaborable; see RM 13.7.1(15). In Ada
    --  2005, this is Pure in any case (AI-362).
 
+   pragma No_Elaboration_Code_All;
+   --  Allow the use of that restriction in units that WITH this unit
+
    type Name is (SYSTEM_NAME_GNAT);
    System_Name : constant Name := SYSTEM_NAME_GNAT;
 
@@ -126,7 +129,7 @@ private
    --  of the individual switch values.
 
    Backend_Divide_Checks     : constant Boolean := False;
-   Backend_Overflow_Checks   : constant Boolean := False;
+   Backend_Overflow_Checks   : constant Boolean := True;
    Command_Line_Args         : constant Boolean := True;
    Configurable_Run_Time     : constant Boolean := False;
    Denorm                    : constant Boolean := True;
--
libgit2 0.26.0