aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada
diff options
context:
space:
mode:
authorArnaud Charlet <charlet@gcc.gnu.org>2010-01-26 15:02:25 +0100
committerArnaud Charlet <charlet@gcc.gnu.org>2010-01-26 15:02:25 +0100
commitc94a0b9db5c64cf15f6b0971252069429f10e8ac (patch)
tree59c491e0f19bb78d378921368031f1c50cd5dae0 /gcc/ada
parent65564d08a267dbc7f56c069161b7cd44ffe84164 (diff)
downloadgcc-c94a0b9db5c64cf15f6b0971252069429f10e8ac.zip
gcc-c94a0b9db5c64cf15f6b0971252069429f10e8ac.tar.gz
gcc-c94a0b9db5c64cf15f6b0971252069429f10e8ac.tar.bz2
[multiple changes]
2010-01-26 Thomas Quinot <quinot@adacore.com> * gnat_ugn.texi: Adjust documentation of -gnatz switches. * usage.adb: Replace line for -gnatz with two lines for -gnatzc and -gnatzr. 2010-01-26 Vincent Celier <celier@adacore.com> * prj-attr.adb: Add new attribute Library_Install_Name_Option Replace attribute Run_Path_Origin_Supported with Run_Path_Origin * prj-nmsc.adb (Process_Project_Level_Simple_Attributes): Process attributes Run_Path_Option and Library_Install_Name_Option. * prj.ads (Project_Configuration): Replace component Run_Path_Origin_Supported with component Run_Path_Origin. Add new component Library_Install_Name_Option. * snames.ads-tmpl: Add new standard name Library_Install_Name_Option Replace Run_Path_Origin_Supported with Run_Path_Origin 2010-01-26 Ed Schonberg <schonberg@adacore.com> * sem_ch8.adb (Use_One_Package): Within an instance, an actual package is not hidden by a homograph declared in another actual package. From-SVN: r156248
Diffstat (limited to 'gcc/ada')
-rw-r--r--gcc/ada/ChangeLog23
-rw-r--r--gcc/ada/gnat_ugn.texi5
-rw-r--r--gcc/ada/prj-attr.adb3
-rw-r--r--gcc/ada/prj-nmsc.adb30
-rw-r--r--gcc/ada/prj.ads14
-rw-r--r--gcc/ada/sem_ch8.adb20
-rw-r--r--gcc/ada/snames.ads-tmpl3
-rw-r--r--gcc/ada/usage.adb11
8 files changed, 79 insertions, 30 deletions
diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog
index 2b50128..3cc8b52 100644
--- a/gcc/ada/ChangeLog
+++ b/gcc/ada/ChangeLog
@@ -1,3 +1,26 @@
+2010-01-26 Thomas Quinot <quinot@adacore.com>
+
+ * gnat_ugn.texi: Adjust documentation of -gnatz switches.
+ * usage.adb: Replace line for -gnatz with two lines for -gnatzc and
+ -gnatzr.
+
+2010-01-26 Vincent Celier <celier@adacore.com>
+
+ * prj-attr.adb: Add new attribute Library_Install_Name_Option
+ Replace attribute Run_Path_Origin_Supported with Run_Path_Origin
+ * prj-nmsc.adb (Process_Project_Level_Simple_Attributes): Process
+ attributes Run_Path_Option and Library_Install_Name_Option.
+ * prj.ads (Project_Configuration): Replace component
+ Run_Path_Origin_Supported with component Run_Path_Origin. Add new
+ component Library_Install_Name_Option.
+ * snames.ads-tmpl: Add new standard name Library_Install_Name_Option
+ Replace Run_Path_Origin_Supported with Run_Path_Origin
+
+2010-01-26 Ed Schonberg <schonberg@adacore.com>
+
+ * sem_ch8.adb (Use_One_Package): Within an instance, an actual package
+ is not hidden by a homograph declared in another actual package.
+
2010-01-26 Robert Dewar <dewar@adacore.com>
* par_sco.adb (Traverse_Declarations_Or_Statements): Only generate
diff --git a/gcc/ada/gnat_ugn.texi b/gcc/ada/gnat_ugn.texi
index 7cb31f2..9d35f8e 100644
--- a/gcc/ada/gnat_ugn.texi
+++ b/gcc/ada/gnat_ugn.texi
@@ -4572,8 +4572,9 @@ first in the string.
@item
The switches
-@option{^-gnatz^/DISTRIBUTION_STUBS^}, @option{-gnatzc}, and @option{-gnatzr}
-may not be combined with any other switches.
+^^@option{/DISTRIBUTION_STUBS=},^
+@option{-gnatzc} and @option{-gnatzr} may not be combined with any other
+switches, and only one of them may appear in the command line.
@ifclear vms
@item
diff --git a/gcc/ada/prj-attr.adb b/gcc/ada/prj-attr.adb
index 74b0269..d143a50 100644
--- a/gcc/ada/prj-attr.adb
+++ b/gcc/ada/prj-attr.adb
@@ -112,7 +112,7 @@ package body Prj.Attr is
"SVdefault_language#" &
"LVrun_path_option#" &
- "SVrun_path_origin_supported#" &
+ "SVrun_path_origin#" &
"SVseparate_run_path_options#" &
"Satoolchain_version#" &
"Satoolchain_description#" &
@@ -142,6 +142,7 @@ package body Prj.Attr is
"SVlibrary_auto_init_supported#" &
"LVshared_library_minimum_switches#" &
"LVlibrary_version_switches#" &
+ "SVlibrary_install_name_option#" &
"Saruntime_library_dir#" &
"Saruntime_source_dir#" &
diff --git a/gcc/ada/prj-nmsc.adb b/gcc/ada/prj-nmsc.adb
index 6c45f54..ca6a732 100644
--- a/gcc/ada/prj-nmsc.adb
+++ b/gcc/ada/prj-nmsc.adb
@@ -2093,21 +2093,21 @@ package body Prj.Nmsc is
In_Tree => Data.Tree);
end if;
- elsif Attribute.Name = Name_Run_Path_Origin_Supported then
- declare
- pragma Unsuppress (All_Checks);
- begin
- Project.Config.Run_Path_Origin_Supported :=
- Boolean'Value (Get_Name_String (Attribute.Value.Value));
- exception
- when Constraint_Error =>
- Error_Msg
- (Data.Flags,
- "invalid value """ &
- Get_Name_String (Attribute.Value.Value) &
- """ for Run_Path_Origin_Supported",
- Attribute.Value.Location, Project);
- end;
+ elsif Attribute.Name = Name_Run_Path_Origin then
+ Get_Name_String (Attribute.Value.Value);
+
+ if Name_Len = 0 then
+ Error_Msg
+ (Data.Flags,
+ "run path origin cannot be empty",
+ Attribute.Value.Location, Project);
+ end if;
+
+ Project.Config.Run_Path_Origin := Attribute.Value.Value;
+
+ elsif Attribute.Name = Name_Library_Install_Name_Option then
+ Project.Config.Library_Install_Name_Option :=
+ Attribute.Value.Value;
elsif Attribute.Name = Name_Separate_Run_Path_Options then
declare
diff --git a/gcc/ada/prj.ads b/gcc/ada/prj.ads
index 2bdaa75..353138d 100644
--- a/gcc/ada/prj.ads
+++ b/gcc/ada/prj.ads
@@ -906,9 +906,14 @@ package Prj is
-- The option to use when linking to specify the path where to look for
-- libraries.
- Run_Path_Origin_Supported : Boolean := False;
- -- Specify if the run path option support $ORIGIN to indicate paths
- -- reative to the directory of the executable.
+ Run_Path_Origin : Name_Id := No_Name;
+ -- Specify the string (such as "$ORIGIN") to indicate paths relative to
+ -- the directory of the executable in the run path option.
+
+ Library_Install_Name_Option : Name_Id := No_Name;
+ -- When this is not an empty list, this option, followed by the single
+ -- name of the shared library file is used when linking a shared
+ -- library.
Separate_Run_Path_Options : Boolean := False;
-- True if each directory needs to be specified in a separate run path
@@ -1021,7 +1026,8 @@ package Prj is
Default_Project_Config : constant Project_Configuration :=
(Target => No_Name,
Run_Path_Option => No_Name_List,
- Run_Path_Origin_Supported => False,
+ Run_Path_Origin => No_Name,
+ Library_Install_Name_Option => No_Name,
Separate_Run_Path_Options => False,
Executable_Suffix => No_Name,
Linker => No_Path,
diff --git a/gcc/ada/sem_ch8.adb b/gcc/ada/sem_ch8.adb
index 005dedf..a25d1d6 100644
--- a/gcc/ada/sem_ch8.adb
+++ b/gcc/ada/sem_ch8.adb
@@ -7162,7 +7162,11 @@ package body Sem_Ch8 is
-- we compare the scope depth of its scope with that of the
-- current instance. However, a generic actual of a subprogram
-- instance is declared in the wrapper package but will not be
- -- hidden by a use-visible entity.
+ -- hidden by a use-visible entity. Similarly, a generic actual
+ -- will not be hidden by an entity declared in another generic
+ -- actual, which can only have been use-visible in the generic.
+ -- Is this condition complete, and can the following complex
+ -- test be simplified ???
-- If Id is called Standard, the predefined package with the
-- same name is in the homonym chain. It has to be ignored
@@ -7177,9 +7181,17 @@ package body Sem_Ch8 is
and then (Scope (Prev) /= Standard_Standard
or else Sloc (Prev) > Standard_Location)
then
- Set_Is_Potentially_Use_Visible (Id);
- Set_Is_Immediately_Visible (Prev, False);
- Append_Elmt (Prev, Hidden_By_Use_Clause (N));
+ if Ekind (Prev) = E_Package
+ and then Present (Associated_Formal_Package (Prev))
+ and then Present (Associated_Formal_Package (P))
+ then
+ null;
+
+ else
+ Set_Is_Potentially_Use_Visible (Id);
+ Set_Is_Immediately_Visible (Prev, False);
+ Append_Elmt (Prev, Hidden_By_Use_Clause (N));
+ end if;
end if;
-- A user-defined operator is not use-visible if the predefined
diff --git a/gcc/ada/snames.ads-tmpl b/gcc/ada/snames.ads-tmpl
index d1ed4b4..d906caf 100644
--- a/gcc/ada/snames.ads-tmpl
+++ b/gcc/ada/snames.ads-tmpl
@@ -1080,6 +1080,7 @@ package Snames is
Name_Library_Builder : constant Name_Id := N + $;
Name_Library_Dir : constant Name_Id := N + $;
Name_Library_GCC : constant Name_Id := N + $;
+ Name_Library_Install_Name_Option : constant Name_Id := N + $;
Name_Library_Interface : constant Name_Id := N + $;
Name_Library_Kind : constant Name_Id := N + $;
Name_Library_Name : constant Name_Id := N + $;
@@ -1130,7 +1131,7 @@ package Snames is
Name_Roots : constant Name_Id := N + $; -- GPR
Name_Required_Switches : constant Name_Id := N + $;
Name_Run_Path_Option : constant Name_Id := N + $;
- Name_Run_Path_Origin_Supported : constant Name_Id := N + $;
+ Name_Run_Path_Origin : constant Name_Id := N + $;
Name_Separate_Run_Path_Options : constant Name_Id := N + $;
Name_Shared_Library_Minimum_Switches : constant Name_Id := N + $;
Name_Shared_Library_Prefix : constant Name_Id := N + $;
diff --git a/gcc/ada/usage.adb b/gcc/ada/usage.adb
index 8b0d0cb..1840ade 100644
--- a/gcc/ada/usage.adb
+++ b/gcc/ada/usage.adb
@@ -563,10 +563,15 @@ begin
Write_Switch_Char ("yN");
Write_Line ("Cancel all previously set style checks");
- -- Lines for -gnatz switch
+ -- Lines for -gnatzc switch
- Write_Switch_Char ("z");
- Write_Line ("Distribution stub generation (r/c for receiver/caller stubs)");
+ Write_Switch_Char ("zc");
+ Write_Line ("Distribution stub generation for caller stubs");
+
+ -- Lines for -gnatzr switch
+
+ Write_Switch_Char ("zr");
+ Write_Line ("Distribution stub generation for receiver stubs");
-- Line for -gnat83 switch