# HG changeset patch # User John W. Eaton # Date 1410086560 14400 # Node ID 1220a9158bc19fc4b2010b24bcaf7bc05a81d5b2 # Parent c8546fe79bc9d1ee6cd20929fdb6766316ddb039 make building 64-bit Windows binaries independent from enabling 64-bit indexing in Octave diff -r c8546fe79bc9 -r 1220a9158bc1 Makefile.in --- a/Makefile.in Thu Sep 04 16:30:14 2014 -0400 +++ b/Makefile.in Sun Sep 07 06:42:40 2014 -0400 @@ -41,8 +41,16 @@ # on your system (default is yes if doing native build). USE_SYSTEM_FONTCONFIG := @USE_SYSTEM_FONTCONFIG@ +# Build compiler for 64-bit Windows. Using this option will build +# binaries that require a 64-bit Windows system. +ENABLE_WINDOWS_64 := @ENABLE_WINDOWS_64@ + # Attempt to build Octave and dependencies with 64-bit indexing # enabled (experimental; requires 64-bit system and compiler). +# Note that 64-bit indexing is NOT required simply because you have +# 64-bit operating system. Building Octave with 64-bit indexing is +# still experimental, so enabling this option is discouraged unless +# you know what you are doing. ENABLE_64 := @ENABLE_64@ # Should match what config.guess prints for your system. @@ -50,7 +58,7 @@ ifeq ($(MXE_NATIVE_BUILD),yes) TARGET := $(shell tools/config.guess) else - ifeq ($(ENABLE_64),yes) + ifeq ($(ENABLE_WINDOWS_64),yes) TARGET := x86_64-w64-mingw32 else TARGET := i686-w64-mingw32 diff -r c8546fe79bc9 -r 1220a9158bc1 configure.ac --- a/configure.ac Thu Sep 04 16:30:14 2014 -0400 +++ b/configure.ac Sun Sep 07 06:42:40 2014 -0400 @@ -53,14 +53,25 @@ esac AC_SUBST(SHELL) -### If possible, use a 64-bit integer type for array dimensions and indexing. +ENABLE_WINDOWS_64=no +AC_ARG_ENABLE(windows-64, + [AS_HELP_STRING([--enable-windows-64], + [build a Windows 64 cross compiler; resulting build will work only on 64-bit Windows systems])], + [if test "$enableval" = yes; then ENABLE_WINDOWS_64=yes; fi], []) ENABLE_64=no AC_ARG_ENABLE(64, [AS_HELP_STRING([--enable-64], [(EXPERIMENTAL) use 64-bit integers for array dimensions and indexing])], [if test "$enableval" = yes; then ENABLE_64=yes; fi], []) + +if test "$ENABLE_64" = yes && test "$ENABLE_WINDOWS_64" = no; then + AC_MSG_WARN([--enable-64 implies --enable-windows-64]) + ENABLE_WINDOWS_64=yes +fi + AC_SUBST(ENABLE_64) +AC_SUBST(ENABLE_WINDOWS_64) BUILD_SHARED=yes AC_ARG_ENABLE(shared, diff -r c8546fe79bc9 -r 1220a9158bc1 src/build-gcc.mk --- a/src/build-gcc.mk Thu Sep 04 16:30:14 2014 -0400 +++ b/src/build-gcc.mk Sun Sep 07 06:42:40 2014 -0400 @@ -34,7 +34,7 @@ --disable-win32-registry \ --with-native-system-header-dir='/include' \ --enable-threads=win32 - ifneq ($(ENABLE_64),yes) + ifneq ($(TARGET),x86_64-w64-mingw32) $(PKG)_SYSDEP_CONFIGURE_OPTIONS += \ --disable-sjlj-exceptions endif diff -r c8546fe79bc9 -r 1220a9158bc1 src/native-gcc.mk --- a/src/native-gcc.mk Thu Sep 04 16:30:14 2014 -0400 +++ b/src/native-gcc.mk Sun Sep 07 06:42:40 2014 -0400 @@ -26,7 +26,7 @@ --disable-win32-registry \ --with-native-system-header-dir='$(HOST_PREFIX)/include' \ --enable-threads=win32 - ifneq ($(ENABLE_64),yes) + ifneq ($(ENABLE_WINDOWS_64),yes) $(PKG)_SYSDEP_CONFIGURE_OPTIONS += \ --disable-sjlj-exceptions endif