https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114065
Nicolas Boulenguez <nicolas at debian dot org> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #57926|0 |1 is obsolete| | --- Comment #22 from Nicolas Boulenguez <nicolas at debian dot org> --- Created attachment 58028 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=58028&action=edit merge all definitions and conversions for timeval and timespec Hello. Moving the definitions into System.CRTL was a bad idea because they are needed before the target libgnat is built. The attached version 6 creates a new System.C_Time unit. It also adds a script testing the C_Time functions against handwritten results on 32 combinations of type sizes for Duration, time_t and suseconds_t. With the first four patches applied, gcc-13.2.0 (with Debian patches) builds on x86_64-linux-gnu and arm-linux-gnueabihf. The following program then gives the correct date on x86_64-linux-gnu but random dates or Time_Error on arm-linux-gnueabihf. So the original issue remains. -- with Ada.Calendar, Ada.Text_IO; procedure Demo is Y : Ada.Calendar.Year_Number; M : Ada.Calendar.Month_Number; D : Ada.Calendar.Day_Number; S : Duration; H, Min : Integer; begin Ada.Calendar.Split (Ada.Calendar.Clock, Y, M, D, S); H := Integer ((S / 3_600) - 0.5); S := S - 3600 * Duration (H); Min := Integer ((S / 60) - 0.5); S := S - 60 * Duration (Min); Ada.Text_IO.Put_Line (Y'Img & M'Img & D'Img & H'Img & Min'Img & S'Img); end Demo; -- The commits are rebased on the trunk, with only trivial changes but untested.