[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: autoconf-2.61's AC_LINK_IFELSE with MinGW cross-compilers
From: |
Keith MARSHALL |
Subject: |
Re: autoconf-2.61's AC_LINK_IFELSE with MinGW cross-compilers |
Date: |
Thu, 12 Apr 2007 10:46:15 +0100 |
Ralf Corsepius wrote:
> On Wed, 2007-04-11 at 10:32 -0700, Paul Eggert wrote:
>> Stepan Kasal <address@hidden> writes:
>>
>>> * lib/autoconf/general.m4 (_AC_LINK_IFELSE): Skip
AS_TEST_X
>>> when cross-compiling.
>>
>> Thanks, I installed that.
>
> Hmm, I am not convinced. If this check can be skipped for cross
> compilation (Which I think is not correct), why can't it always be
> skipped?
As I read the background discussion, leading to introduction of this
extended test, it appears that it was introduced to appease one broken
compiler suite, running on an elderly minority platform. In so doing,
it has broken a feature of autoconf itself, on a current and widely
deployed platform, namely Microsoft Windows.
Sure, users of that platform *can* install Cygwin, and rely on its
trickery to work around that breakage, but that is hardly a proper
solution--the feature remains broken in the general *native* Win32
case. To dogmatically insist that a broken feature, manifest on
such a widely deployed platform, should not be fixed, or at least
mitigated, just seems rather foolish.
As it happens, the problem in autoconf-2.61's AC_LINK_IFELSE is
manifest on Win32, *only* when cross-compiling; thus, eliminating
the potentionally broken test for this case, where it can be
predicted that it might be broken, is a reasonable work around.
If you want a more deterministic test, consider that on native
Win32, at least when using the MSYS shell, something based on
$ rm -f conftest
$ : > conftest
$ test -x conftest && echo yes || echo no
no
$ chmod +x conftest
$ test -x conftest && echo yes || echo no
no
$ ls -l conftest
-rw-r--r-- 1 keith users 0 Apr 12 10:22 conftest
$ mv conftest conftest.exe
$ test -x conftest && echo yes || echo no
yes
$ ls -l conftest
-rwxr-xr-x 1 keith users 0 Apr 12 10:22 conftest
would indicate when AS_TEST_X cannot be used reliably, for arbitrarily
named files.
Regards,
Keith.
- Re: autoconf-2.61's AC_LINK_IFELSE with MinGW cross-compilers, Stepan Kasal, 2007/04/11
- Re: autoconf-2.61's AC_LINK_IFELSE with MinGW cross-compilers, Paul Eggert, 2007/04/11
- Re: autoconf-2.61's AC_LINK_IFELSE with MinGW cross-compilers, Ralf Corsepius, 2007/04/12
- Re: autoconf-2.61's AC_LINK_IFELSE with MinGW cross-compilers, Stepan Kasal, 2007/04/12
- Re: autoconf-2.61's AC_LINK_IFELSE with MinGW cross-compilers,
Keith MARSHALL <=
- Re: autoconf-2.61's AC_LINK_IFELSE with MinGW cross-compilers, Ralf Corsepius, 2007/04/12
- Re: autoconf-2.61's AC_LINK_IFELSE with MinGW cross-compilers, Eric Blake, 2007/04/12
- Re: autoconf-2.61's AC_LINK_IFELSE with MinGW cross-compilers, Keith MARSHALL, 2007/04/12
- Re: autoconf-2.61's AC_LINK_IFELSE with MinGW cross-compilers, Ralf Corsepius, 2007/04/12
- Re: autoconf-2.61's AC_LINK_IFELSE with MinGW cross-compilers, Eric Blake, 2007/04/12
- Re: autoconf-2.61's AC_LINK_IFELSE with MinGW cross-compilers, Ralf Corsepius, 2007/04/12
- Re: autoconf-2.61's AC_LINK_IFELSE with MinGW cross-compilers, Matthew Woehlke, 2007/04/12
- Re: autoconf-2.61's AC_LINK_IFELSE with MinGW cross-compilers, Eric Blake, 2007/04/12
- Re: autoconf-2.61's AC_LINK_IFELSE with MinGW cross-compilers, Keith MARSHALL, 2007/04/12