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

Re: Latest version, compiling on FreeBSD

> I just checked Clisp-19940901 on FreeBSD-2.1-951005-SNAP, using
> gcc-2.7.0 and it just works when sys_errlist is handled. There are
> many places where FreeBSD (and NetBSD) chose to change datatypes, so
> warnings about signed/unsigned operations are common. The testsuite
> failes with floating point underflow, which may be related to
> FreeBSD's barfink on FP exceptions. I am going to try a more rescent
> release of Clisp.

I think there was a recent bug report about this and that it was a bug
with gcc-2.7.0.

Using clisp-1995-06-23 and gcc-2.7.1 I found that clisp compiles and
passes the tests without change under both NetBSD 1.1 and FreeBSD 2.1.

I briefly tried the most recent version of clisp but had trouble with
the configure scripts.

I also have CLISP running under both NetBSD 1.1 and FreeBSD 2.1 using
generational GC.  This requires an addition to the src/unix.d file of
clisp and appropriate kernel configurations - details below:

Douglas Crosher

CLISP patch relative to clisp-06-23

*** src/unix.d.orig	Thu Jun 15 06:23:20 1995
--- src/unix.d	Mon Nov 27 02:08:17 1995
*** 270,275 ****
--- 270,285 ----
      #define CAN_HANDLE_WP_FAULT
+   #if defined(__NetBSD__) || defined(__FreeBSD__)
+     #define FAULT_HANDLER_ARGLIST  sig, code, scp, addr
+     #define FAULT_HANDLER_ARGDECL  int sig; int code; void* scp; char* addr;
+     #define FAULT_ADDRESS  addr
+     #define CAN_HANDLE_WP_FAULT
+     #if defined(__FreeBSD__)
+ 	#define PROT_NONE 0x00
+     #endif	
+   #endif
    #if defined(UNIX_SUNOS5)
      #include <siginfo.h>
      #define FAULT_HANDLER_ARGLIST  sig, sip, ucp

Kernel configuration

To use generational GC under FreeBSD 2.1 and NetBSD 1.1 requires the
appropriate configuration of the kernel and in the case of NetBSD a
small kernel hack:

1. For clisp to use shared memory and thus generational GC the size of
SHMSEG needs to be increased.

To do this under FreeBSD 2.1, just add the following line to your
config file:
options		"SHMSEG=200"

Under NetBSD 1.1, edit the param.c file in the compile directory; you
may need to run 'make param.c' first.

2. Further to use generational GC under NetBSD requires a small hack
to the kernel. The following two patches, against NetBSD 1.1 kernel
sources, add the ability to return the address of a protection
fault. Note: this is compatible with the FreeBSD implementation, and
is also useful with gcl to implement SGC.

*** i386/machdep.c.orig	Mon Oct 16 12:43:28 1995
--- i386/machdep.c	Mon Nov 13 03:07:46 1995
*** 532,537 ****
--- 532,538 ----
  	frame.sf_code = code;
  	frame.sf_scp = &fp->sf_sc;
+ 	frame.sf_addr = (char *)rcr2();
  	frame.sf_handler = catcher;

*** include/frame.h.orig	Sat Oct 14 11:57:34 1995
--- include/frame.h	Mon Nov 13 03:09:01 1995
*** 117,122 ****
--- 117,123 ----
  	int	sf_signum;
  	int	sf_code;
  	struct	sigcontext *sf_scp;
+ 	char    *sf_addr;
  	sig_t	sf_handler;
  	struct	sigcontext sf_sc;