Re: [PATCH 0/4] Cross compiling sharutils

Bruce Korb <[email protected]> Tue, 19 May 2015 16:23:10 -0700
Newsgroups gmane.comp.gnu.utils.bugs
Organization FSF
Message-ID <[email protected]>
On 05/17/15 18:04, Filipe Brandenburger wrote:
> Hi Bruce, Eric,
>
> Excuse me for writing to you directly...  Is there a mailing list for sharutils
> discussion?  I couldn't really find one...

"[email protected]"

But since I don't carefully monitor it, you are better off cc-ing me directly.

http://lists.gnu.org/archive/html/info-gnu/2015-02/msg00002.html
http://www.gnu.org/software/sharutils/

I'm confused as to where this is coming from.  Anyway, after grubbing around a bit,
I remember the 5 year old discussion now:

 > https://www.sourceware.org/bugzilla/show_bug.cgi?id=11312

wherein our glibc maintainer suggested that all adaptations belong in Windows
so the One True Libc Source can be as absolutely efficient as possible.  *sigh*.

> 1) Turn the popen support for binary mode into a runtime check and fallback to
>    using non-binary mode if it fails as unsupported.

Just use an #if defined(_WIN32) || defined(_WIN64), yes?

> 2) Use a configure check to detect whether the host OS *requires* binary mode
>    for that particular popen call.  It seems the patch was introduced for
>    cygwin, unfortunately I don't really have access to a cygwin machine to
>    check whether that makes a difference and to propose a check here.  In the
>    bug-gnulib@ thread, Eric proposed using O_BINARY to detect that, perhaps
>    that's a possibility?

I have no idea.  I don't have access to very many platforms.

> 3) If we keep a configure check that possibly requires running a program
>    (either current case or proposal #2), then introduce an autoconf cache
>    variable for it, so that at least it is possible to override the check by
>    passing something like gl_cv_popen_supports_binary=yes in the ./configure
>    command line.  Also, ideally, use the third case of AC_RUN_IFELSE which is
>    triggered when cross-compiling to default it to something sane (I'd say "no"
>    which is fine as long as someone cross-compiling for cygwin can still
>    override it, perhaps it's possible to use some config.guess magic to detect
>    cygwin and default it differently there.)

Either #3 or a variation on #1 that goes to the extra somersaults IFF the target
is a Windows platform.  I think we can pretty well agree that we're only talking
Windows here.