https://gcc.gnu.org/g:2c596157046519ea2420135ebae0601e5784c96e
commit r16-3864-g2c596157046519ea2420135ebae0601e5784c96e Author: Vadim Godunko <[email protected]> Date: Sun Jul 13 10:26:19 2025 +0400 ada: Don't generate call of `System.Standard_Library.Adafinal` `adafinal` is not available on targets without standard library. gcc/ada/ChangeLog: * bindgen.adb (Gen_Adafinal): Don't generate call of adafinal when use of standard library suppressed. Diff: --- gcc/ada/bindgen.adb | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/gcc/ada/bindgen.adb b/gcc/ada/bindgen.adb index 14367ebe97a7..24cc8dfb8990 100644 --- a/gcc/ada/bindgen.adb +++ b/gcc/ada/bindgen.adb @@ -476,7 +476,10 @@ package body Bindgen is -- 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 + if not Bind_For_Library + and not CodePeer_Mode + and not Suppress_Standard_Library_On_Target + then WBI (" procedure s_stalib_adafinal;"); Set_String (" pragma Import (Ada, s_stalib_adafinal, "); Set_String ("""system__standard_library__adafinal"");"); @@ -505,7 +508,9 @@ package body Bindgen is -- on whether this is the main program or a library. if not CodePeer_Mode then - if not Bind_For_Library then + if not Bind_For_Library + and not Suppress_Standard_Library_On_Target + then WBI (" s_stalib_adafinal;"); elsif Lib_Final_Built then WBI (" finalize_library;");
