linux-sh.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Petr Vorel <petr.vorel@gmail.com>
To: buildroot@buildroot.or
Cc: devel@uclibc-ng.org, linux-sh@vger.kernel.org, ltp@lists.linux.it
Subject: LTP test fstatat01.c FTBFS on Buildroot bootlin-sh4-uclibc toolchain
Date: Wed, 29 Jan 2025 23:46:31 +0100	[thread overview]
Message-ID: <20250129224631.GA452802@pevik> (raw)

Hi all,

LTP test fstatat01.c [1] FTBFS on Buildroot bootlin-sh4-uclibc toolchain
(uclibc: 1.0.50, kernel headers: 4.19.255). It looks to me that other bootlin
uclibc based toolchains are working, therefore it's probably sh4 problem.

Looking into include/sys/stat.h in uclibc-ng [2], extern int fstatat (int __fd,
...) definition is guarded only by: #  ifdef __REDIRECT_NTH.
But in glibc io/sys/stat.h [3] guardes it with #  ifdef __USE_TIME64_REDIRECTS
added glibc 2.40 a4ed0471d7 ("Always define __USE_TIME_BITS64 when 64 bit time_t is used")
which replaced previous __USE_TIME_BITS64 added in in glibc 2.34 47f24c21ee [4]
("y2038: Add support for 64-bit time on legacy ABIs") [5]. Should similar change
be added to uclibc-ng?

Kind regards,
Petr

$ cd ~/br-test-pkg/bootlin-sh4-uclibc/build/ltp-testsuite-728759506cbe08612183275b3543007d1c47f7f4/testcases/kernel/syscalls/fstatat
$ make V=1 fstatat01
br-test-pkg/bootlin-sh4-uclibc/host/bin/sh4-linux-gcc -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2 -I../../../../include -I../../../../include -I../../../../include/old/ -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64  -O2 -g0  -Ibr-test-pkg/bootlin-sh4-uclibc/host/bin/../sh4-buildroot-linux-uclibc/sysroot/usr/include/tirpc -g -O2 -fno-strict-aliasing -pipe -Wall -W -Wold-style-definition -std=gnu99 -L../../../../lib fstatat01.c  -Lbr-test-pkg/bootlin-sh4-uclibc/host/bin/../sh4-buildroot-linux-uclibc/sysroot/usr/lib -ltirpc -lfts -lltp -o fstatat01
fstatat01.c:63:5: error: conflicting types for ‘fstatat’; have ‘int(int,  const char *, struct stat64 *, int)’
   63 | int fstatat(int dirfd, const char *filename, struct stat64 *statbuf, int flags)
      |     ^~~~~~~
In file included from br-test-pkg/bootlin-sh4-uclibc/host/sh4-buildroot-linux-uclibc/sysroot/usr/include/features.h:409,
                 from br-test-pkg/bootlin-sh4-uclibc/host/sh4-buildroot-linux-uclibc/sysroot/usr/include/sys/types.h:26,
                 from fstatat01.c:27:
br-test-pkg/bootlin-sh4-uclibc/host/sh4-buildroot-linux-uclibc/sysroot/usr/include/sys/stat.h:243:12: note: previous declaration of ‘fstatat’ with type ‘int(int,  const char * restrict,  struct stat * restrict,  int)’
  243 | extern int __REDIRECT_NTH (fstatat, (int __fd, const char *__restrict __file,
      |            ^~~~~~~~~~~~~~

[1] https://github.com/linux-test-project/ltp/blob/master/testcases/kernel/syscalls/fstatat/fstatat01.c
[2] https://cgit.openadk.org/cgi/cgit/uclibc-ng.git/tree/include/sys/stat.h#n247
[3] https://sourceware.org/git/?p=glibc.git;a=blob;f=io/sys/stat.h;h=4bea9e9a7785f51af8eefd035874f475b92bb26d;hb=HEAD#l268
[4] https://sourceware.org/git/?p=glibc.git;a=commit;h=a4ed0471d71739928a0d0fa3258b3ff3b158e9b9
[5] https://sourceware.org/git/?p=glibc.git;a=commit;h=47f24c21ee38701ae275aa9e451f70fa3e77478c

             reply	other threads:[~2025-01-29 22:46 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-01-29 22:46 Petr Vorel [this message]
2025-01-29 23:35 ` [uclibc-ng-devel] LTP test fstatat01.c FTBFS on Buildroot bootlin-sh4-uclibc toolchain Nadav Tasher

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=20250129224631.GA452802@pevik \
    --to=petr.vorel@gmail.com \
    --cc=buildroot@buildroot.or \
    --cc=devel@uclibc-ng.org \
    --cc=linux-sh@vger.kernel.org \
    --cc=ltp@lists.linux.it \
    /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 NNTP newsgroup(s).