re PR ada/34289 (gnatmake -s doesn't work)
PR ada/34289 * lib.ads: (Enable_Switch_Storing): Declare. * lib.adb: (Enable_Switch_Storing): New procedure. * switch-c.adb (Scan_Front_End_Switches): Add support for -gnatea. * make.adb: (Compile_Sources.Compile): Add -gnatea as first option. (Display): Never display -gnatea * gcc-interface/lang-specs.h: If -gnatea is present, pass -gnatez. Co-Authored-By: Eric Botcazou <ebotcazou@adacore.com> From-SVN: r141673
This commit is contained in:
parent
3453cb7809
commit
7fee6a39eb
@ -1,3 +1,14 @@
|
||||
2008-11-07 Bechir Zalila <bechir.zalila@gmail.com>
|
||||
Eric Botcazou <ebotcazou@adacore.com>
|
||||
|
||||
PR ada/34289
|
||||
* lib.ads: (Enable_Switch_Storing): Declare.
|
||||
* lib.adb: (Enable_Switch_Storing): New procedure.
|
||||
* switch-c.adb (Scan_Front_End_Switches): Add support for -gnatea.
|
||||
* make.adb: (Compile_Sources.Compile): Add -gnatea as first option.
|
||||
(Display): Never display -gnatea
|
||||
* gcc-interface/lang-specs.h: If -gnatea is present, pass -gnatez.
|
||||
|
||||
2008-11-07 Thomas Quinot <quinot@adacore.com>
|
||||
|
||||
* gcc-interface/trans.c (Attribute_to_gnu, case Attr_Length): Check
|
||||
|
@ -35,7 +35,8 @@
|
||||
gnat1 %{I*} %{k8:-gnatk8} %{Wall:-gnatwa} %{w:-gnatws} %{!Q:-quiet}\
|
||||
%{nostdinc*} %{nostdlib*}\
|
||||
-dumpbase %{.adb:%b.adb}%{.ads:%b.ads}%{!.adb:%{!.ads:%b.ada}}\
|
||||
%{O*} %{W*} %{w} %{p} %{pg:-p} %{a} %{f*} %{d*} %{g*&m*} "
|
||||
%{O*} %{W*} %{w} %{p} %{pg:-p} %{a} %{f*} %{d*}\
|
||||
%{gnatea:-gnatez} %{g*&m*} "
|
||||
#if defined(TARGET_VXWORKS_RTP)
|
||||
"%{fRTS=rtp:-mrtp} "
|
||||
#endif
|
||||
|
@ -49,7 +49,7 @@ with Uname; use Uname;
|
||||
package body Lib is
|
||||
|
||||
Switch_Storing_Enabled : Boolean := True;
|
||||
-- Set to False by Disable_Switch_Storing
|
||||
-- Controlled by Enable_Switch_Storing/Disable_Switch_Storing
|
||||
|
||||
-----------------------
|
||||
-- Local Subprograms --
|
||||
@ -433,6 +433,19 @@ package body Lib is
|
||||
return Compilation_Switches.Last;
|
||||
end Compilation_Switches_Last;
|
||||
|
||||
---------------------------
|
||||
-- Enable_Switch_Storing --
|
||||
---------------------------
|
||||
|
||||
procedure Enable_Switch_Storing is
|
||||
begin
|
||||
Switch_Storing_Enabled := True;
|
||||
end Enable_Switch_Storing;
|
||||
|
||||
----------------------------
|
||||
-- Disable_Switch_Storing --
|
||||
----------------------------
|
||||
|
||||
procedure Disable_Switch_Storing is
|
||||
begin
|
||||
Switch_Storing_Enabled := False;
|
||||
|
@ -562,9 +562,15 @@ package Lib is
|
||||
-- which may influence the generated output file(s). Switch is the text of
|
||||
-- the switch to store (except that -fRTS gets changed back to --RTS).
|
||||
|
||||
procedure Enable_Switch_Storing;
|
||||
-- Enable registration of switches by Store_Compilation_Switch. Used to
|
||||
-- avoid registering switches added automatically by the gcc driver at the
|
||||
-- beginning of the command line.
|
||||
|
||||
procedure Disable_Switch_Storing;
|
||||
-- Disable registration of switches by Store_Compilation_Switch. Used to
|
||||
-- avoid registering switches added automatically by the gcc driver.
|
||||
-- avoid registering switches added automatically by the gcc driver at the
|
||||
-- end of the command line.
|
||||
|
||||
procedure Store_Linker_Option_String (S : String_Id);
|
||||
-- This procedure is called to register the string from a pragma
|
||||
|
@ -2947,7 +2947,7 @@ package body Make is
|
||||
Source_Index : Int;
|
||||
Args : Argument_List) return Process_Id
|
||||
is
|
||||
Comp_Args : Argument_List (Args'First .. Args'Last + 9);
|
||||
Comp_Args : Argument_List (Args'First .. Args'Last + 10);
|
||||
Comp_Next : Integer := Args'First;
|
||||
Comp_Last : Integer;
|
||||
Arg_Index : Integer;
|
||||
@ -3004,6 +3004,9 @@ package body Make is
|
||||
end if;
|
||||
end loop;
|
||||
|
||||
Comp_Args (Comp_Next) := new String'("-gnatea");
|
||||
Comp_Next := Comp_Next + 1;
|
||||
|
||||
Comp_Args (Comp_Next) := Comp_Flag;
|
||||
Comp_Next := Comp_Next + 1;
|
||||
|
||||
@ -4109,9 +4112,11 @@ package body Make is
|
||||
|
||||
for J in Args'Range loop
|
||||
|
||||
-- Never display -gnatez
|
||||
-- Never display -gnatea nor -gnatez
|
||||
|
||||
if Args (J).all /= "-gnatez" then
|
||||
if Args (J).all /= "-gnatea" and then
|
||||
Args (J).all /= "-gnatez"
|
||||
then
|
||||
|
||||
-- Do not display the mapping file argument automatically
|
||||
-- created when using a project file.
|
||||
|
@ -301,6 +301,11 @@ package body Switch.C is
|
||||
|
||||
case Switch_Chars (Ptr) is
|
||||
|
||||
when 'a' =>
|
||||
Store_Switch := False;
|
||||
Enable_Switch_Storing;
|
||||
Ptr := Ptr + 1;
|
||||
|
||||
-- -gnatec (configuration pragmas)
|
||||
|
||||
when 'c' =>
|
||||
|
Loading…
Reference in New Issue
Block a user