diff options
Diffstat (limited to 'gcc/ada/gnat1drv.adb')
-rw-r--r-- | gcc/ada/gnat1drv.adb | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/gcc/ada/gnat1drv.adb b/gcc/ada/gnat1drv.adb index 4336277..dcff866 100644 --- a/gcc/ada/gnat1drv.adb +++ b/gcc/ada/gnat1drv.adb @@ -1047,6 +1047,19 @@ begin Write_ALI (Object => (Back_End_Mode = Generate_Object)); + if not Compilation_Errors then + -- In case of ada backends, we need to make sure that the generated + -- object file has a timestamp greater than the ALI file. + -- We do this to make gnatmake happy when checking the ALI and obj + -- timestamps, where it expects the object file being written after + -- the ali file. + -- Gnatmake's assumption is true for gcc platforms where the gcc + -- wrapper needs to call the assembler after calling gnat1, but is + -- not true for ada backends, where the object files are created + -- directly by gnat1 (so are created before the ali file). + Back_End.Gen_Or_Update_Object_File; + end if; + -- Generate ASIS tree after writing the ALI file, since in ASIS mode, -- Write_ALI may in fact result in further tree decoration from the -- original tree file. Note that we dump the tree just before generating |