[uclibc-ng-devel] uclibc-ng built with wrong _FILE_OFFSET_BITS
jcmvbkbc at gmail.com
Fri May 10 16:08:10 CEST 2019
On Fri, May 10, 2019 at 6:32 AM Yann Sionneau <ysionneau at kalray.eu> wrote:
> If that can be of any help, this test seems to PASS on armv7 arch:
> However this bugs reproduces for mips32r6 :
> Also, I can confirm I am able to reproduce the issue with
> buildroot+uclibc-ng by building the qemu_xtensa_lx60_defconfig buildroot
Thanks for the confirmation.
I've spent some more time on this issue and I hope have got a better
understanding of it. So:
- uclibc-ng itself is not meant to be compiled differently with
and without it. It is meant to provide both LFS and non-LFS function versions,
like ftruncate and ftruncate64.
- the library user on the other hand gets different set of
on the presence of -D_FILE_OFFSET_BITS=64, that results in a call to different
- however this is not the case for preadv/pwritev: there's only one
each of these functions. When libc is built these functions assume 32-bit
off_t, but when the user code is built, off_t size is selected by the
_FILE_OFFSET_BITS resulting in declaration that does not match definition.
I guess the right way to fix it is using __off64_t in declarations and
of both preadv/pwritev. With this change the test passes on xtensa.
More information about the devel