]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
ada: Put back -G for binder
authorArnaud Charlet <charlet@adacore.com>
Fri, 28 Jun 2024 08:35:25 +0000 (08:35 +0000)
committerMarc Poulhiès <dkm@gcc.gnu.org>
Thu, 1 Aug 2024 15:14:36 +0000 (17:14 +0200)
gcc/ada/

* bindgen.adb (Gen_Main): Put back support for -G
* bindusg.adb (Display): Put back line for -G
* opt.ads (CCG_Mode): Update doc
* switch-b.adb (Scan_Binder_Switches): Put back support for -G

gcc/ada/bindgen.adb
gcc/ada/bindusg.adb
gcc/ada/opt.ads
gcc/ada/switch-b.adb

index cdfaa08d8a6d6f7df2dab1e31bad6255ef5d442a..57c97d966c9c55321fb030501a041217c82ebed2 100644 (file)
@@ -2113,6 +2113,7 @@ package body Bindgen is
       if Bind_Main_Program
         and then not Minimal_Binder
         and then not CodePeer_Mode
+        and then not CCG_Mode
       then
          WBI ("      Ensure_Reference : aliased System.Address := " &
               "Ada_Main_Program_Name'Address;");
index e870c5f0e22a59ecbbd260fd9bf68bd2c6d8b2d0..855fd16c9305e854c0bfa97a9737a2d55e5b7c7c 100644 (file)
@@ -133,6 +133,11 @@ package body Bindusg is
       Write_Line
         ("  -F        Force checking of elaboration Flags");
 
+      --  Line for -G switch
+
+      Write_Line
+        ("  -G        Generate binder file suitable for CCG");
+
       --  Line for -h switch
 
       Write_Line
index cc3723e1daa55ab99706cbcf960a19fe8260c5f9..dd0c8b38954a42b2fd1febe90dd70e4c3387de00 100644 (file)
@@ -261,7 +261,9 @@ package Opt is
    --  (switch -B)
 
    CCG_Mode : Boolean := False;
-   --  Set to True when running as CCG (either via -gnatceg or via -emit-c)
+   --  GNAT, GNATBIND
+   --  Set to True when running as CCG (implicitly, via -emit-c, or -G for the
+   --  binder)
 
    Check_Aliasing_Of_Parameters : Boolean := False;
    --  GNAT
index 7cc0b8f0e3dce7e1f5498da486d7ff25a4cdde89..729855bd5fe96f9bccb27135c65f626cb2417e77 100644 (file)
@@ -362,6 +362,12 @@ package body Switch.B is
                Debugger_Level := 2;
             end if;
 
+         --  Processing for G switch
+
+         when 'G' =>
+            Ptr := Ptr + 1;
+            CCG_Mode := True;
+
          --  Processing for h switch
 
          when 'h' =>