public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "nicolas at debian dot org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug ada/114065] gnat build with -D_TIME_BITS=64 -D_FILE_OFFSET_BITS=64 fails on 32bit archs
Date: Wed, 24 Apr 2024 17:19:11 +0000	[thread overview]
Message-ID: <bug-114065-4-hXksUiGuHB@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-114065-4@http.gcc.gnu.org/bugzilla/>

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.

  parent reply	other threads:[~2024-04-24 17:19 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-22 19:40 [Bug ada/114065] New: " doko at gcc dot gnu.org
2024-02-26 11:04 ` [Bug ada/114065] " ebotcazou at gcc dot gnu.org
2024-03-22  0:05 ` pinskia at gcc dot gnu.org
2024-03-22  0:57 ` doko at gcc dot gnu.org
2024-03-22  8:05 ` ebotcazou at gcc dot gnu.org
2024-03-23 18:55 ` ebotcazou at gcc dot gnu.org
2024-04-03 17:46 ` nicolas at debian dot org
2024-04-03 17:47 ` nicolas at debian dot org
2024-04-03 17:48 ` nicolas at debian dot org
2024-04-03 17:48 ` nicolas at debian dot org
2024-04-03 17:49 ` nicolas at debian dot org
2024-04-03 17:49 ` nicolas at debian dot org
2024-04-04 10:12 ` charlet at gcc dot gnu.org
2024-04-04 14:20 ` nicolas at debian dot org
2024-04-04 14:45 ` nicolas at debian dot org
2024-04-05 16:30 ` nicolas at debian dot org
2024-04-05 16:36 ` nicolas at debian dot org
2024-04-06 11:37 ` ebotcazou at gcc dot gnu.org
2024-04-08  9:19 ` nicolas at debian dot org
2024-04-11 10:53 ` nicolas at debian dot org
2024-04-24 10:26 ` doko at gcc dot gnu.org
2024-04-24 10:33 ` doko at gcc dot gnu.org
2024-04-24 17:19 ` nicolas at debian dot org [this message]
2024-04-24 22:47 ` nicolas at debian dot org
2024-04-28 20:32 ` nicolas at debian dot org
2024-05-02 15:34 ` nicolas at debian dot org
2024-05-11  8:46 ` nicolas at debian dot org

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-114065-4-hXksUiGuHB@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).