From: Arnaud Charlet Date: Fri, 6 Jan 2017 13:28:43 +0000 (+0100) Subject: [multiple changes] X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=b41f45e7a5e6d32350e02a95e005fc0eca3c50f3;p=gcc.git [multiple changes] 2017-01-06 Bob Duff * bindgen.adb (Gen_Adainit, Gen_Adafinal): Change "Bind_Main_Program" to "not Bind_For_Library", because otherwise we won't generate the call to s_stalib_adafinal when the main is not written in Ada. 2017-01-06 Bob Duff * sem_prag.adb: Minor: remove pragma Warnings. 2017-01-06 Tristan Gingold * Makefile.rtl: Do not compile s-stchop by default. From-SVN: r244154 --- diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index a8d4a00a1b6..a7921c53cb4 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -1,3 +1,18 @@ +2017-01-06 Bob Duff + + * bindgen.adb (Gen_Adainit, Gen_Adafinal): Change + "Bind_Main_Program" to "not Bind_For_Library", because otherwise + we won't generate the call to s_stalib_adafinal when the main + is not written in Ada. + +2017-01-06 Bob Duff + + * sem_prag.adb: Minor: remove pragma Warnings. + +2017-01-06 Tristan Gingold + + * Makefile.rtl: Do not compile s-stchop by default. + 2017-01-06 Patrick Bernardi * aspects.adb, aspects.ads, exp_ch3.adb, exp_ch9.adb, par-prag.adb, diff --git a/gcc/ada/Makefile.rtl b/gcc/ada/Makefile.rtl index 5b492587356..5f5c3a84e0a 100644 --- a/gcc/ada/Makefile.rtl +++ b/gcc/ada/Makefile.rtl @@ -658,7 +658,6 @@ GNATRTL_NONTASKING_OBJS= \ s-stache$(objext) \ s-stalib$(objext) \ s-stausa$(objext) \ - s-stchop$(objext) \ s-stoele$(objext) \ s-stopoo$(objext) \ s-stposu$(objext) \ diff --git a/gcc/ada/bindgen.adb b/gcc/ada/bindgen.adb index 58089c57fdf..0955b1aba4a 100644 --- a/gcc/ada/bindgen.adb +++ b/gcc/ada/bindgen.adb @@ -415,7 +415,13 @@ package body Bindgen is begin WBI (" procedure " & Ada_Final_Name.all & " is"); - if Bind_Main_Program and not CodePeer_Mode then + -- Call s_stalib_adafinal to await termination of tasks and so on. We + -- want to do this if there is a main program, either in Ada or in some + -- other language. (Note that Bind_Main_Program is True for Ada mains, + -- but False for mains in other languages.) We do not want to do this if + -- we're binding a library. + + if not Bind_For_Library and not CodePeer_Mode then WBI (" procedure s_stalib_adafinal;"); Set_String (" pragma Import (C, s_stalib_adafinal, "); Set_String ("""system__standard_library__adafinal"");"); @@ -442,7 +448,7 @@ package body Bindgen is -- on whether this is the main program or a library. if not CodePeer_Mode then - if Bind_Main_Program then + if not Bind_For_Library then WBI (" s_stalib_adafinal;"); elsif Lib_Final_Built then WBI (" finalize_library;"); @@ -906,7 +912,7 @@ package body Bindgen is -- tasks are non-terminating, so we do not want library-level -- finalization. - elsif Bind_Main_Program + elsif not Bind_For_Library and then not Configurable_Run_Time_On_Target and then not Suppress_Standard_Library_On_Target then diff --git a/gcc/ada/sem_prag.adb b/gcc/ada/sem_prag.adb index f9ffb207ead..608acd0a3f2 100644 --- a/gcc/ada/sem_prag.adb +++ b/gcc/ada/sem_prag.adb @@ -19042,7 +19042,6 @@ package body Sem_Prag is -- [New_Name =>] IDENTIFIER, -- [Renamed =>] pragma_IDENTIFIER); - pragma Warnings (Off); when Pragma_Rename_Pragma => Rename_Pragma : declare New_Name : constant Node_Id := Get_Pragma_Arg (Arg1); Old_Name : constant Node_Id := Get_Pragma_Arg (Arg2); @@ -19076,7 +19075,6 @@ package body Sem_Prag is Map_Pragma_Name (From => Chars (New_Name), To => Chars (Old_Name)); end Rename_Pragma; - pragma Warnings (On); ------------- -- Polling --