From: charlet Date: Mon, 5 Sep 2011 14:03:26 +0000 (+0000) Subject: 2011-09-05 Pascal Obry X-Git-Tag: upstream/4.9.2~17921 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=2a89a8b8810f51953d64b00269d345ab0f245862;p=platform%2Fupstream%2Flinaro-gcc.git 2011-09-05 Pascal Obry * prj-nmsc.adb: Minor reformatting. Add support for standalone aggregate library. (Check_Stand_Alone_Library): Handle standalone aggregate library. * projects.texi: Fix documentation for aggregate library projects. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@178546 138bc75d-0d04-0410-961f-82ee72b054a4 --- diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index 852f937..0b6ae3f 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -1,3 +1,10 @@ +2011-09-05 Pascal Obry + + * prj-nmsc.adb: Minor reformatting. + Add support for standalone aggregate library. + (Check_Stand_Alone_Library): Handle standalone aggregate library. + * projects.texi: Fix documentation for aggregate library projects. + 2011-09-05 Robert Dewar * sem_ch6.adb: Minor reformatting. diff --git a/gcc/ada/prj-nmsc.adb b/gcc/ada/prj-nmsc.adb index bf6f4cb..9ebd300 100644 --- a/gcc/ada/prj-nmsc.adb +++ b/gcc/ada/prj-nmsc.adb @@ -2717,8 +2717,8 @@ package body Prj.Nmsc is Source := Prj.Element (Iter); exit when Source = No_Source; - if Source.Unit /= No_Unit_Index and then - Source.Unit.Name = Name_Id (Name) + if Source.Unit /= No_Unit_Index + and then Source.Unit.Name = Name_Id (Name) then if not Source.Locally_Removed then Source.In_Interfaces := True; @@ -2870,8 +2870,8 @@ package body Prj.Nmsc is end if; end if; - elsif Project.Library_Kind /= Static and then - Proj.Library_Kind = Static + elsif Project.Library_Kind /= Static + and then Proj.Library_Kind = Static then Error_Msg_Name_1 := Project.Name; Error_Msg_Name_2 := Proj.Name; @@ -3193,8 +3193,8 @@ package body Prj.Nmsc is Lib_ALI_Dir.Location, Project); end if; - if (not Project.Externally_Built) and then - Project.Library_ALI_Dir /= Project.Library_Dir + if not Project.Externally_Built + and then Project.Library_ALI_Dir /= Project.Library_Dir then -- The library ALI directory cannot be the same as the -- Object directory. @@ -4435,7 +4435,18 @@ package body Prj.Nmsc is Error_Msg_Name_1 := Unit; Next_Proj := Project.Extends; - Iter := For_Each_Source (Data.Tree, Project); + + if Project.Qualifier = Aggregate_Library then + + -- For an aggregate library we want to consider sources + -- of all aggregated projects. + + Iter := For_Each_Source (Data.Tree); + + else + Iter := For_Each_Source (Data.Tree, Project); + end if; + loop while Prj.Element (Iter) /= No_Source and then @@ -4467,6 +4478,7 @@ package body Prj.Nmsc is if Source /= No_Source then if Source.Project /= Project and then not Is_Extending (Project, Source.Project) + and then Project.Qualifier /= Aggregate_Library then Source := No_Source; end if; @@ -4952,10 +4964,10 @@ package body Prj.Nmsc is and then Name_Len > 3 and then Name_Buffer (2 .. 3) = "__" and then - ((Name_Buffer (1) = 'a') or else - (Name_Buffer (1) = 'g') or else - (Name_Buffer (1) = 'i') or else - (Name_Buffer (1) = 's')) + (Name_Buffer (1) = 'a' or else + Name_Buffer (1) = 'g' or else + Name_Buffer (1) = 'i' or else + Name_Buffer (1) = 's') then Name_Buffer (2) := '.'; Name_Buffer (3 .. Name_Len - 1) := Name_Buffer (4 .. Name_Len); @@ -5054,8 +5066,8 @@ package body Prj.Nmsc is OK := OK and then not Need_Letter and then not Last_Underscore; if OK then - if First /= Name'First and then - Is_Reserved (The_Name (First .. The_Name'Last)) + if First /= Name'First + and then Is_Reserved (The_Name (First .. The_Name'Last)) then return; end if; diff --git a/gcc/ada/projects.texi b/gcc/ada/projects.texi index 46f1497..fbaa345 100644 --- a/gcc/ada/projects.texi +++ b/gcc/ada/projects.texi @@ -2695,7 +2695,6 @@ project. Here is the (non exhaustive) list: @item Source_Files, Source_List_File and other attributes dealing with list of sources. @item Source_Dirs, Exec_Dir and Object_Dir -@item Library_Dir, Library_Name and other library-related attributes @item Main @item Roots @item Externally_Built