]> code.delx.au - gnu-emacs/commitdiff
Don't use USE_STACK_LISP_OBJECTS on Windows with GCC older than 4.2.
authorEli Zaretskii <eliz@gnu.org>
Thu, 25 Sep 2014 17:49:02 +0000 (20:49 +0300)
committerEli Zaretskii <eliz@gnu.org>
Thu, 25 Sep 2014 17:49:02 +0000 (20:49 +0300)
 src/lisp.h (USE_STACK_LISP_OBJECTS): Default to false for 32-bit
 MinGW builds that use GCC before 4.2.

Fixes: debbugs:18559
src/ChangeLog
src/lisp.h

index 9c360e64de0c4eb41ce23d2c85851529e4eefcd8..87d33121495e45bd196c143333534f181a94b1f0 100644 (file)
@@ -1,5 +1,8 @@
 2014-09-25  Eli Zaretskii  <eliz@gnu.org>
 
+       * lisp.h (USE_STACK_LISP_OBJECTS): Default to false for 32-bit
+       MinGW builds that use GCC before 4.2.
+
        Default to stack objects on DOS_NT platforms as well.
        * w32term.h (ALIGN_STACK) [__GNUC__]: Define to
        __attribute__((force_align_arg_pointer)) for GCC 4.2 and later.
index 82a99fcca343bea60a9b0a8b4c5b9cdc2875ed8f..b1f793c72820a568a1dd455f6a5dd089c14399c0 100644 (file)
@@ -286,7 +286,13 @@ error !;
    http://lists.gnu.org/archive/html/emacs-devel/2014-09/msg00506.html.  */
 #ifndef USE_STACK_LISP_OBJECTS
 # if defined __GNUC__ && !defined __clang__
-#  define USE_STACK_LISP_OBJECTS true
+   /* 32-bit MinGW builds need at least GCC 4.2 to support this.  */
+#  if defined __MINGW32__ && !defined _W64     \
+      && __GNUC__ + (__GNUC_MINOR__ > 1) < 5
+#   define USE_STACK_LISP_OBJECTS false
+#  else         /* !(__MINGW32__ && __GNUC__ < 4.2) */
+#   define USE_STACK_LISP_OBJECTS true
+#  endif
 # else
 #  define USE_STACK_LISP_OBJECTS false
 # endif