]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
ada: Missing dependency with -gnatc
authorArnaud Charlet <charlet@adacore.com>
Wed, 18 Jan 2023 07:35:17 +0000 (07:35 +0000)
committerMarc Poulhiès <poulhies@adacore.com>
Tue, 16 May 2023 08:30:56 +0000 (10:30 +0200)
When using -gnatc, dependencies on preprocessor and config files
were not recorded.

gcc/ada/

* gnat1drv.adb: Ensure all dependencies are recorded even when not
generating code.

gcc/ada/gnat1drv.adb

index 238618468e1fd971f7f8cc69cbcd240bd19a8e7f..e74036e506ae14596f29f914137fc6554f7e2978 100644 (file)
@@ -1396,6 +1396,17 @@ begin
          Back_End_Mode := Skip;
       end if;
 
+      --  Ensure that we properly register a dependency on system.ads, since
+      --  even if we do not semantically depend on this, Targparm has read
+      --  system parameters from the system.ads file.
+
+      Lib.Writ.Ensure_System_Dependency;
+
+      --  Add dependencies, if any, on preprocessing data file and on
+      --  preprocessing definition file(s).
+
+      Prepcomp.Add_Dependencies;
+
       --  At this stage Back_End_Mode is set to indicate if the backend should
       --  be called to generate code. If it is Skip, then code generation has
       --  been turned off, even though code was requested by the original
@@ -1542,17 +1553,6 @@ begin
          return;
       end if;
 
-      --  Ensure that we properly register a dependency on system.ads, since
-      --  even if we do not semantically depend on this, Targparm has read
-      --  system parameters from the system.ads file.
-
-      Lib.Writ.Ensure_System_Dependency;
-
-      --  Add dependencies, if any, on preprocessing data file and on
-      --  preprocessing definition file(s).
-
-      Prepcomp.Add_Dependencies;
-
       if GNATprove_Mode then
 
          --  In GNATprove mode we're writing the ALI much earlier than usual