[multiple changes]
authorArnaud Charlet <charlet@gcc.gnu.org>
Tue, 26 Jan 2010 14:02:25 +0000 (15:02 +0100)
committerArnaud Charlet <charlet@gcc.gnu.org>
Tue, 26 Jan 2010 14:02:25 +0000 (15:02 +0100)
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

gcc/ada/ChangeLog
gcc/ada/gnat_ugn.texi
gcc/ada/prj-attr.adb
gcc/ada/prj-nmsc.adb
gcc/ada/prj.ads
gcc/ada/sem_ch8.adb
gcc/ada/snames.ads-tmpl
gcc/ada/usage.adb

index 2b501289020a4e8985809755bd9fdf055206d049..3cc8b528c7c4ceedf018c812dad34ca83da6b5e6 100644 (file)
@@ -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
index 7cb31f26460a7d3e45f3a60faa0c4fcfa1fb0392..9d35f8ec9086d8ae933eb99f8a57bfc6b5a6a616 100644 (file)
@@ -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
index 74b0269a57fd8c65bcc85ea3ac1cd4a5db69c91a..d143a504a8450436d907ab05523b84467958cfa1 100644 (file)
@@ -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#" &
 
index 6c45f5433dc820cbc8d988110b580dd830d28eb0..ca6a732ac76955075c517b08a11d5886fdb93918 100644 (file)
@@ -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
index 2bdaa756450f3eef6589818e5615d3a21e13bce1..353138d2dafe9a2b8837e195867a25fcd6712d29 100644 (file)
@@ -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,
index 005dedfbc25c79c73da96b797ef1ac9afefd6515..a25d1d6ab54c1d5591de35193bd84978b8c45441 100644 (file)
@@ -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
index d1ed4b4ad69698515463cb53b99a79a2cae7d8ae..d906caf52d232d2ee6f600f255e3f48b55d3d334 100644 (file)
@@ -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 + $;
index 8b0d0cba4e331262af1ae766b686276cd28050be..1840ade33b744598722c47a9ead9d0bca84d971d 100644 (file)
@@ -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