diff options
author | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2014-07-31 09:51:11 +0000 |
---|---|---|
committer | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2014-07-31 09:51:11 +0000 |
commit | c096447ca1d46df16f97b0b7c636b58478854e4f (patch) | |
tree | 1d11510d5f74450666c6630879163f3d73af5326 /gcc/ada/prj-nmsc.adb | |
parent | 1974a3cb589332cdab001a8551e427d379586790 (diff) | |
download | gcc-c096447ca1d46df16f97b0b7c636b58478854e4f.tar.gz |
2014-07-31 Ed Schonberg <schonberg@adacore.com>
* sem_util.adb (Has_Preelaborable_Initialization): Check that
type is tagged before checking whether a user-defined Initialize
procedure is present.
2014-07-31 Gary Dismukes <dismukes@adacore.com>
* a-ngelfu.ads (Sqrt): Augment postcondition.
2014-07-31 Pascal Obry <obry@adacore.com>
* prj-nmsc.adb (Check_Library_Attributes): An aggegate library
directory and ALI directory must be different than all object
and library directories of aggregated projects.
2014-07-31 Vincent Celier <celier@adacore.com>
* prj-pars.adb, prj-conf.ads, prj-conf.adb (Locate_Runtime): Move spec
to package body, as it is not called from outside. Remove argument
Project_Tree, no longer used. When runtime cannot be found,
call Raise_Invalid_Config instead of failing the program.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@213330 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/prj-nmsc.adb')
-rw-r--r-- | gcc/ada/prj-nmsc.adb | 77 |
1 files changed, 77 insertions, 0 deletions
diff --git a/gcc/ada/prj-nmsc.adb b/gcc/ada/prj-nmsc.adb index 19c12de053d..96d3777f116 100644 --- a/gcc/ada/prj-nmsc.adb +++ b/gcc/ada/prj-nmsc.adb @@ -3028,6 +3028,76 @@ package body Prj.Nmsc is procedure Check_Library (Proj : Project_Id; Extends : Boolean); -- Check if an imported or extended project if also a library project + procedure Check_Aggregate_Library_Dirs; + + ---------------------------------- + -- Check_Aggregate_Library_Dirs -- + ---------------------------------- + + procedure Check_Aggregate_Library_Dirs is + procedure Process_Aggregate (Proj : Project_Id); + + procedure Process_Aggregate (Proj : Project_Id) is + + Agg : Aggregated_Project_List := Proj.Aggregated_Projects; + + begin + while Agg /= null loop + Error_Msg_Name_1 := Agg.Project.Name; + + if Agg.Project.Qualifier /= Aggregate_Library and then + Project.Library_ALI_Dir.Name + = Agg.Project.Object_Directory.Name + then + Error_Msg + (Data.Flags, + "aggregate library 'A'L'I directory cannot be shared with" + & " object directory of aggregated project %%", + The_Lib_Kind.Location, Project); + + elsif Project.Library_ALI_Dir.Name + = Agg.Project.Library_Dir.Name + then + Error_Msg + (Data.Flags, + "aggregate library 'A'L'I directory cannot be shared with" + & " library directory of aggregated project %%", + The_Lib_Kind.Location, Project); + + elsif Agg.Project.Qualifier /= Aggregate_Library and then + Project.Library_Dir.Name + = Agg.Project.Object_Directory.Name + then + Error_Msg + (Data.Flags, + "aggregate library directory cannot be shared with" + & " object directory of aggregated project %%", + The_Lib_Kind.Location, Project); + + elsif Project.Library_Dir.Name + = Agg.Project.Library_Dir.Name + then + Error_Msg + (Data.Flags, + "aggregate library directory cannot be shared with" + & " library directory of aggregated project %%", + The_Lib_Kind.Location, Project); + end if; + + if Agg.Project.Qualifier = Aggregate_Library then + Process_Aggregate (Agg.Project); + end if; + + Agg := Agg.Next; + end loop; + end Process_Aggregate; + + begin + if Project.Qualifier = Aggregate_Library then + Process_Aggregate (Project); + end if; + end Check_Aggregate_Library_Dirs; + ------------------- -- Check_Library -- ------------------- @@ -3745,6 +3815,13 @@ package body Prj.Nmsc is Continuation := Continuation_String'Access; end if; + -- Check that aggregated libraries do not share the aggregate + -- Library_ALI_Dir. + + if Project.Qualifier = Aggregate_Library then + Check_Aggregate_Library_Dirs; + end if; + if Project.Library and not Data.In_Aggregate_Lib then -- Record the library name |