guile: enable i686-w64-mingw32 build (see #492)

This commit is contained in:
Tony Theodore 2014-10-10 15:45:44 +11:00
parent 108ffcc68e
commit 6506b8c033
4 changed files with 87 additions and 32 deletions

87
src/guile-1-fixes.patch Normal file
View File

@ -0,0 +1,87 @@
This file is part of MXE.
See index.html for further information.
Contains ad hoc patches for cross building.
From 73756a80498d5c05f28bd4166c239e604125d9e4 Mon Sep 17 00:00:00 2001
From: MXE
Date: Fri, 10 Oct 2014 15:10:32 +1100
Subject: [PATCH 1/2] original patch fixes
diff --git a/guile-readline/configure b/guile-readline/configure
index 3048732..9bee51b 100755
--- a/guile-readline/configure
+++ b/guile-readline/configure
@@ -12086,7 +12086,7 @@ if test "$MINGW32" = "yes" ; then
fi
-for termlib in ncurses curses termcap terminfo termlib ; do
+for termlib in ncurses curses termcap terminfo termlib pdcurses ; do
as_ac_Lib=`$as_echo "ac_cv_lib_${termlib}''_tgoto" | $as_tr_sh`
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tgoto in -l${termlib}" >&5
$as_echo_n "checking for tgoto in -l${termlib}... " >&6; }
diff --git a/libguile/__scm.h b/libguile/__scm.h
index e75f1a9..2b5d159 100644
--- a/libguile/__scm.h
+++ b/libguile/__scm.h
@@ -150,7 +150,7 @@
which should be exported or imported in the resulting dynamic link
library (DLL) in the Win32 port. */
-#if defined (SCM_IMPORT)
+#if defined (SCM_IMPORT) && defined (USE_DLL_IMPORT)
# define SCM_API __declspec (dllimport) extern
#elif defined (SCM_EXPORT) || defined (DLL_EXPORT)
# define SCM_API __declspec (dllexport) extern
--
1.9.3 (Apple Git-50)
From c63aecfe677d7e3d47457c54ce077cf509ad8961 Mon Sep 17 00:00:00 2001
From: MXE
Date: Fri, 10 Oct 2014 15:16:19 +1100
Subject: [PATCH 2/2] fix mingw-w64 build
diff --git a/libguile/posix.c b/libguile/posix.c
index 2ecd8ae..a4e3562 100644
--- a/libguile/posix.c
+++ b/libguile/posix.c
@@ -968,7 +968,7 @@ SCM_DEFINE (scm_execl, "execl", 1, 0, 1,
SCM_F_WIND_EXPLICITLY);
execv (exec_file,
-#ifdef __MINGW32__
+#if defined(__MINGW32__) && !defined(__MINGW64_VERSION_MAJOR)
/* extra "const" in mingw formals, provokes warning from gcc */
(const char * const *)
#endif
@@ -1004,7 +1004,7 @@ SCM_DEFINE (scm_execlp, "execlp", 1, 0, 1,
SCM_F_WIND_EXPLICITLY);
execvp (exec_file,
-#ifdef __MINGW32__
+#if defined(__MINGW32__) && !defined(__MINGW64_VERSION_MAJOR)
/* extra "const" in mingw formals, provokes warning from gcc */
(const char * const *)
#endif
@@ -1048,12 +1048,12 @@ SCM_DEFINE (scm_execle, "execle", 2, 0, 1,
SCM_F_WIND_EXPLICITLY);
execve (exec_file,
-#ifdef __MINGW32__
+#if defined(__MINGW32__) && !defined(__MINGW64_VERSION_MAJOR)
/* extra "const" in mingw formals, provokes warning from gcc */
(const char * const *)
#endif
exec_argv,
-#ifdef __MINGW32__
+#if defined(__MINGW32__) && !defined(__MINGW64_VERSION_MAJOR)
/* extra "const" in mingw formals, provokes warning from gcc */
(const char * const *)
#endif
--
1.9.3 (Apple Git-50)

View File

@ -1,27 +0,0 @@
This file is part of MXE.
See index.html for further information.
diff -ruN guile-1.8.7.orig/guile-readline/configure guile-1.8.7/guile-readline/configure
--- guile-1.8.7.orig/guile-readline/configure 2009-07-05 22:24:45.000000000 +0200
+++ guile-1.8.7/guile-readline/configure 2010-04-10 07:36:18.000000000 +0200
@@ -12353,7 +12353,7 @@
fi
-for termlib in ncurses curses termcap terminfo termlib ; do
+for termlib in ncurses curses termcap terminfo termlib pdcurses ; do
as_ac_Lib=`$as_echo "ac_cv_lib_${termlib}''_tgoto" | $as_tr_sh`
{ $as_echo "$as_me:$LINENO: checking for tgoto in -l${termlib}" >&5
$as_echo_n "checking for tgoto in -l${termlib}... " >&6; }
diff -ruN guile-1.8.7.orig/libguile/__scm.h guile-1.8.7/libguile/__scm.h
--- guile-1.8.7.orig/libguile/__scm.h 2009-07-04 00:18:59.000000000 +0200
+++ guile-1.8.7/libguile/__scm.h 2010-04-10 07:58:48.000000000 +0200
@@ -150,7 +150,7 @@
which should be exported or imported in the resulting dynamic link
library (DLL) in the Win32 port. */
-#if defined (SCM_IMPORT)
+#if defined (SCM_IMPORT) && defined (USE_DLL_IMPORT)
# define SCM_API __declspec (dllimport) extern
#elif defined (SCM_EXPORT) || defined (DLL_EXPORT)
# define SCM_API __declspec (dllexport) extern

View File

@ -7,10 +7,6 @@
#include <stdio.h>
#include <libguile.h>
# ifdef __STRICT_ANSI__
int putenv (char *);
# endif
static void inner_main(void *data, int argc, char *argv[])
{
(void)data;

View File

@ -43,6 +43,5 @@ define $(PKG)_BUILD
endef
$(PKG)_BUILD_x86_64-w64-mingw32 =
$(PKG)_BUILD_i686-w64-mingw32 =
$(PKG)_BUILD_SHARED =