Commit c7f0bdd2 by Vincent Celier Committed by Arnaud Charlet

switch-b.adb (Scan_Binder_Switches): Add processing for new switches -R and -Z

2007-04-20  Vincent Celier  <celier@adacore.com>

	* switch-b.adb (Scan_Binder_Switches): Add processing for new
	switches -R and -Z

	* switch-m.adb (Normalize_Compiler_Switches): Do not record switch -E
	(Scan_Make_Switches): Recognize new switch -aP

From-SVN: r125470
parent 94a198aa
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
-- -- -- --
-- B o d y -- -- B o d y --
-- -- -- --
-- Copyright (C) 2001-2005, Free Software Foundation, Inc. -- -- Copyright (C) 2001-2006, Free Software Foundation, Inc. --
-- -- -- --
-- GNAT is free software; you can redistribute it and/or modify it under -- -- 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- -- -- terms of the GNU General Public License as published by the Free Soft- --
...@@ -336,6 +336,13 @@ package body Switch.B is ...@@ -336,6 +336,13 @@ package body Switch.B is
Ptr := Ptr + 1; Ptr := Ptr + 1;
List_Restrictions := True; List_Restrictions := True;
-- Processing for R switch
when 'R' =>
Ptr := Ptr + 1;
Check_Only := True;
List_Closure := True;
-- Processing for s switch -- Processing for s switch
when 's' => when 's' =>
...@@ -456,6 +463,12 @@ package body Switch.B is ...@@ -456,6 +463,12 @@ package body Switch.B is
Ptr := Ptr + 1; Ptr := Ptr + 1;
No_Main_Subprogram := True; No_Main_Subprogram := True;
-- Processing for Z switch
when 'Z' =>
Ptr := Ptr + 1;
Zero_Formatting := True;
-- Processing for --RTS -- Processing for --RTS
when '-' => when '-' =>
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
-- -- -- --
-- B o d y -- -- B o d y --
-- -- -- --
-- Copyright (C) 2001-2006, Free Software Foundation, Inc. -- -- Copyright (C) 2001-2007, Free Software Foundation, Inc. --
-- -- -- --
-- GNAT is free software; you can redistribute it and/or modify it under -- -- 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- -- -- terms of the GNU General Public License as published by the Free Soft- --
...@@ -27,6 +27,7 @@ ...@@ -27,6 +27,7 @@
with Debug; use Debug; with Debug; use Debug;
with Osint; use Osint; with Osint; use Osint;
with Opt; use Opt; with Opt; use Opt;
with Prj.Ext; use Prj.Ext;
with Table; with Table;
package body Switch.M is package body Switch.M is
...@@ -152,7 +153,7 @@ package body Switch.M is ...@@ -152,7 +153,7 @@ package body Switch.M is
when False => when False =>
-- All switches that don't start with -gnat stay as is, -- All switches that don't start with -gnat stay as is,
-- except -v and -pg -- except -v, -E and -pg
if Switch_Chars = "-pg" then if Switch_Chars = "-pg" then
...@@ -161,7 +162,10 @@ package body Switch.M is ...@@ -161,7 +162,10 @@ package body Switch.M is
Add_Switch_Component ("-p"); Add_Switch_Component ("-p");
elsif C /= 'v' then -- Do not take into account switches that are not transmitted
-- to gnat1 by the gcc driver.
elsif C /= 'v' and then C /= 'E' then
Add_Switch_Component (Switch_Chars); Add_Switch_Component (Switch_Chars);
end if; end if;
...@@ -516,6 +520,12 @@ package body Switch.M is ...@@ -516,6 +520,12 @@ package body Switch.M is
if Switch_Chars = "--create-missing-dirs" then if Switch_Chars = "--create-missing-dirs" then
Setup_Projects := True; Setup_Projects := True;
elsif Switch_Chars'Length > 3 and then
Switch_Chars (Ptr .. Ptr + 1) = "aP"
then
Add_Search_Project_Directory
(Switch_Chars (Ptr + 2 .. Switch_Chars'Last));
elsif C = 'v' and then Switch_Chars'Length = 3 then elsif C = 'v' and then Switch_Chars'Length = 3 then
Ptr := Ptr + 1; Ptr := Ptr + 1;
Verbose_Mode := True; Verbose_Mode := True;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment