From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Volker Grabsch Newsgroups: gmane.lisp.guile.devel,gmane.lisp.guile.bugs Subject: Portability fixes for win32 cross compiling Date: Thu, 15 Apr 2010 02:51:16 +0200 Message-ID: <20100415005116.GB28615@flap> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="Qxx1br4bt0+wmkIi" X-Trace: dough.gmane.org 1271292704 16856 80.91.229.12 (15 Apr 2010 00:51:44 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Thu, 15 Apr 2010 00:51:44 +0000 (UTC) Cc: bug-guile@gnu.org To: guile-devel@gnu.org Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Thu Apr 15 02:51:42 2010 Return-path: Envelope-to: guile-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1O2DIv-0005aQ-49 for guile-devel@m.gmane.org; Thu, 15 Apr 2010 02:51:37 +0200 Original-Received: from localhost ([127.0.0.1]:49552 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1O2DIu-0007Kr-M8 for guile-devel@m.gmane.org; Wed, 14 Apr 2010 20:51:36 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1O2DIr-0007K9-Cv for guile-devel@gnu.org; Wed, 14 Apr 2010 20:51:33 -0400 Original-Received: from [140.186.70.92] (port=40800 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1O2DIp-0007JM-7f for guile-devel@gnu.org; Wed, 14 Apr 2010 20:51:32 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1O2DIn-0002pJ-Ek for guile-devel@gnu.org; Wed, 14 Apr 2010 20:51:31 -0400 Original-Received: from mail.notjusthosting.com ([78.47.75.226]:39535) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1O2DIn-0002pA-64; Wed, 14 Apr 2010 20:51:29 -0400 Original-Received: from pd952f953.dip.t-dialin.net ([217.82.249.83] helo=flap.v.notjusthosting.com) by mail.notjusthosting.com with esmtpsa (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.69) (envelope-from ) id 1O2DIl-0001Aw-29; Thu, 15 Apr 2010 00:51:27 +0000 Original-Received: from vog by flap.v.notjusthosting.com with local (Exim 4.63) (envelope-from ) id 1O2DIa-0002Yr-V4; Thu, 15 Apr 2010 02:51:16 +0200 Content-Disposition: inline User-Agent: Mutt/1.5.13 (2006-08-11) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-BeenThere: guile-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Developers list for Guile, the GNU extensibility library" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Errors-To: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.devel:10223 gmane.lisp.guile.bugs:4566 Archived-At: --Qxx1br4bt0+wmkIi Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Dear Guile developers, I recently added support for your great guile library to the mingw-cross-env project. In order to make this work, I had to perform some portability fixes. I originally created the fixes for the latest stable version (guile 1.8.7), but I ported them forward to your current development version. See the attached patches. (generated with "git format-patch origin/master..HEAD") Note that this doesn't solve all issues. I wasn't able to forward-port my corrections to libguile/__scm.h regarding win32 cross compiling of a _static_ libguile. Well, I could provide something, but I'm unable to test it, because I'm stuck with another problem introduced in 1.9.x: The "gen-scmconfig" script includes a mix of native and cross headers, which goes horribly wrong when performing win32 cross compiling. Is it really necessary to #include the "uniconv.h" from the cross system and to provide corresponding SCM_ICONVEH_* constants? Another note, regarding my patch for the "pthread_att_get_stack" check: I assumed that when in doubt (i.e. when cross-compiling), it is safe to set "works=no". However, I'm not sure about that. Maybe this feature is so common that one should assume "works=yes" when cross-compiling. Greets, Volker -- Volker Grabsch ---<<(())>>--- Administrator NotJustHosting GbR --Qxx1br4bt0+wmkIi Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="0001-add-pdcurses-to-the-list-of-termlibs.patch" >From 6a05429f8da76475b7fc03ad42d308b98f6b777b Mon Sep 17 00:00:00 2001 From: Volker Grabsch Date: Thu, 15 Apr 2010 00:58:22 +0200 Subject: [PATCH] add pdcurses to the list of termlibs --- acinclude.m4 | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/acinclude.m4 b/acinclude.m4 index 2f1466b..8cfe1d4 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -378,7 +378,7 @@ dnl dnl Check all the things needed by `guile-readline', the Readline dnl bindings. AC_DEFUN([GUILE_READLINE], [ - for termlib in ncurses curses termcap terminfo termlib ; do + for termlib in ncurses curses termcap terminfo termlib pdcurses ; do AC_CHECK_LIB(${termlib}, [tgoto], [READLINE_LIBS="-l${termlib} $READLINE_LIBS"; break]) done -- 1.5.6.5 --Qxx1br4bt0+wmkIi Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="0002-don-t-run-the-pthread_att_get_stack-check-when-cross.patch" >From fc80796464b051294280bba5af8ee4c25bef7c70 Mon Sep 17 00:00:00 2001 From: Volker Grabsch Date: Thu, 15 Apr 2010 01:01:23 +0200 Subject: [PATCH] don't run the pthread_att_get_stack check when cross compiling --- configure.ac | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/configure.ac b/configure.ac index 73a4bd2..c6f480a 100644 --- a/configure.ac +++ b/configure.ac @@ -1413,6 +1413,7 @@ if test "$with_threads" = pthreads; then AC_MSG_CHECKING(whether pthread_attr_getstack works for the main thread) old_CFLAGS="$CFLAGS" CFLAGS="$PTHREAD_CFLAGS $CFLAGS" +if test "$cross_compiling" = "no"; then AC_RUN_IFELSE([AC_LANG_SOURCE([[ #if HAVE_PTHREAD_ATTR_GETSTACK #include @@ -1443,6 +1444,9 @@ int main () AC_DEFINE([PTHREAD_ATTR_GETSTACK_WORKS], [1], [Define when pthread_att_get_stack works for the main thread])], [works=no], []) +else +works=no +fi CFLAGS="$old_CFLAGS" AC_MSG_RESULT($works) -- 1.5.6.5 --Qxx1br4bt0+wmkIi--