emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] /srv/bzr/emacs/trunk r109082: Move GC_SETJMP_WORKS, GC_MAR


From: Glenn Morris
Subject: [Emacs-diffs] /srv/bzr/emacs/trunk r109082: Move GC_SETJMP_WORKS, GC_MARK_STACK from src/s to configure
Date: Fri, 13 Jul 2012 20:04:10 -0400
User-agent: Bazaar (2.5.0)

------------------------------------------------------------
revno: 109082
committer: Glenn Morris <address@hidden>
branch nick: trunk
timestamp: Fri 2012-07-13 20:04:10 -0400
message:
  Move GC_SETJMP_WORKS, GC_MARK_STACK from src/s to configure
  
  * configure.ac (GC_SETJMP_WORKS, GC_MARK_STACK): Move here from src/s.
  (AH_BOTTOM): Move GC_SETJMP_WORKS GCC fallback to main body.
  
  * src/s/aix4-2.h, src/s/freebsd.h, src/s/gnu-linux.h, src/s/hpux10-20.h:
  * src/s/irix6-5.h, src/s/netbsd.h, src/s/sol2-6.h, src/s/unixware.h:
  Let configure set GC_SETJMP_WORKS, GC_MARK_STACK.
modified:
  ChangeLog
  configure.ac
  src/ChangeLog
  src/s/aix4-2.h
  src/s/freebsd.h
  src/s/gnu-linux.h
  src/s/hpux10-20.h
  src/s/irix6-5.h
  src/s/netbsd.h
  src/s/sol2-6.h
  src/s/unixware.h
=== modified file 'ChangeLog'
--- a/ChangeLog 2012-07-13 21:54:35 +0000
+++ b/ChangeLog 2012-07-14 00:04:10 +0000
@@ -1,3 +1,8 @@
+2012-07-14  Glenn Morris  <address@hidden>
+
+       * configure.ac (GC_SETJMP_WORKS, GC_MARK_STACK): Move here from src/s.
+       (AH_BOTTOM): Move GC_SETJMP_WORKS GCC fallback to main body.
+
 2012-07-13  Glenn Morris  <address@hidden>
 
        * configure.ac (opsysfile): Set to empty on gnu, cygwin.

=== modified file 'configure.ac'
--- a/configure.ac      2012-07-13 21:54:35 +0000
+++ b/configure.ac      2012-07-14 00:04:10 +0000
@@ -3600,6 +3600,55 @@
 esac
 
 
+dnl These won't be used automatically yet.  We also need to know, at least,
+dnl that the stack is continuous.
+AH_TEMPLATE(GC_SETJMP_WORKS, [Define if setjmp is known to save all
+  registers relevant for conservative garbage collection in the jmp_buf.])
+
+AH_TEMPLATE(GC_MARK_STACK, [Define to GC_USE_GCPROS_AS_BEFORE if
+  conservative garbage collection is not known to work.])
+
+
+case $opsys in
+  aix4-2 | hpux* | unixware)
+    dnl Conservative garbage collection has not been tested, so for now
+    dnl play it safe and stick with the old-fashioned way of marking.
+    AC_DEFINE(GC_MARK_STACK, [GC_USE_GCPROS_AS_BEFORE])
+    ;;
+
+  dnl Not all the architectures are tested, but there are Debian packages
+  dnl for SCM and/or Guile on them, so the technique must work.  See also
+  dnl comments in alloc.c concerning setjmp and gcc.
+  dnl Fixme: it's probably safe to just use the GCC conditional below.
+  gnu-linux | gnu-kfreebsd )
+    AC_PREPROC_IFELSE([AC_LANG_PROGRAM([[
+#if defined __i386__ || defined __sparc__ || defined __mc68000__ \
+  || defined __alpha__ || defined __mips__ || defined __s390__ \
+  || defined __arm__ || defined __powerpc__ || defined __amd64__ \
+  || defined __ia64__ || defined __sh__
+/* ok */
+#else
+# error "setjmp not known to work on this arch"
+#endif
+    ]], [[]])], AC_DEFINE(GC_SETJMP_WORKS, 1),
+      AC_DEFINE(GC_MARK_STACK, [GC_USE_GCPROS_AS_BEFORE]) )
+    ;;
+esac
+
+
+if test x$GCC = xyes; then
+   dnl GC_SETJMP_WORKS is nearly always appropriate for GCC.
+   AC_DEFINE(GC_SETJMP_WORKS, 1)
+else
+  case $opsys in
+    dnl irix: Tested on Irix 6.5.  SCM worked on earlier versions.
+    freebsd | netbsd | openbsd | irix6-5 | sol2* )
+      AC_DEFINE(GC_SETJMP_WORKS, 1)
+      ;;
+  esac
+fi                              dnl GCC?
+
+
 dnl Used in xfaces.c.
 case $opsys in
   hpux* | sol2* )
@@ -4221,15 +4270,6 @@
 #undef noinline
 #endif
 
