From: Arnaud Charlet Date: Mon, 11 Jun 2018 09:16:59 +0000 (+0000) Subject: [Ada] Bindgen: protect reference to System.Parameters with Sec_Stack_Used X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=75441c4a37291d5be6fb098d161a2c4a22f3741a;p=gcc.git [Ada] Bindgen: protect reference to System.Parameters with Sec_Stack_Used 2018-06-11 Arnaud Charlet gcc/ada/ * bindgen.adb (Gen_Adainit): Protect reference to System.Parameters with Sec_Stack_Used. From-SVN: r261401 --- diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index 0f51c439308..a2624b89534 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -1,3 +1,8 @@ +2018-06-11 Arnaud Charlet + + * bindgen.adb (Gen_Adainit): Protect reference to System.Parameters + with Sec_Stack_Used. + 2018-06-11 Hristian Kirtchev * sem_ch8.adb (Find_Direct_Name): Mode the declaration of diff --git a/gcc/ada/bindgen.adb b/gcc/ada/bindgen.adb index 3950dc7a8ed..4b4e2bb77b8 100644 --- a/gcc/ada/bindgen.adb +++ b/gcc/ada/bindgen.adb @@ -745,10 +745,14 @@ package body Bindgen is WBI (" Default_Stack_Size : Integer;"); WBI (" pragma Import (C, Default_Stack_Size, " & """__gl_default_stack_size"");"); - WBI (" Default_Secondary_Stack_Size : " & - "System.Parameters.Size_Type;"); - WBI (" pragma Import (C, Default_Secondary_Stack_Size, " & - """__gnat_default_ss_size"");"); + + if Sec_Stack_Used then + WBI (" Default_Secondary_Stack_Size : " & + "System.Parameters.Size_Type;"); + WBI (" pragma Import (C, Default_Secondary_Stack_Size, " & + """__gnat_default_ss_size"");"); + end if; + WBI (" Leap_Seconds_Support : Integer;"); WBI (" pragma Import (C, Leap_Seconds_Support, " & """__gl_leap_seconds_support"");");