public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
From: Joseph Myers <joseph@codesourcery.com>
To: Stafford Horne <shorne@gmail.com>
Cc: Adhemerval Zanella <adhemerval.zanella@linaro.org>,
	GLIBC patches <libc-alpha@sourceware.org>
Subject: Re: [PATCH v3 18/24] y2038: Add support for 64-bit time on legacy ABIs
Date: Wed, 13 Oct 2021 20:47:39 +0000	[thread overview]
Message-ID: <alpine.DEB.2.22.394.2110132043310.4099675@digraph.polyomino.org.uk> (raw)
In-Reply-To: <CAAfxs75z=WL_e+sjZqHUxeM=aJ8064VhonxFF76GWw0JUTva5w@mail.gmail.com>

On Wed, 13 Oct 2021, Stafford Horne via Libc-alpha wrote:

> Now, I am trying to build with
> CFLAGS="-g -Og -D_TIME_BITS=64 -D_FILE_OFFSET_BITS=64",
> but this is causing build failures.

glibc can't be built with those options.  All the setup for building 
functions with the correct names and aliases assumes that those macros are 
not defined when building glibc itself; defining them will cause function 
redirections that are only appropriate for user applications, not for 
building glibc itself.

> > +@item
> > +@code{_TIME_BITS=64} and port from the outset uses 64-bit
> > +@code{time_t} and word size equals to @w{32 bits} (e.g. ARC, RV32)
> > +- no action
> 
> OpenRISC falls into this category.  We have 64-bit support but word size is
> 32 bits.
> 
> What does "no action" mean here? Does it mean as long as I set _TIME_BITS=64
> no extra porting effort is needed?

"no action" means _TIME_BITS does nothing and the user gets 64-bit time 
regardless.

As with any port, the architecture-specific files need to be set up 
appropriately for the choices made by the port, and new ports may 
sometimes encounter issues in architecture-independent files for ports not 
needing various kinds of compatibility.

> Is this correct? We only use __USE_TIME_BITS64 on machines where
> __TIMESIZE==32?

The purpose of __USE_TIME_BITS64 is to enable header redirections to 
different function names on systems that support both 32-bit and 64-bit 
time_t.

For an architecture that only supports 64-bit time_t, no such redirections 
should ever be in effect and no separate function names for 64-bit time_t 
should exist, so __USE_TIME_BITS64 should not be defined.  OpenRISC should 
be just like x86_64 in this regard.

-- 
Joseph S. Myers
joseph@codesourcery.com

  parent reply	other threads:[~2021-10-13 20:47 UTC|newest]

Thread overview: 41+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-07 20:35 [PATCH v3 00/24] Add 64 bit time support " Adhemerval Zanella
2021-06-07 20:35 ` [PATCH v3 01/24] linux: mips: Split librt.abilist in n32 and n64 Adhemerval Zanella
2021-06-07 20:35 ` [PATCH v3 02/24] linux: mips: Split libanl.abilist " Adhemerval Zanella
2021-06-07 20:35 ` [PATCH v3 03/24] linux: s390: Add libanl.abilist in s390 and s390x Adhemerval Zanella
2021-06-07 20:35 ` [PATCH v3 04/24] linux: Add fallback for 64-bit time_t SO_{RCV, SND}TIMEO Adhemerval Zanella
2021-06-14 14:52   ` [PATCH v3 04/24] linux: Add fallback for 64-bit time_t SO_{RCV,SND}TIMEO Carlos O'Donell
2021-06-07 20:35 ` [PATCH v3 05/24] linux: Add fallback for 64-bit time_t SO_TIMESTAMP{NS} Adhemerval Zanella
2021-06-25 15:20   ` Florian Weimer
2021-06-25 18:11     ` Adhemerval Zanella
2021-06-25 19:16       ` Florian Weimer
2021-06-28 13:36         ` Adhemerval Zanella
2021-06-07 20:35 ` [PATCH v3 06/24] linux: Add recvvmsg " Adhemerval Zanella
2021-06-07 20:35 ` [PATCH v3 07/24] y2038: Add __USE_TIME_BITS64 support for time_t Adhemerval Zanella
2021-06-07 20:35 ` [PATCH v3 08/24] y2038: Add __USE_TIME_BITS64 support for struct timeval Adhemerval Zanella
2021-06-07 20:35 ` [PATCH v3 09/24] y2038: Add __USE_TIME_BITS64 support for struct timespec Adhemerval Zanella
2021-06-07 20:35 ` [PATCH v3 10/24] y2038: Add __USE_TIME_BITS64 support for struct utimbuf Adhemerval Zanella
2021-06-07 20:36 ` [PATCH v3 11/24] y2038: linux: Add __USE_TIME_BITS64 support for struct timex Adhemerval Zanella
2021-06-07 20:36 ` [PATCH v3 12/24] y2038: Use a common definition for stat Adhemerval Zanella
2021-06-14 14:52   ` Carlos O'Donell
2021-06-07 20:36 ` [PATCH v3 13/24] y2038: Use a common definition for msqid_ds Adhemerval Zanella
2021-06-14 14:52   ` Carlos O'Donell
2021-06-07 20:36 ` [PATCH v3 14/24] y2038: Use a common definition for semid_ds Adhemerval Zanella
2021-06-14 14:52   ` Carlos O'Donell
2021-06-07 20:36 ` [PATCH v3 15/24] y2038: Use a common definition for shmid_ds Adhemerval Zanella
2021-06-14 14:59   ` Carlos O'Donell
2021-06-07 20:36 ` [PATCH v3 16/24] y2038: Add __USE_TIME_BITS64 support for socket-constants.h Adhemerval Zanella
2021-06-07 20:36 ` [PATCH v3 17/24] time: Add 64-bit time support for getdate Adhemerval Zanella
2021-06-07 20:36 ` [PATCH v3 18/24] y2038: Add support for 64-bit time on legacy ABIs Adhemerval Zanella
2021-10-13 11:44   ` Stafford Horne
2021-10-13 16:45     ` Paul Eggert
2021-10-13 21:51       ` Stafford Horne
2021-10-13 20:47     ` Joseph Myers [this message]
2021-10-13 21:50       ` Stafford Horne
2021-06-07 20:36 ` [PATCH v3 19/24] posix: Add glob64 with 64-bit time_t support Adhemerval Zanella
2021-06-14 14:52   ` Carlos O'Donell
2021-06-07 20:36 ` [PATCH v3 20/24] io: Add fts64 " Adhemerval Zanella
2021-06-07 20:36 ` [PATCH v3 21/24] io: Add ftw64 " Adhemerval Zanella
2021-06-07 20:36 ` [PATCH v3 22/24] libsupport: Add 64-bit time_t support for time functions Adhemerval Zanella
2021-06-14 14:52   ` Carlos O'Donell
2021-06-07 20:36 ` [PATCH v3 23/24] libsupport: Add 64-bit time_t support for stat functions Adhemerval Zanella
2021-06-07 20:36 ` [PATCH v3 24/24] y2038: Add test coverage Adhemerval Zanella

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=alpine.DEB.2.22.394.2110132043310.4099675@digraph.polyomino.org.uk \
    --to=joseph@codesourcery.com \
    --cc=adhemerval.zanella@linaro.org \
    --cc=libc-alpha@sourceware.org \
    --cc=shorne@gmail.com \
    /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).