changeset 3710:1220a9158bc1

make building 64-bit Windows binaries independent from enabling 64-bit indexing in Octave
author John W. Eaton <jwe@octave.org>
date Sun, 07 Sep 2014 06:42:40 -0400
parents c8546fe79bc9
children d0aee8d2e4f4
files Makefile.in configure.ac src/build-gcc.mk src/native-gcc.mk
diffstat 4 files changed, 23 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- 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
--- 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,
--- 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
--- 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