public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "rguenth at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug libfortran/114895] Build failure with !HAVE_WORKING_STAT
Date: Tue, 30 Apr 2024 06:58:04 +0000	[thread overview]
Message-ID: <bug-114895-4-1P3EI0sl9Y@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-114895-4@http.gcc.gnu.org/bugzilla/>

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114895

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jakub at gcc dot gnu.org

--- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> ---
So since this is for the 32bit multilib and the test below doens't seem to
enforce LFS we get a large inode number in the build setup and fail the
stat(), mis-detecting the feature.

libgfortran configure.ac misses AC_SYS_LARGEFILE it seems.


dnl Check whether the st_ino and st_dev stat fields taken together uniquely
dnl identify the file within the system. This is should be true for POSIX
dnl systems; it is known to be false on mingw32.
AC_DEFUN([LIBGFOR_CHECK_WORKING_STAT], [
  AC_CACHE_CHECK([whether the target stat is reliable],
                  libgfor_cv_have_working_stat, [
  AC_RUN_IFELSE([AC_LANG_SOURCE([[
#include <stdio.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <unistd.h>

int main ()
{ 
  FILE *f, *g;
  struct stat st1, st2;

  f = fopen ("foo", "w");
  g = fopen ("bar", "w");
  if (stat ("foo", &st1) != 0 || stat ("bar", &st2))
    return 1;
  if (st1.st_dev == st2.st_dev && st1.st_ino == st2.st_ino)
    return 1;
  fclose(f);
  fclose(g);
  return 0; 
}]])], libgfor_cv_have_working_stat=yes, libgfor_cv_have_working_stat=no, [
case "${target}" in
  *mingw*) libgfor_cv_have_working_stat=no ;;
  *) libgfor_cv_have_working_stat=yes;;
esac])])
if test x"$libgfor_cv_have_working_stat" = xyes; then
  AC_DEFINE(HAVE_WORKING_STAT, 1, [Define if target has a reliable stat.])
fi])

  reply	other threads:[~2024-04-30  6:58 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-30  6:54 [Bug libfortran/114895] New: " rguenth at gcc dot gnu.org
2024-04-30  6:58 ` rguenth at gcc dot gnu.org [this message]
2024-04-30  7:01 ` [Bug libfortran/114895] " rguenth at gcc dot gnu.org
2024-04-30  7:07 ` rguenth at gcc dot gnu.org
2024-04-30  7:48 ` jakub at gcc dot gnu.org
2024-04-30  7:53 ` jakub at gcc dot gnu.org
2024-04-30  7:55 ` jakub at gcc dot gnu.org
2024-05-02  7:03 ` rguenth at gcc dot gnu.org
2024-05-02  7:16 ` sjames at gcc dot gnu.org
2024-05-02  7:26 ` rguenth at gcc dot gnu.org
2024-05-02  7:29 ` sjames at gcc dot gnu.org
2024-05-02  7:44 ` rguenth at gcc dot gnu.org

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=bug-114895-4-1P3EI0sl9Y@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /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).