From: Florian Weimer Date: Wed, 19 Aug 2015 13:00:24 +0000 (+0200) Subject: Make the stack non-executable in GNAT tools X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=4a5dc5994ead847874e87adb4a9904eaae3e3562;p=gcc.git Make the stack non-executable in GNAT tools Due to PR67205, the deeply nested instantiations require trampolines, which in turn requires an executable stack for the GNAT tools on architectures such as x86_64. From-SVN: r227004 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index ac7f802ca1a..a4d5a3ec2f9 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,11 @@ +2015-08-13 Florian Weimer + + * prj.adb (For_Every_Project_Imported_Context.Recursive_Check_Context): + Move Name_Id_Set instantiation to the Prj package, to avoid trampolines. + * prj-proc.adb (Process.Process_Expression_Variable_Decl): + Move Name_Ids instantiation to the Prj.Proc package, to avoid + trampolines. + 2015-08-19 Kyrylo Tkachov * config/arm/arm.c (bounds_check): Use %wd print format diff --git a/gcc/ada/prj-proc.adb b/gcc/ada/prj-proc.adb index 57b88c651bf..3a014f1f6b3 100644 --- a/gcc/ada/prj-proc.adb +++ b/gcc/ada/prj-proc.adb @@ -72,6 +72,8 @@ package body Prj.Proc is Equal => "="); -- Stores the default values of 'Runtime names for the various languages + package Name_Ids is new Ada.Containers.Vectors (Positive, Name_Id); + procedure Add (To_Exp : in out Name_Id; Str : Name_Id); -- Concatenate two strings and returns another string if both -- arguments are not null string. @@ -2193,8 +2195,6 @@ package body Prj.Proc is if Is_Attribute and then Name = Snames.Name_Project_Path then if In_Tree.Is_Root_Tree then declare - package Name_Ids is - new Ada.Containers.Vectors (Positive, Name_Id); Val : String_List_Id := New_Value.Values; List : Name_Ids.Vector; begin diff --git a/gcc/ada/prj.adb b/gcc/ada/prj.adb index 9da0f448564..0deb39beb29 100644 --- a/gcc/ada/prj.adb +++ b/gcc/ada/prj.adb @@ -76,6 +76,9 @@ package body Prj is All_Upper_Case => All_Upper_Case_Image'Access, Mixed_Case => Mixed_Case_Image'Access); + package Name_Id_Set is + new Ada.Containers.Ordered_Sets (Element_Type => Name_Id); + procedure Free (Project : in out Project_Id); -- Free memory allocated for Project @@ -589,9 +592,6 @@ package body Prj is In_Aggregate_Lib : Boolean; From_Encapsulated_Lib : Boolean) is - package Name_Id_Set is - new Ada.Containers.Ordered_Sets (Element_Type => Name_Id); - Seen_Name : Name_Id_Set.Set; -- This set is needed to ensure that we do not handle the same -- project twice in the context of aggregate libraries.