threads / patch / 8362

patch, 4 partsRe: [PATCH 0/4] Make MINGW port cross-compilable from Linux

Subject: Re: [PATCH 0/4] Make MINGW port cross-compilable from Linux

## tl;dr

5 messages between May 30, 2007 and May 30, 2007. Diffs are folded; open one to read it.

replies: 4people: 3as markdown or json

Johannes Sixt· May 30, 2007, 06:51 UTC · lore
"Nguyễn Thái Ngọc Duy" wrote:
> 
> The following patches allow to cross compile mingw port from Linux less painful.
Thank you. Could you please push this to the mob branch?
git push mob@repo.or.cz:/srv/git/git/mingw.git +mybranch:mob
The series should be based on mingw.git's master branch (not devel)!
-- Hannes
Johannes Schindelin· May 30, 2007, 13:11 UTC · re: Johannes Sixt · lore
Hi,
On Wed, 30 May 2007, Johannes Sixt wrote:
Show 9 quoted lines
> "Nguyễn Thái Ngọc Duy" wrote:
> > 
> > The following patches allow to cross compile mingw port from Linux less painful.
> 
> Thank you. Could you please push this to the mob branch?
> 
> git push mob@repo.or.cz:/srv/git/git/mingw.git +mybranch:mob
> 
> The series should be based on mingw.git's master branch (not devel)!

Is there any good reason why you do that in such a secretive manner? I have not seen this series on the list, just your replies.

Ciao, Dscho

Johannes Sixt· May 30, 2007, 12:01 UTC · lore

Re: [PATCH 4/4] Don't link with libsocket in MINGW port

"Nguyễn Thái Ngọc Duy" wrote:
Show 9 quoted lines
> 
> From: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
> 
> There is a check in configure.ac to determine if libc has function
> socket(). It is used to link with libsocket on SunOS.
> 
> On Windows, libc does not have socket() as well but it is provided
> by winsock, not libsocket. So don't link with libsocket if you are
> on Windows.
Show 5 quoted lines
>  ifdef NEEDS_SOCKET
> +ifndef MINGW
>         EXTLIBS += -lsocket
>  endif
> +endif

This looks wrong. NEEDS_SOCKET is set in the architecture sections of Makefile where necessary, but the MinGW section doesn't want it and doesn't set it. If ./configure sets it, then you should fix configure.ac, not work around in Makefile.

-- Hannes
PS: Appologies for the mangled name - this MUA is from the stone age.
Nguyen Thai Ngoc Duy· May 30, 2007, 13:08 UTC · re: Johannes Sixt · lore

Re: [PATCH 4/4] Don't link with libsocket in MINGW port

On 5/30/07, Johannes Sixt <J.Sixt@eudaptics.com> wrote:
> This looks wrong. NEEDS_SOCKET is set in the architecture sections of
> Makefile where necessary, but the MinGW section doesn't want it and
> doesn't set it. If ./configure sets it, then you should fix
> configure.ac, not work around in Makefile.

I did so because I didn't have SunOS to test so I'd rather not touch the code detecting NEEDS_SOCKET in configure.ac. How about this patch:

Show changes to configure.ac +6 −0
diff --git a/configure.ac b/configure.ac
index 4a12cb0..0516fdb 100644
--- a/configure.ac
+++ b/configure.ac
@@ -173,6 +173,12 @@ test -n "$NEEDS_LIBICONV" && LIBS="$LIBS -liconv"
 AC_CHECK_LIB([c], [socket],
 [NEEDS_SOCKET=],
 [NEEDS_SOCKET=YesPlease])
+if test "$NEEDS_SOCKET" = YesPlease; then # more check
+	AC_CHECK_LIB([socket], [socket],
+	[LIBSOCKET_HAS_SOCKET=],
+	[LIBSOCKET_HAS_SOCKET=1])
+	test -n "$LIBSOCKET_HAS_SOCKET" && NEEDS_SOCKET=
+fi
 AC_SUBST(NEEDS_SOCKET)
 test -n "$NEEDS_SOCKET" && LIBS="$LIBS -lsocket"

If someone has a SunOS, please test the above patch. Thanks
-- 
Duy
Johannes Schindelin· May 30, 2007, 13:43 UTC · lore
Hi,
On Wed, 30 May 2007, Nguyen Thai Ngoc Duy wrote:
Show 20 quoted lines
> On 5/30/07, Johannes Schindelin <Johannes.Schindelin@gmx.de> wrote:
> > 
> > On Wed, 30 May 2007, Johannes Sixt wrote:
> > 
> > > "Nguyễn Thái Ngọc Duy" wrote:
> > > >
> > > > The following patches allow to cross compile mingw port from Linux less
> > painful.
> > >
> > > Thank you. Could you please push this to the mob branch?
> > >
> > > git push mob@repo.or.cz:/srv/git/git/mingw.git +mybranch:mob
> > >
> > > The series should be based on mingw.git's master branch (not devel)!
> > 
> > Is there any good reason why you do that in such a secretive manner? I
> > have not seen this series on the list, just your replies.
> 
> It's vger that should be blamed, not me :) I sent the series to
> Johannes Sixt and CC git@vger but they never came.

That explains it. I notice that your mail did not come through again... Maybe vger should grow a facility where you can check _why_ a mail does not go through. Sort of frustrating otherwise.

Ciao, Dscho

← back to recent threads