Skip to contentSkip to conversation

Make MINGW port cross-compilable from Linux

PATCH Johannes Sixt 3 participants 5 messages Jun 15, 2016 6 messages not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

A message that is not in the archive (sent off-list or not yet received): [email protected]

A message that is not in the archive (sent off-list or not yet received): [email protected]

A message that is not in the archive (sent off-list or not yet received): [email protected]

A message that is not in the archive (sent off-list or not yet received): [email protected]

#5 lore raw

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

Quoted 11 lines · Nguyá»…n Thái Ngá»�c Duy

From: Nguyá»…n Thái Ngá»�c Duy <[email protected]>

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.

ifdef NEEDS_SOCKET

Review

Quoted 4 lines
(quoted diff) +2 -0
+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.

#6 lore raw

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

Quoted 4 lines · Johannes Sixt

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:

configure.ac +0 -0
index 4a12cb0..0516fdb 100644
@@ -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

Signature · 1 line
Duy
#7 lore raw
In reply to a message not in the archive
Quoted 2 lines · Nguyá»…n Thái Ngá»�c Duy

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 [email protected]:/srv/git/git/mingw.git +mybranch:mob

The series should be based on mingw.git's master branch (not devel)!

-- Hannes

#8 lore raw

Hi,

Quoted 9 lines · Johannes Sixt
Quoted 2 lines · Nguyá»…n Thái Ngá»�c Duy

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 [email protected]:/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

A message that is not in the archive (sent off-list or not yet received): [email protected]

#10 lore raw

Hi,

Quoted 13 lines · Nguyen Thai Ngoc Duy
Quoted 12 lines · Johannes Schindelin
Quoted 3 lines · Johannes Sixt
Quoted 2 lines · Nguyễn Thái Ngọc Duy

The following patches allow to cross compile mingw port from Linux less

painful.

Quoted 5 lines

Thank you. Could you please push this to the mob branch?

git push [email protected]:/srv/git/git/mingw.git +mybranch:mob

Quoted 7 lines
Quoted 4 lines
Quoted 1 line

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