Linux SNPS ARC Archive on
 help / color / Atom feed
From: Joseph Myers <>
To: Alistair Francis <>
Cc: Florian Weimer <>,
	GNU C Library <>,
	Arnd Bergmann <>, Vineet Gupta <>,
	Palmer Dabbelt <>,
	Zong Li <>,
	Alistair Francis <>,
	Adhemerval Zanella <>,
	"Maciej W. Rozycki" <>,
	arcml <>
Subject: Re: [RFC v6 07/23] RISC-V: Use 64-bit time_t and off_t for RV32 and RV64
Date: Wed, 12 Feb 2020 01:30:46 +0000
Message-ID: <> (raw)
In-Reply-To: <>

On Tue, 11 Feb 2020, Alistair Francis wrote:

> > > diff --git a/sysdeps/unix/sysv/linux/riscv/bits/typesizes.h b/sysdeps/unix/sysv/linux/riscv/bits/typesizes.h
> > > new file mode 100644
> > > index 0000000000..0da3bdeb5d
> > > --- /dev/null
> > > +++ b/sysdeps/unix/sysv/linux/riscv/bits/typesizes.h
> >
> > I was hoping newer arches could simply use the asm-generic one ?
> We need to specify that RV32 uses a 64-bit time_t. The generic ones
> don't do that for 32-bit arches.

Since it seems we'd like future 32-bit ports of glibc to use 64-bit time 
and offsets, we should make that as easy as possible.

That is, you need an RISC-V-specific bits/timesize.h.  But you shouldn't 
need an RISC-V-specific bits/typesizes.h - rather, make the linux/generic 
one do the right thing for __TIME_T_TYPE based on bits/timesize.h.  And 
have some other header that 32-bit linux/generic ports can use to say 
whether they use the 64-bit offset/stat/statfs interface, that 
bits/typesizes.h can use together with its existing __LP64__ check, and 
make the definitions of __OFF_T_TYPE etc. check that as well, and then you 
shouldn't need an RISC-V-specific bits/typesizes.h - the RISC-V-specific 
headers should be strictly minimal.  (No architecture-specific 
bits/time64.h headers should be needed in any case.)

At some point (or indeed now) we might flip the default for linux/generic 
so the architectures needing an architecture-specific header are only the 
older 32-bit linux/generic architectures that have support for 32-bit 
times and offsets, and the newer ones with no such support don't need such 
a header.

Joseph S. Myers

linux-snps-arc mailing list

  reply index

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <>
     [not found] ` <>
2020-02-12  0:14   ` Vineet Gupta
2020-02-12  0:14     ` Alistair Francis
2020-02-12  1:30       ` Joseph Myers [this message]
2020-02-14 22:39         ` Alistair Francis
2020-02-18 23:05           ` switching ARC to 64-bit time_t (Re: [RFC v6 07/23] RISC-V: Use 64-bit time_t and off_t for RV32 and RV64) Vineet Gupta
2020-02-18 23:13             ` Joseph Myers
2020-02-12  1:42       ` [RFC v6 07/23] RISC-V: Use 64-bit time_t and off_t for RV32 and RV64 Vineet Gupta
2020-02-12 12:58         ` Arnd Bergmann
2020-02-19  0:56   ` Vineet Gupta
2020-02-19  1:03     ` Alistair Francis
2020-02-19  1:31       ` Vineet Gupta

Reply instructions:

You may reply publically 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:

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

  git send-email \ \ \ \ \ \ \ \ \ \ \ \ \ \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

Linux SNPS ARC Archive on

Archives are clonable:
	git clone --mirror linux-snps-arc/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-snps-arc linux-snps-arc/ \
	public-inbox-index linux-snps-arc

Example config snippet for mirrors

Newsgroup available over NNTP:

AGPL code for this site: git clone