[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Guile-commits] GNU Guile branch, stable-2.0, updated. v2.0.3-36-g2db1db
From: |
Ludovic Courtès |
Subject: |
[Guile-commits] GNU Guile branch, stable-2.0, updated. v2.0.3-36-g2db1dbf |
Date: |
Wed, 23 Nov 2011 21:19:49 +0000 |
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU Guile".
http://git.savannah.gnu.org/cgit/guile.git/commit/?id=2db1dbfe275986c4762d247209a02417818f62f8
The branch, stable-2.0 has been updated
via 2db1dbfe275986c4762d247209a02417818f62f8 (commit)
via 1c1f7a3223bbeb3d593bfb3e93777e47faf09012 (commit)
from f701287497d545061009ad572c69f86bb10d7a6a (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 2db1dbfe275986c4762d247209a02417818f62f8
Author: Ludovic Courtès <address@hidden>
Date: Wed Nov 23 22:19:40 2011 +0100
Update cross-compilation instructions.
* README (Cross building Guile): Update.
commit 1c1f7a3223bbeb3d593bfb3e93777e47faf09012
Author: Ludovic Courtès <address@hidden>
Date: Wed Nov 23 22:05:53 2011 +0100
configure: Make sure $GUILE_FOR_BUILD is suitable.
* acinclude.m4 (GUILE_CHECK_VERSION, GUILE_CHECK_GUILE_FOR_BUILD): New
macros.
* configure.ac: Remove $GUILE_FOR_BUILD tests. Use
`GUILE_CHECK_GUILE_FOR_BUILD'.
-----------------------------------------------------------------------
Summary of changes:
README | 23 +++++++++++++----------
acinclude.m4 | 50 ++++++++++++++++++++++++++++++++++++++++++++++++++
configure.ac | 15 +--------------
3 files changed, 64 insertions(+), 24 deletions(-)
diff --git a/README b/README
index 256b7d0..66f02b3 100644
--- a/README
+++ b/README
@@ -239,25 +239,28 @@ switches specific to Guile you may find useful in some
circumstances.
Cross building Guile =====================================================
-As of guile-1.5.x, the build process uses compiled C files for
-snarfing, and (indirectly, through libtool) for linking, and uses the
-guile executable for generating documentation.
+As of Guile 2.0.x, the build process produces a library, libguile-2.0,
+along with Guile "object files" containing bytecode to be interpreted by
+Guile's virtual machine. The bytecode format depends on the endianness
+and word size of the host CPU.
-When cross building guile, you first need to configure, build and
-install guile for your build host.
+Thus, when cross building Guile, you first need to configure, build and
+install it for your build host.
-Then, you may configure guile for cross building, eg:
+Then, you may configure Guile for cross building:
./configure --host=i686-pc-cygwin --disable-shared
-A C compiler for the build system is required. The default is
-"PATH=/usr/bin:$PATH cc". If that doesn't suit it can be specified
-with the CC_FOR_BUILD variable in the usual way, for instance
+A C compiler for the build system is required. If that doesn't suit it
+can be specified with the CC_FOR_BUILD variable in the usual way, for
+instance:
./configure --host=m68k-unknown-linux-gnu CC_FOR_BUILD=/my/local/gcc
Guile for the build system can be specified similarly with the
-GUILE_FOR_BUILD variable, it defaults to just "guile".
+GUILE_FOR_BUILD variable, which defaults to whatever `guile' executable
+is found in $PATH. It must have the exact same version has the Guile
+that you intend to cross-build.
Using Guile Without Installing It =========================================
diff --git a/acinclude.m4 b/acinclude.m4
index ba17e93..f9603d9 100644
--- a/acinclude.m4
+++ b/acinclude.m4
@@ -530,6 +530,56 @@ AC_DEFUN([GUILE_UNISTRING_ICONVEH_VALUES], [
GUILE_UNISTRING_CONSTANT([iconveh_escape_sequence])
])
+dnl GUILE_CHECK_VERSION
+dnl
+dnl Ensure that $GUILE_FOR_BUILD has the same version as ourselves.
+AC_DEFUN([GUILE_CHECK_VERSION], [
+ if ! "$GUILE_FOR_BUILD" --version > /dev/null 2>&1; then
+ AC_MSG_ERROR([failed to run `$GUILE_FOR_BUILD'])
+ fi
+
+ dnl Use MAJOR.MINOR.MICRO instead of (version) so that developers can
+ dnl freely shoot themselves in the foot by using, say, 2.0.3.80 and
+ dnl 2.0.3.42.
+ AC_CACHE_CHECK([the version of $GUILE_FOR_BUILD],
+ [ac_cv_guile_for_build_version],
+ [ac_cv_guile_for_build_version="`"$GUILE_FOR_BUILD" \
+ -c '(format #t "~a.~a.~a" (major-version) (minor-version)
(micro-version))'`"
+ ])
+
+ if test "$ac_cv_guile_for_build_version" != \
+ "$GUILE_MAJOR_VERSION.$GUILE_MINOR_VERSION.$GUILE_MICRO_VERSION"
+ then
+ AC_MSG_ERROR([building Guile $PACKAGE_VERSION but `$GUILE_FOR_BUILD' has
version $ac_cv_guile_for_build_version"])
+ fi
+])
+
+dnl GUILE_CHECK_GUILE_FOR_BUILD
+dnl
+dnl When cross-compiling, ensure that $GUILE_FOR_BUILD is suitable.
+AC_DEFUN([GUILE_CHECK_GUILE_FOR_BUILD], [
+ if test "$cross_compiling" = "yes"; then
+ if test "x$GUILE_FOR_BUILD" = "x"; then
+ AC_PATH_PROG([GUILE_FOR_BUILD], [guile], [not-found])
+ if test "$GUILE_FOR_BUILD" = "not-found"; then
+ AC_MSG_ERROR([a native Guile $PACKAGE_VERSION is required to
cross-build Guile])
+ fi
+ fi
+ AC_MSG_CHECKING([guile for build])
+ AC_MSG_RESULT([$GUILE_FOR_BUILD])
+
+ dnl Since there is currently no distinction between the run-time
+ dnl search path, %load-path, and the compiler's search path,
+ dnl $GUILE_FOR_BUILD must be a native build of the very same version.
+ GUILE_CHECK_VERSION
+ else
+ GUILE_FOR_BUILD='this-value-will-never-be-used'
+ fi
+
+ AC_ARG_VAR([GUILE_FOR_BUILD], [guile for the build system])
+ AM_SUBST_NOTMAKE([GUILE_FOR_BUILD])
+])
+
dnl Declare file $1 to be a script that needs configuring,
dnl and arrange to make it executable in the process.
AC_DEFUN([GUILE_CONFIG_SCRIPT],[AC_CONFIG_FILES([$1],[chmod +x $1])])
diff --git a/configure.ac b/configure.ac
index dc4ef56..710cc2f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1511,20 +1511,7 @@ AC_SUBST(CCLD_FOR_BUILD)
HOST_CC="$CC_FOR_BUILD"
AC_SUBST(HOST_CC)
-if test "$cross_compiling" = "yes"; then
- AC_MSG_CHECKING(guile for build)
- GUILE_FOR_BUILD="${GUILE_FOR_BUILD-guile}"
-else
- GUILE_FOR_BUILD='this-value-will-never-be-used'
-fi
-
-## AC_MSG_CHECKING("if we are cross compiling")
-## AC_MSG_RESULT($cross_compiling)
-if test "$cross_compiling" = "yes"; then
- AC_MSG_RESULT($GUILE_FOR_BUILD)
-fi
-AC_ARG_VAR(GUILE_FOR_BUILD,[guile for build system])
-AM_SUBST_NOTMAKE(GUILE_FOR_BUILD)
+GUILE_CHECK_GUILE_FOR_BUILD
## If we're using GCC, ask for aggressive warnings.
GCC_CFLAGS=""
hooks/post-receive
--
GNU Guile
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Guile-commits] GNU Guile branch, stable-2.0, updated. v2.0.3-36-g2db1dbf,
Ludovic Courtès <=