[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

gl_FUNC_FSTATAT doesn’t support cross-compilation

From: Ludovic Courtès
Subject: gl_FUNC_FSTATAT doesn’t support cross-compilation
Date: Wed, 09 Nov 2011 22:36:55 +0100
User-agent: Gnus/5.110018 (No Gnus v0.18) Emacs/24.0.90 (gnu/linux)


(Adding bug-gnulib + Paul.)

ludo-mXXj517/address@hidden (Ludovic Courtès) skribis:

> Rob Vermaas <address@hidden> skribis:
>>> On x86_64-linux, the new build doesn't look healthy:
>>> (http://hydra.nixos.org/build/1302194)
>>> checking whether fstatat fills in st_size etc.... configure: error: in
>>> `/tmp/nix-build-0hb4z8f3gaa69i5j6r6r20dxgwki00hl-coreutils-8.12.192-0cefe-dirty-i586-pc-gnu.drv-0/coreutils-8.12.192-0cefe-dirty':
>>> configure: error: cannot run test program while cross compiling
>>> See `config.log' for more details
>>> Is this a temporary failure?
>> This is a hurd cross-compilation build. I'm not very familiar with
>> this. Maybe Ludo (cc) knows?
> Basically AC_RUN_IFELSE can’t be used when cross-compiling, unless its
> last argument is suitably used (info "(autoconf) Runtime"), which
> gl_FUNC_FSTATAT doesn’t do.

Apparently gl_FUNC_FSTATAT still lacks this extra argument, which
prevents cross-compilation of Coreutils (among others).

What about a patch along these lines?

diff --git a/m4/openat.m4 b/m4/openat.m4
index 05a6bd3..ba3ca5d 100644
--- a/m4/openat.m4
+++ b/m4/openat.m4
@@ -185,7 +185,12 @@ AC_DEFUN([gl_FUNC_FSTATAT],
                 return fstatat (AT_FDCWD, ".", &a, 0) != 0;
-         [gl_cv_func_fstatat_zero_flag=yes])])
+         [gl_cv_func_fstatat_zero_flag=yes],
+        [gl_cv_func_fstatat_zero_flag=no],
+        [case "x$host_os" in
+          *aix*) gl_cv_func_fstatat_zero_flag=no;;
+          *)     gl_cv_func_fstatat_zero_flag=yes;;
+         esac])
$gl_cv_func_fstatat_zero_flag+$gl_cv_func_lstat_dereferences_slashed_symlink in
     yes+yes) ;;

reply via email to

[Prev in Thread] Current Thread [Next in Thread]