1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-11-24 07:20:37 +00:00

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.
This commit is contained in:
Glenn Morris 2012-07-13 20:04:10 -04:00
parent 5b63334279
commit 5b3f250f88
11 changed files with 60 additions and 45 deletions

View File

@ -1,3 +1,8 @@
2012-07-14 Glenn Morris <rgm@gnu.org>
* 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 <rgm@gnu.org>
* configure.ac (opsysfile): Set to empty on gnu, cygwin.

View File

@ -3600,6 +3600,55 @@ case $opsys in
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 @@ AH_BOTTOM([
#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 */
/*

View File

@ -1,3 +1,9 @@
2012-07-14 Glenn Morris <rgm@gnu.org>
* 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 <rgm@gnu.org>
* s/gnu-linux.h (GC_MARK_SECONDARY_STACK): Let configure set it.

View File

@ -19,6 +19,3 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
/* Perry Smith <pedz@ddivt1.austin.ibm.com> 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

View File

@ -20,6 +20,3 @@ GNU General Public License for more details.
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

View File

@ -20,18 +20,3 @@ GNU General Public License for more details.
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

View File

@ -25,7 +25,3 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
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

View File

@ -30,5 +30,3 @@ char *_getpty();
#undef TIOCSIGSEND /* defined in usg5-4-common.h */
/* Tested on Irix 6.5. SCM worked on earlier versions. */
#define GC_SETJMP_WORKS 1

View File

@ -22,6 +22,3 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
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

View File

@ -19,4 +19,3 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
#include "usg5-4-common.h"
#define GC_SETJMP_WORKS 1

View File

@ -17,9 +17,4 @@ GNU General Public License for more details.
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