From: Vadim Godunko <godu...@adacore.com>

Check whether library is elaborated is not generated when there is not
standard library available on target.

gcc/ada/ChangeLog:

        * bindgen.adb (Gen_Adafinal): Don't generate code when
        use of standard library suppressed.

Tested on x86_64-pc-linux-gnu, committed on master.

---
 gcc/ada/bindgen.adb | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/gcc/ada/bindgen.adb b/gcc/ada/bindgen.adb
index cb39af67f9a5..14367ebe97a7 100644
--- a/gcc/ada/bindgen.adb
+++ b/gcc/ada/bindgen.adb
@@ -490,7 +490,9 @@ package body Bindgen is
       WBI ("");
       WBI ("   begin");
 
-      if not CodePeer_Mode then
+      if not CodePeer_Mode
+        and not Suppress_Standard_Library_On_Target
+      then
          WBI ("      if not Is_Elaborated then");
          WBI ("         return;");
          WBI ("      end if;");
-- 
2.43.0

Reply via email to