[OpenRISC] [PATCH v3 00/13] Glibc OpenRISC port

Stafford Horne
2021-12-25T07:24:35Z

On Fri, Dec 24, 2021, 6:26 AM Stafford Horne <shorne@gmail.com> wrote:

> On Thu, Dec 23, 2021 at 04:57:56PM +0100, Andreas Schwab wrote:
> > On Dez 24 2021, Stafford Horne via Libc-alpha wrote:
> >
> > > It seems the write to the tmp file was failing due the re-open not
> passing
> > > O_LARGEFILE.
> >
> > open64 implies O_LARGEFILE, so if that is making a difference, then your
> > open64 is broken.
>
> Right, that is what the docs say. This architecuture is 32-bits.
>
> And the open64 path is generic.
>
> Possibly this bit removing O_LARGEFILE is wrong?
>
> In sysdeps/unix/sysv/linux/open64.c:
>
> 27 #ifdef __OFF_T_MATCHES_OFF64_T
> 28 # define EXTRA_OPEN_FLAGS 0
> 29 #else
> 30 # define EXTRA_OPEN_FLAGS O_LARGEFILE
> 31 #endif
>
> Otherwise there is something is wrong on linux. It is explicitly checking
> for the precense of O_LARGEFILE.
>
> in fs/read_write.c in generic_write_check_limits:
>
> if (!(file->f_flags & O_LARGEFILE))
> max_size = MAX_NON_LFS;
>

There's something wrong with __OFF_T_MATCHES_OFF64_T in this port. We have
32-bit off_t in Linux. So __OFF_T_MATCHES_OFF64_T should be undefined I
think. I'll look into.

-Stafford

>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.librecores.org/pipermail/openrisc/attachments/20211225/f9454c1f/attachment.htm>