aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGlenn Morris2012-07-13 20:04:10 -0400
committerGlenn Morris2012-07-13 20:04:10 -0400
commit5b3f250f88e2bf2abd8b5af553b7643d3cdcc782 (patch)
treeb9b19f2d8ebbbdc59409e5ea32626881b2aca2c7
parent5b63334279790dfee1da5a7ffb83630fb8202a87 (diff)
downloademacs-5b3f250f88e2bf2abd8b5af553b7643d3cdcc782.tar.gz
emacs-5b3f250f88e2bf2abd8b5af553b7643d3cdcc782.zip
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.
-rw-r--r--ChangeLog5
-rw-r--r--configure.ac58
-rw-r--r--src/ChangeLog6
-rw-r--r--src/s/aix4-2.h3
-rw-r--r--src/s/freebsd.h3
-rw-r--r--src/s/gnu-linux.h15
-rw-r--r--src/s/hpux10-20.h4
-rw-r--r--src/s/irix6-5.h2
-rw-r--r--src/s/netbsd.h3
-rw-r--r--src/s/sol2-6.h1
-rw-r--r--src/s/unixware.h5
11 files changed, 60 insertions, 45 deletions
diff --git a/ChangeLog b/ChangeLog
index 54159560e5d..cb7d197c8d1 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
12012-07-14 Glenn Morris <rgm@gnu.org>
2
3 * configure.ac (GC_SETJMP_WORKS, GC_MARK_STACK): Move here from src/s.
4 (AH_BOTTOM): Move GC_SETJMP_WORKS GCC fallback to main body.
5
12012-07-13 Glenn Morris <rgm@gnu.org> 62012-07-13 Glenn Morris <rgm@gnu.org>
2 7
3 * configure.ac (opsysfile): Set to empty on gnu, cygwin. 8 * configure.ac (opsysfile): Set to empty on gnu, cygwin.
diff --git a/configure.ac b/configure.ac
index ed500dd6ea8..a553c340b85 100644
--- a/configure.ac
+++ b/configure.ac
@@ -3600,6 +3600,55 @@ case $opsys in
3600esac 3600esac
3601 3601
3602 3602
3603dnl These won't be used automatically yet. We also need to know, at least,
3604dnl that the stack is continuous.
3605AH_TEMPLATE(GC_SETJMP_WORKS, [Define if setjmp is known to save all
3606 registers relevant for conservative garbage collection in the jmp_buf.])
3607
3608AH_TEMPLATE(GC_MARK_STACK, [Define to GC_USE_GCPROS_AS_BEFORE if
3609 conservative garbage collection is not known to work.])
3610
3611
3612case $opsys in
3613 aix4-2 | hpux* | unixware)
3614 dnl Conservative garbage collection has not been tested, so for now
3615 dnl play it safe and stick with the old-fashioned way of marking.
3616 AC_DEFINE(GC_MARK_STACK, [GC_USE_GCPROS_AS_BEFORE])
3617 ;;
3618
3619 dnl Not all the architectures are tested, but there are Debian packages
3620 dnl for SCM and/or Guile on them, so the technique must work. See also
3621 dnl comments in alloc.c concerning setjmp and gcc.
3622 dnl Fixme: it's probably safe to just use the GCC conditional below.
3623 gnu-linux | gnu-kfreebsd )
3624 AC_PREPROC_IFELSE([AC_LANG_PROGRAM([[
3625#if defined __i386__ || defined __sparc__ || defined __mc68000__ \
3626 || defined __alpha__ || defined __mips__ || defined __s390__ \
3627 || defined __arm__ || defined __powerpc__ || defined __amd64__ \
3628 || defined __ia64__ || defined __sh__
3629/* ok */
3630#else
3631# error "setjmp not known to work on this arch"
3632#endif
3633 ]], [[]])], AC_DEFINE(GC_SETJMP_WORKS, 1),
3634 AC_DEFINE(GC_MARK_STACK, [GC_USE_GCPROS_AS_BEFORE]) )
3635 ;;
3636esac
3637
3638
3639if test x$GCC = xyes; then
3640 dnl GC_SETJMP_WORKS is nearly always appropriate for GCC.
3641 AC_DEFINE(GC_SETJMP_WORKS, 1)
3642else
3643 case $opsys in
3644 dnl irix: Tested on Irix 6.5. SCM worked on earlier versions.
3645 freebsd | netbsd | openbsd | irix6-5 | sol2* )
3646 AC_DEFINE(GC_SETJMP_WORKS, 1)
3647 ;;
3648 esac
3649fi dnl GCC?
3650
3651
3603dnl Used in xfaces.c. 3652dnl Used in xfaces.c.
3604case $opsys in 3653case $opsys in
3605 hpux* | sol2* ) 3654 hpux* | sol2* )
@@ -4221,15 +4270,6 @@ AH_BOTTOM([
4221#undef noinline 4270#undef noinline
4222#endif 4271#endif
4223 4272
4224/* These won't be used automatically yet. We also need to know, at least,
4225 that the stack is continuous. */
4226#ifdef __GNUC__
4227# ifndef GC_SETJMP_WORKS
4228 /* GC_SETJMP_WORKS is nearly always appropriate for GCC. */
4229# define GC_SETJMP_WORKS 1
4230# endif
4231#endif
4232
4233#endif /* EMACS_CONFIG_H */ 4273#endif /* EMACS_CONFIG_H */
4234 4274
4235/* 4275/*
diff --git a/src/ChangeLog b/src/ChangeLog
index b7736ae5db6..6571030039c 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,9 @@
12012-07-14 Glenn Morris <rgm@gnu.org>
2
3 * s/aix4-2.h, s/freebsd.h, s/gnu-linux.h, s/hpux10-20.h:
4 * s/irix6-5.h, s/netbsd.h, s/sol2-6.h, s/unixware.h:
5 Let configure set GC_SETJMP_WORKS, GC_MARK_STACK.
6
12012-07-13 Glenn Morris <rgm@gnu.org> 72012-07-13 Glenn Morris <rgm@gnu.org>
2 8
3 * s/gnu-linux.h (GC_MARK_SECONDARY_STACK): Let configure set it. 9 * s/gnu-linux.h (GC_MARK_SECONDARY_STACK): Let configure set it.
diff --git a/src/s/aix4-2.h b/src/s/aix4-2.h
index debc9f78c16..6c881a7fb8c 100644
--- a/src/s/aix4-2.h
+++ b/src/s/aix4-2.h
@@ -19,6 +19,3 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
19/* Perry Smith <pedz@ddivt1.austin.ibm.com> says these are correct. */ 19/* Perry Smith <pedz@ddivt1.austin.ibm.com> says these are correct. */
20#undef sigmask 20#undef sigmask
21 21
22/* Conservative garbage collection has not been tested, so for now
23 play it safe and stick with the old-fashioned way of marking. */
24#define GC_MARK_STACK GC_USE_GCPROS_AS_BEFORE
diff --git a/src/s/freebsd.h b/src/s/freebsd.h
index ff31f073427..9177403f426 100644
--- a/src/s/freebsd.h
+++ b/src/s/freebsd.h
@@ -20,6 +20,3 @@ GNU General Public License for more details.
20You should have received a copy of the GNU General Public License 20You should have received a copy of the GNU General Public License
21along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ 21along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
22 22
23/* Tell that garbage collector that setjmp is known to save all
24 registers relevant for conservative garbage collection in the jmp_buf. */
25#define GC_SETJMP_WORKS 1
diff --git a/src/s/gnu-linux.h b/src/s/gnu-linux.h
index 0a083fe3f15..2847fd6d19c 100644
--- a/src/s/gnu-linux.h
+++ b/src/s/gnu-linux.h
@@ -20,18 +20,3 @@ GNU General Public License for more details.
20You should have received a copy of the GNU General Public License 20You should have received a copy of the GNU General Public License
21along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ 21along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
22 22
23/* Tell that garbage collector that setjmp is known to save all
24 registers relevant for conservative garbage collection in the jmp_buf.
25 Not all the architectures are tested, but there are Debian packages
26 for SCM and/or Guile on them, so the technique must work. See also
27 comments in alloc.c concerning setjmp and gcc. Fixme: it's
28 probably safe to just let the GCC conditional in AH_BOTTOM handle this.
29*/
30#if defined __i386__ || defined __sparc__ || defined __mc68000__ \
31 || defined __alpha__ || defined __mips__ || defined __s390__ \
32 || defined __arm__ || defined __powerpc__ || defined __amd64__ \
33 || defined __ia64__ || defined __sh__
34#define GC_SETJMP_WORKS 1
35#else
36#define GC_MARK_STACK GC_USE_GCPROS_AS_BEFORE
37#endif
diff --git a/src/s/hpux10-20.h b/src/s/hpux10-20.h
index c913062701a..94b46a715ea 100644
--- a/src/s/hpux10-20.h
+++ b/src/s/hpux10-20.h
@@ -25,7 +25,3 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
25 Note we also undef HAVE_RANDOM via configure. */ 25 Note we also undef HAVE_RANDOM via configure. */
26#undef srandom 26#undef srandom
27#undef random 27#undef random
28
29/* Conservative garbage collection has not been tested, so for now
30 play it safe and stick with the old-fashioned way of marking. */
31#define GC_MARK_STACK GC_USE_GCPROS_AS_BEFORE
diff --git a/src/s/irix6-5.h b/src/s/irix6-5.h
index 1d1989ad9ac..9b215845461 100644
--- a/src/s/irix6-5.h
+++ b/src/s/irix6-5.h
@@ -30,5 +30,3 @@ char *_getpty();
30 30
31#undef TIOCSIGSEND /* defined in usg5-4-common.h */ 31#undef TIOCSIGSEND /* defined in usg5-4-common.h */
32 32
33/* Tested on Irix 6.5. SCM worked on earlier versions. */
34#define GC_SETJMP_WORKS 1
diff --git a/src/s/netbsd.h b/src/s/netbsd.h
index b0e298f2c2e..7a571ee8116 100644
--- a/src/s/netbsd.h
+++ b/src/s/netbsd.h
@@ -22,6 +22,3 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
22 that are handled with CPP __RENAME() macro in signal.h. */ 22 that are handled with CPP __RENAME() macro in signal.h. */
23#include <signal.h> 23#include <signal.h>
24 24
25/* Tell that garbage collector that setjmp is known to save all
26 registers relevant for conservative garbage collection in the jmp_buf. */
27#define GC_SETJMP_WORKS 1
diff --git a/src/s/sol2-6.h b/src/s/sol2-6.h
index 78d13f2063d..3bed55598b7 100644
--- a/src/s/sol2-6.h
+++ b/src/s/sol2-6.h
@@ -19,4 +19,3 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
19 19
20#include "usg5-4-common.h" 20#include "usg5-4-common.h"
21 21
22#define GC_SETJMP_WORKS 1
diff --git a/src/s/unixware.h b/src/s/unixware.h
index f42e6363245..59c74a56f4e 100644
--- a/src/s/unixware.h
+++ b/src/s/unixware.h
@@ -17,9 +17,4 @@ GNU General Public License for more details.
17You should have received a copy of the GNU General Public License 17You should have received a copy of the GNU General Public License
18along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ 18along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
19 19
20
21#include "usg5-4-common.h" 20#include "usg5-4-common.h"
22
23/* Conservative garbage collection has not been tested, so for now
24 play it safe and stick with the old-fashioned way of marking. */
25#define GC_MARK_STACK GC_USE_GCPROS_AS_BEFORE