aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVincent Celier <celier@adacore.com>2014-08-01 08:34:02 +0000
committerArnaud Charlet <charlet@gcc.gnu.org>2014-08-01 10:34:02 +0200
commit3849c2468667a5f15e6dae5ec9ef8a8d4d99cba2 (patch)
tree100115cccc2eee78fbcc573f0a314fbc9d2692f5
parent16b10ccc1f7d3deeaaa5b976fcbca04fba035e9c (diff)
downloadgcc-3849c2468667a5f15e6dae5ec9ef8a8d4d99cba2.zip
gcc-3849c2468667a5f15e6dae5ec9ef8a8d4d99cba2.tar.gz
gcc-3849c2468667a5f15e6dae5ec9ef8a8d4d99cba2.tar.bz2
debug.adb: Remove doc for gnatmake/gprbuild switch -ds.
2014-08-01 Vincent Celier <celier@adacore.com> * debug.adb: Remove doc for gnatmake/gprbuild switch -ds. * make.adb (List_Bad_Compilations): Use Opt.No_Exit_Message instead of Debug.Debug_Flag_S. * makeutl.adb (Finish_Program, Fail_Program): Use Opt flag No_Exit_Message instead of Debug.Debug_Flag_S to suppress exit error messages. * makeutl.ads (No_Exit_Message_Option): New constant string for switch --no-exit-message. * opt.ads (No_Exit_Message): New Boolean flag, defaulted to False. * switch-m.adb (Scan_Make_Switches): Recognize new switch --no-exit-message. From-SVN: r213424
-rw-r--r--gcc/ada/ChangeLog14
-rw-r--r--gcc/ada/debug.adb10
-rw-r--r--gcc/ada/make.adb2
-rw-r--r--gcc/ada/makeutl.adb6
-rw-r--r--gcc/ada/makeutl.ads6
-rw-r--r--gcc/ada/opt.ads5
-rw-r--r--gcc/ada/switch-m.adb5
7 files changed, 34 insertions, 14 deletions
diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog
index 6069ea6..502df3e 100644
--- a/gcc/ada/ChangeLog
+++ b/gcc/ada/ChangeLog
@@ -1,3 +1,17 @@
+2014-08-01 Vincent Celier <celier@adacore.com>
+
+ * debug.adb: Remove doc for gnatmake/gprbuild switch -ds.
+ * make.adb (List_Bad_Compilations): Use Opt.No_Exit_Message
+ instead of Debug.Debug_Flag_S.
+ * makeutl.adb (Finish_Program, Fail_Program): Use Opt flag
+ No_Exit_Message instead of Debug.Debug_Flag_S to suppress exit
+ error messages.
+ * makeutl.ads (No_Exit_Message_Option): New constant string
+ for switch --no-exit-message.
+ * opt.ads (No_Exit_Message): New Boolean flag, defaulted to False.
+ * switch-m.adb (Scan_Make_Switches): Recognize new switch
+ --no-exit-message.
+
2014-08-01 Arnaud Charlet <charlet@adacore.com>
* exp_vfpt.adb, exp_vfpt.ads: Removed, no longer used.
diff --git a/gcc/ada/debug.adb b/gcc/ada/debug.adb
index de649f4..94da8ec 100644
--- a/gcc/ada/debug.adb
+++ b/gcc/ada/debug.adb
@@ -214,7 +214,7 @@ package body Debug is
-- dp Prints the contents of the Q used by Make.Compile_Sources
-- dq Prints source files as they are enqueued and dequeued
-- dr
- -- ds Suppress exit message when compilation fails
+ -- ds
-- dt Display time stamps when there is a mismatch
-- du List units as their ali files are acquired
-- dv
@@ -801,10 +801,6 @@ package body Debug is
-- used by routine Make.Compile_Sources. Useful to figure out the
-- order in which sources are recompiled.
- -- ds When one or more compilations compilation fail, gnatmake does not
- -- issue an error message such as:
- -- gnatmake: "/path/to/main.adb" compilation error
-
-- dt When a time stamp mismatch has been found for an ALI file,
-- display the source file name, the time stamp expected and
-- the time stamp found.
@@ -824,10 +820,6 @@ package body Debug is
-- of execution, such as temporary config pragma files, mapping
-- files or project path files.
- -- ds When one or more compilations compilation fail, gprbuild does not
- -- issue the error message:
- -- gprbuild: *** compilation phase failed
-
-- dt When a time stamp mismatch has been found for an ALI file,
-- display the source file name, the time stamp expected and
-- the time stamp found.
diff --git a/gcc/ada/make.adb b/gcc/ada/make.adb
index 808ad00..05cb6f1 100644
--- a/gcc/ada/make.adb
+++ b/gcc/ada/make.adb
@@ -6948,7 +6948,7 @@ package body Make is
procedure List_Bad_Compilations is
begin
- if not Debug.Debug_Flag_S then
+ if not No_Exit_Message then
for J in Bad_Compilation.First .. Bad_Compilation.Last loop
if Bad_Compilation.Table (J).File = No_File then
null;
diff --git a/gcc/ada/makeutl.adb b/gcc/ada/makeutl.adb
index a988c6a..9dde6cb 100644
--- a/gcc/ada/makeutl.adb
+++ b/gcc/ada/makeutl.adb
@@ -777,7 +777,7 @@ package body Makeutl is
Flush_Messages : Boolean := True)
is
begin
- if Flush_Messages and then not Debug.Debug_Flag_S then
+ if Flush_Messages and then not No_Exit_Message then
if Total_Errors_Detected /= 0 or else Warnings_Detected /= 0 then
Errutil.Finalize;
end if;
@@ -806,13 +806,13 @@ package body Makeutl is
if S'Length > 0 then
if Exit_Code /= E_Success then
- if Debug.Debug_Flag_S then
+ if No_Exit_Message then
Osint.Exit_Program (E_Fatal);
else
Osint.Fail (S);
end if;
- elsif not Debug.Debug_Flag_S then
+ elsif not No_Exit_Message then
Write_Str (S);
end if;
end if;
diff --git a/gcc/ada/makeutl.ads b/gcc/ada/makeutl.ads
index ab8068b..ff7b492 100644
--- a/gcc/ada/makeutl.ads
+++ b/gcc/ada/makeutl.ads
@@ -79,6 +79,12 @@ package Makeutl is
Create_Map_File_Switch : constant String := "--create-map-file";
-- Switch to create a map file when an executable is linked
+ No_Exit_Message_Option : constant String := "--no-exit-message";
+ -- Switch to suppress exit error message when there are compilation
+ -- failures. This is useful when a tool, such as gnatprove, call silently
+ -- the builder and do not want to pollute its output with error messages
+ -- coming from the builder. This is an internal switch.
+
Load_Standard_Base : Boolean := True;
-- False when gprbuild is called with --db-
diff --git a/gcc/ada/opt.ads b/gcc/ada/opt.ads
index 6f79fc1..bdbdf0a 100644
--- a/gcc/ada/opt.ads
+++ b/gcc/ada/opt.ads
@@ -1938,6 +1938,11 @@ package Opt is
-- This switch is not set when the pragma appears ahead of a given
-- unit, so it does not affect the compilation of other units.
+ No_Exit_Message : Boolean := False;
+ -- GNATMAKE, GPRBUILD
+ -- Set with switch --no-exit-message. When True, if there are compilation
+ -- failure, the builder does not issue an exit error message.
+
Optimize_Alignment_Config : Character;
-- GNAT
-- This is the value of the configuration switch that controls the
diff --git a/gcc/ada/switch-m.adb b/gcc/ada/switch-m.adb
index 575b1aa..aba2223 100644
--- a/gcc/ada/switch-m.adb
+++ b/gcc/ada/switch-m.adb
@@ -6,7 +6,7 @@
-- --
-- B o d y --
-- --
--- Copyright (C) 2001-2013, Free Software Foundation, Inc. --
+-- Copyright (C) 2001-2014, Free Software Foundation, Inc. --
-- --
-- GNAT is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
@@ -790,6 +790,9 @@ package body Switch.M is
elsif Switch_Chars = Makeutl.Single_Compile_Per_Obj_Dir_Switch then
Opt.One_Compilation_Per_Obj_Dir := True;
+ elsif Switch_Chars = Makeutl.No_Exit_Message_Option then
+ Opt.No_Exit_Message := True;
+
elsif Switch_Chars (Ptr) = '-' then
Bad_Switch (Switch_Chars);