-/* These won't be used automatically yet.  We also need to know, at least,
-   that the stack is continuous.  */
-#ifdef __GNUC__
-#  ifndef GC_SETJMP_WORKS
-  /* GC_SETJMP_WORKS is nearly always appropriate for GCC.  */
-#    define GC_SETJMP_WORKS 1
-#  endif
-#endif
-
 #endif /* EMACS_CONFIG_H */
 
 /*

=== modified file 'src/ChangeLog'
--- a/src/ChangeLog     2012-07-13 21:54:35 +0000
+++ b/src/ChangeLog     2012-07-14 00:04:10 +0000
@@ -1,3 +1,9 @@
+2012-07-14  Glenn Morris  <address@hidden>
+
+       * s/aix4-2.h, s/freebsd.h, s/gnu-linux.h, s/hpux10-20.h:
+       * s/irix6-5.h, s/netbsd.h, s/sol2-6.h, s/unixware.h:
+       Let configure set GC_SETJMP_WORKS, GC_MARK_STACK.
+
 2012-07-13  Glenn Morris  <address@hidden>
 
        * s/gnu-linux.h (GC_MARK_SECONDARY_STACK): Let configure set it.

=== modified file 'src/s/aix4-2.h'
--- a/src/s/aix4-2.h    2012-07-13 02:34:05 +0000
+++ b/src/s/aix4-2.h    2012-07-14 00:04:10 +0000
@@ -19,6 +19,3 @@
 /* Perry Smith <address@hidden> says these are correct.  */
 #undef sigmask
 
-/* Conservative garbage collection has not been tested, so for now
-   play it safe and stick with the old-fashioned way of marking.  */
-#define GC_MARK_STACK GC_USE_GCPROS_AS_BEFORE

=== modified file 'src/s/freebsd.h'
--- a/src/s/freebsd.h   2012-07-13 02:38:30 +0000
+++ b/src/s/freebsd.h   2012-07-14 00:04:10 +0000
@@ -20,6 +20,3 @@
 You should have received a copy of the GNU General Public License
 along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
 
-/* Tell that garbage collector that setjmp is known to save all
-   registers relevant for conservative garbage collection in the jmp_buf.  */
-#define GC_SETJMP_WORKS 1

=== modified file 'src/s/gnu-linux.h'
--- a/src/s/gnu-linux.h 2012-07-13 21:54:35 +0000
+++ b/src/s/gnu-linux.h 2012-07-14 00:04:10 +0000
@@ -20,18 +20,3 @@
 You should have received a copy of the GNU General Public License
 along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
 
-/* Tell that garbage collector that setjmp is known to save all
-   registers relevant for conservative garbage collection in the jmp_buf.
-   Not all the architectures are tested, but there are Debian packages
-   for SCM and/or Guile on them, so the technique must work.  See also
-   comments in alloc.c concerning setjmp and gcc.  Fixme:  it's
-   probably safe to just let the GCC conditional in AH_BOTTOM handle this.
-*/
-#if defined __i386__ || defined __sparc__ || defined __mc68000__ \
-    || defined __alpha__ || defined __mips__ || defined __s390__ \
-    || defined __arm__ || defined __powerpc__ || defined __amd64__ \
-    || defined __ia64__ || defined __sh__
-#define GC_SETJMP_WORKS 1
-#else
-#define GC_MARK_STACK GC_USE_GCPROS_AS_BEFORE
-#endif

=== modified file 'src/s/hpux10-20.h'
--- a/src/s/hpux10-20.h 2012-07-13 02:34:05 +0000
+++ b/src/s/hpux10-20.h 2012-07-14 00:04:10 +0000
@@ -25,7 +25,3 @@
    Note we also undef HAVE_RANDOM via configure.  */
 #undef srandom
 #undef random
-
-/* Conservative garbage collection has not been tested, so for now
-   play it safe and stick with the old-fashioned way of marking.  */
-#define GC_MARK_STACK GC_USE_GCPROS_AS_BEFORE

=== modified file 'src/s/irix6-5.h'
--- a/src/s/irix6-5.h   2012-07-13 21:45:55 +0000
+++ b/src/s/irix6-5.h   2012-07-14 00:04:10 +0000
@@ -30,5 +30,3 @@
 
 #undef TIOCSIGSEND             /* defined in usg5-4-common.h */
 
-/* Tested on Irix 6.5.  SCM worked on earlier versions.  */
-#define GC_SETJMP_WORKS 1

=== modified file 'src/s/netbsd.h'
--- a/src/s/netbsd.h    2012-07-13 02:38:30 +0000
+++ b/src/s/netbsd.h    2012-07-14 00:04:10 +0000
@@ -22,6 +22,3 @@
    that are handled with CPP __RENAME() macro in signal.h.  */
 #include <signal.h>
 
-/* Tell that garbage collector that setjmp is known to save all
-   registers relevant for conservative garbage collection in the jmp_buf.  */
-#define GC_SETJMP_WORKS 1

=== modified file 'src/s/sol2-6.h'
--- a/src/s/sol2-6.h    2012-07-13 02:34:05 +0000
+++ b/src/s/sol2-6.h    2012-07-14 00:04:10 +0000
@@ -19,4 +19,3 @@
 
 #include "usg5-4-common.h"
 
-#define GC_SETJMP_WORKS 1

=== modified file 'src/s/unixware.h'
--- a/src/s/unixware.h  2012-07-12 07:43:05 +0000
+++ b/src/s/unixware.h  2012-07-14 00:04:10 +0000
@@ -17,9 +17,4 @@
 You should have received a copy of the GNU General Public License
 along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
 
-
 #include "usg5-4-common.h"
-
-/* Conservative garbage collection has not been tested, so for now
-   play it safe and stick with the old-fashioned way of marking.  */
-#define GC_MARK_STACK GC_USE_GCPROS_AS_BEFORE


reply via email to

[Prev in Thread] Current Thread [Next in Thread]