From: Taylor R Campbell Date: Sat, 5 Oct 2013 19:59:04 +0000 (+0000) Subject: Make cross-compilation a configure-time option. X-Git-Tag: release-9.2.0~100^2~9 X-Git-Url: https://birchwood-abbey.net/git?a=commitdiff_plain;h=3c13b7eddfde1f547bc72ca4cf16b7554a92a43e;p=mit-scheme.git Make cross-compilation a configure-time option. Eventually I would like to get rid of non-cross-compilation, but it's probably a good idea to keep it for now. --- diff --git a/src/Makefile.in b/src/Makefile.in index afbb7177a..65ed9129c 100644 --- a/src/Makefile.in +++ b/src/Makefile.in @@ -94,13 +94,15 @@ all-native: compile-ssp all-native: compile-star-parser all-native: compile-win32 all-native: compile-xml -all-native: cross-end +@CROSS@all-native: cross-end + +@CROSS@COMPILER_SETTINGS = (set! compiler:cross-compiling? true) HOST_SCHEME = '$(MIT_SCHEME_EXE)' --batch-mode BOOTSTRAP_COMPILER = $(BOOTSTRAP_TOOLCHAIN) BOOTSTRAP_SYNTAXER = $(HOST_SCHEME) --band ./boot/syntaxer.com BOOTSTRAP_TOOLCHAIN = $(HOST_SCHEME) --band ./boot/compiler.com \ - --eval '(set! compiler:cross-compiling? true)' + --eval '(begin $(COMPILER_SETTINGS))' .PHONY: bootstrap-toolchain bootstrap-toolchain: boot/compiler.com @@ -114,7 +116,7 @@ boot/syntaxer.com: microcode/scheme: compile-microcode lib/runtime.com: compile-runtime -lib/runtime.com: cross-end +@CROSS@lib/runtime.com: cross-end lib/runtime.com: microcode/scheme (. etc/functions.sh && get_fasl_file && cd runtime \ && (echo '(disk-save "../$@")' \ diff --git a/src/configure.ac b/src/configure.ac index 33403dd1b..41aa4f345 100644 --- a/src/configure.ac +++ b/src/configure.ac @@ -54,6 +54,16 @@ else : ${enable_host_scheme_test=yes} fi +AC_ARG_ENABLE([cross-compiling], + AS_HELP_STRING([--enable-cross-compiling], + [Cross-compile scheme, even if to the same target])) +: ${enable_cross_compiling=no} +if test "x$enable_cross_compiling" = xyes; then + CROSS= +else + CROSS=\# +fi + AC_ARG_WITH([default-target], AS_HELP_STRING([--with-default-target], [Set the default make target [[all]]])) @@ -156,6 +166,7 @@ AC_SUBST([INSTALL_LIARC_BUNDLES]) AC_SUBST([MIT_SCHEME_EXE]) AC_SUBST([AUXDIR_NAME]) AC_SUBST([AUXDIR]) +AC_SUBST([CROSS]) AC_PROG_INSTALL AC_PROG_LN_S