gcl-devel
[Top][All Lists]
Advanced

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

Re: [Gcl-devel] FreeBSD fixes to HEAD for GCL


From: Camm Maguire
Subject: Re: [Gcl-devel] FreeBSD fixes to HEAD for GCL
Date: 07 Nov 2003 11:58:39 -0500
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2

Greetings!  At last my feedback on your submission -- my apologies for
the delay.

Mark Murray <address@hidden> writes:

> Hi
> 
> Enclosed are some FreeBSD fixes to HEAD for GCL. Please check them
> over carefully! :-)
> 
> The job I did on the *.in files is a bit of a hack, as I'm not
> particularly familiar with autoconf/automake. I'll happily incorporate
> and test any bits you throw back at me.

OK, would be great if we can synchronize on one tree.

> 
> Locally, I remove gmp3/ to avoid the forking problem, to get a
> shared libgmp, and because FreeBSD's libgmp port is well maintained.
> It also cuts down on clutter when the port gets rebuilt.
> 

As previously discussed, the following is absolutely critical for
gcl/gmp stability, though perhaps only when using
SET-GMP-ALLOCATE-RELOCATABLE, which is not on by default:

in mpn_mul_n in file gmp3/generic/mul_n.c:

       /* Use workspace of unknown size in heap, as stack space may
-       * be limited.  Since n is at least MUL_TOOM3_THRESHOLD, the
+       * be limited.  Since n is at least TOOM3_MUL_THRESHOLD, the
        * multiplication will take much longer than malloc()/free().  */
       mp_limb_t wsLen, *ws;
       wsLen = MPN_TOOM3_MUL_N_TSIZE (n);
+#ifdef BAD_ALLOCA
       ws = __GMP_ALLOCATE_FUNC_LIMBS ((size_t) wsLen);
+#else
+      ws = TMP_ALLOC ((size_t) wsLen * sizeof(mp_limb_t));
+#endif
       mpn_toom3_mul_n (p, a, b, n, ws);
+#ifdef BAD_ALLOCA
       __GMP_FREE_FUNC_LIMBS (ws, (size_t) wsLen);
+#endif


GCL has a --enable-dynsysgmp option, which Debian uses by default, and
which when selected, compiles only this patch, and inserts it in
preference to the code in the dynamic lib via the following link
command line:

gcc -o raw_gcl  -L.  -u __gmpn_toom3_mul_n ...(patched archhive).a... -lgmp ...

The whole gmp3 tree is included 1) only for those users without
external gmp3 libs, and 2) to make use of gmp3's configure mechanism
in compiling the patched file.  I strongly recommend the BSD gcl build
get this code in somehow.  Otherwise, especially if bignums are set
relocateable for performance reasons, the alloc could trigger a GBC
call which would move the bignum body elsewhere.  It may be possible
to eliminate this patch when not using relocateable bignums, but this
has not been thoroughly tested.  In such a case, I'd at least
recommend removing the SET-GMP-ALLOCATE-RELOCATABLE function.  Perhaps
if you don't like the patch, we could put in an #ifdef in the
FreeBSD.h file skipping this function definition.

> I'm happy to say that the latest gmp3 works without the GCL patches,
> as tested by (in MAXIMA) calculating 10000!. If there are some better
> tests, please let me know.
> 

Vadim posted some of the best bignum tests I've seen to the list some
time ago.  And then Matt Kaufmann reported a bignum/contiguous page
GBC bug which was fixed.  That test code exercising the bug was also
posted to the list, and would be a good bignum/gmp3 test.

> Leaving binutils around is just clutter, as its just not used, so
> I remove that too. Would it be possible to make the GCL sources
> require an up-to-date installation of Binutils, rather than carrying
> a copy/fork of its own?
> 

Agreed.  Binutils is there only for GCL patches which may be needed.
The first such case appears to be for macosx.  By default, gcl will
use the static system bfd library available at compile time, and will
skip this directory entirely.  So you don't need this tree.

Here's a summary of the loader options:

statsysbfd -- static system (external) libbfd
dynsysbfd  -- dynamic (shared) system (externa) libbfd
dlopen     -- load objects non-permanently at runtime as .so files
lobcfd     -- build and use the local bfd tree
custreloc  -- use the i386, sparc, and coff only old native reloc code


> There are a bunch of files (clcs/*.[cho] pcl/*.[cho] pcl/*gazonk*) that
> are rebuilt, but are checked into the repository. Locally I remove these
> files as part of a "make clean". Seems cleaner that way, makes the source
> tree smaller, and reminds you what files it is OK to edit.
> 

I agree here too.  The problem is, we still cannot build the pcl files
from lisp source on Windows.  These .c, .h, and .data files are there
to construct an ansi Windows image from C source.  Once this is fixed,
these files will be gone.  So you can get rid of them on BSD too if
you want.

> I'm still trying to figure out how to not have h/new_decl.h in the repo
> (ie, how to build it from scratch), but that will take longer.
> 

Suggestions most welcome here.

> Here's the complete list of files (excluding gmp3/... and binutils/...)
> that I have removed locally with no ill effects:
> 
> AC_FD_CC
> AC_FD_MSG

dont' know what these are yet :-)

> gmp.patch
> readme.gmp

Need to keep this around for documentation in the main tree, I think.

> clcs/clcs_condition_definitions.c
> clcs/clcs_condition_definitions.h
> clcs/clcs_conditions.c
> clcs/clcs_conditions.h
> clcs/clcs_debugger.c
> clcs/clcs_debugger.h
> clcs/clcs_handler.c
> clcs/clcs_handler.h
> clcs/clcs_install.c
> clcs/clcs_install.h
> clcs/clcs_kcl_cond.c
> clcs/clcs_kcl_cond.h
> clcs/clcs_macros.c
> clcs/clcs_macros.h
> clcs/clcs_precom.c
> clcs/clcs_precom.h
> clcs/clcs_restart.c
> clcs/clcs_restart.h
> clcs/clcs_top_patches.c
> clcs/clcs_top_patches.h

Can go with a fixed Windows ansi build.

> o/grab_defs.u

Will look into removing this.

> pcl/pcl_boot.c
> pcl/pcl_boot.h
> pcl/pcl_braid.c
> pcl/pcl_braid.h
> pcl/pcl_cache.c
> pcl/pcl_cache.h
> pcl/pcl_combin.c
> pcl/pcl_combin.h
> pcl/pcl_compat.c
> pcl/pcl_compat.h
> pcl/pcl_cpl.c
> pcl/pcl_cpl.h
> pcl/pcl_ctypes.c
> pcl/pcl_ctypes.h
> pcl/pcl_defclass.c
> pcl/pcl_defclass.h
> pcl/pcl_defcombin.c
> pcl/pcl_defcombin.h
> pcl/pcl_defs.c
> pcl/pcl_defs.h
> pcl/pcl_dfun.c
> pcl/pcl_dfun.h
> pcl/pcl_dlisp.c
> pcl/pcl_dlisp.h
> pcl/pcl_dlisp2.c
> pcl/pcl_dlisp2.h
> pcl/pcl_env.c
> pcl/pcl_env.h
> pcl/pcl_fast_init.c
> pcl/pcl_fast_init.h
> pcl/pcl_fin.c
> pcl/pcl_fin.h
> pcl/pcl_fixup.c
> pcl/pcl_fixup.h
> pcl/pcl_fngen.c
> pcl/pcl_fngen.h
> pcl/pcl_fsc.c
> pcl/pcl_fsc.h
> pcl/pcl_gazonk0.c
> pcl/pcl_gazonk0.data
> pcl/pcl_gazonk0.h
> pcl/pcl_gazonk0.lsp
> pcl/pcl_gazonk1.c
> pcl/pcl_gazonk1.data
> pcl/pcl_gazonk1.h
> pcl/pcl_gazonk1.lsp
> pcl/pcl_gazonk2.c
> pcl/pcl_gazonk2.data
> pcl/pcl_gazonk2.h
> pcl/pcl_gazonk2.lsp
> pcl/pcl_gazonk3.c
> pcl/pcl_gazonk3.data
> pcl/pcl_gazonk3.h
> pcl/pcl_gazonk3.lsp
> pcl/pcl_gazonk4.c
> pcl/pcl_gazonk4.data
> pcl/pcl_gazonk4.h
> pcl/pcl_gazonk4.lsp
> pcl/pcl_gazonk5.c
> pcl/pcl_gazonk5.data
> pcl/pcl_gazonk5.h
> pcl/pcl_gazonk5.lsp
> pcl/pcl_gazonk6.c
> pcl/pcl_gazonk6.data
> pcl/pcl_gazonk6.h
> pcl/pcl_gazonk6.lsp
> pcl/pcl_gazonk7.c
> pcl/pcl_gazonk7.data
> pcl/pcl_gazonk7.h
> pcl/pcl_gazonk7.lsp
> pcl/pcl_gcl_low.c
> pcl/pcl_gcl_low.h
> pcl/pcl_generic_functions.c
> pcl/pcl_generic_functions.h
> pcl/pcl_init.c
> pcl/pcl_init.h
> pcl/pcl_iterate.c
> pcl/pcl_iterate.h
> pcl/pcl_low.c
> pcl/pcl_low.h
> pcl/pcl_macros.c
> pcl/pcl_macros.h
> pcl/pcl_methods.c
> pcl/pcl_methods.h
> pcl/pcl_methods.patch
> pcl/pcl_pkg.c
> pcl/pcl_pkg.h
> pcl/pcl_precom1.c
> pcl/pcl_precom1.h
> pcl/pcl_precom2.c
> pcl/pcl_precom2.h
> pcl/pcl_slots.c
> pcl/pcl_slots.h
> pcl/pcl_slots_boot.c
> pcl/pcl_slots_boot.h
> pcl/pcl_std_class.c
> pcl/pcl_std_class.h
> pcl/pcl_vector.c
> pcl/pcl_vector.h
> pcl/pcl_walk.c
> pcl/pcl_walk.h
> 

Can go with a fixed Windows ansi build.

> M
> --
> Mark Murray
> iumop ap!sdn w,I idlaH
> Index: configure-new.ac
> ===================================================================
> RCS file: /cvsroot/gcl/gcl/configure-new.ac,v
> retrieving revision 1.2
> diff -u -d -r1.2 configure-new.ac
> --- configure-new.ac  30 Jul 2002 06:29:35 -0000      1.2
> +++ configure-new.ac  5 Oct 2003 14:00:20 -0000
> @@ -974,37 +974,7 @@
>  
>  MP_INLCUDE=""
>  if test $use_gmp = yes ; then
> - AC_MSG_CHECKING([use_gmp=yes, doing configure in gmp directory])
> - case "${canonical}" in
> -#   i[[5-9]]86* | pentium* | k6* | athlon*)
> -#      (cd gmp ; ./configure --target=i486) ;;
> -   *)
> -      (cd gmp ; ./configure) ;;
> - esac
> - [[ "`ls -1 gmp/mpn/add_n.* 2>/dev/null`" != "" ]] || cp gmp/mpn/generic/*.c 
> gmp/mpn/
> - AC_MSG_CHECKING("for size of gmp limbs")
> - AC_TRY_RUN([#include <stdio.h>
> -     #include "h/gmp.h"
> -     
> -     int main() {
> -     FILE *fp=fopen("conftest1","w");
> -     fprintf(fp,"%u",sizeof(mp_limb_t));
> -     fclose(fp);
> -     return 0;
> -}],mpsize=`cat conftest1`,mpsize=0,mpsize=0)
> - if test "$mpsize" = "0" ; then
> -     echo "Cannot determine mpsize"
> -     exit 1
> - fi
> - AC_DEFINE_UNQUOTED(MP_LIMB_BYTES,$mpsize)
> - AC_MSG_RESULT($mpsize) 
> - GMP=1
> - AC_DEFINE(GMP)
> - AC_SUBST(GMP)
> - MP_INCLUDE=h/gmp.h
> - echo > makedefsafter
> - echo 'MPFILES=${GMP_DIR}libgmp.a' >> makedefsafter
> - echo >> makedefsafter
> + MP_INCLUDE=gmp.h
>  fi
>  AC_SUBST(MP_INCLUDE)
>   

OK, I can't yet apply this for reasons stated above.  Unless you can
perhaps suggest a better way of achieving the same end?  In principle,
we could compile the patch and link it in without the gmp3 tree at
all, but we'd need to grab all the headers and defines and put them
somewhere.  I do think we need the option of a gmp3 subbuild for those
without external gmp3 libs.


> Index: configure.in
> ===================================================================
> RCS file: /cvsroot/gcl/gcl/configure.in,v
> retrieving revision 1.125
> diff -u -d -r1.125 configure.in
> --- configure.in      24 Sep 2003 15:38:42 -0000      1.125
> +++ configure.in      5 Oct 2003 14:00:23 -0000
> @@ -239,7 +239,6 @@
>  def_dlopen="no"
>  def_statsysbfd="yes"
>  def_custreloc="no"
> -def_oldgmp="no"
>  def_pic="no";
>  def_static="no";
>  case $use in 
> @@ -256,8 +255,6 @@
>                       def_dlopen="yes" ; def_statsysbfd="no" ; 
> def_static="no" ;;
>               hppa*)
>                       def_dlopen="yes" ; def_statsysbfd="no" def_pic="yes" ;;
> -#            m68k*)
> -#                    def_oldgmp="yes" ;;
>       esac;;
>      *mingw*)
>       def_statsysbfd="no" ; def_custreloc="yes" ;;

This can be applied, Thanks!


> @@ -287,14 +284,6 @@
>       [ --enable-pic builds gcl with -fPIC in CFLAGS ]
>       ,,enable_pic="$def_pic")
>  
> -AC_ARG_ENABLE(oldgmp,
> -     [ --enable-oldgmp will link against gmp2 instead of gmp3 ]
> -     ,,enable_oldgmp="$def_oldgmp")
> -

And this.

> -AC_ARG_ENABLE(dynsysgmp,
> -     [ --enable-dynsysgmp will link against the system libgmp3 overriding 
> certain functions with patched versions from the local source ]
> -     ,,enable_dynsysgmp="no")
> -

But not this, this is what you want to use, no?

>  load_opt="0"
>  if test "$enable_dlopen" = "yes" ; then
>     load_opt=1
> @@ -373,7 +362,7 @@
>  
>  TCFLAGS="-Wall -DVOL=volatile -fsigned-char"
>  if test "$GCC" = "yes" ; then
> -     TCFLAGS="$TCFLAGS -fwritable-strings -pipe"
> +     TCFLAGS="$TCFLAGS -fwritable-strings"
>  fi
>  

-pipe was just in there for speed (historically) -- you don't like this?


>  TO3FLAGS=""
> @@ -383,8 +372,8 @@
>       # for subconfigurations
>       CFLAGS=-g
>  else
> -     TO3FLAGS="-O3 -fomit-frame-pointer"
> -     TO2FLAGS="-O"
> +     TO3FLAGS="-fomit-frame-pointer"
> +     TO2FLAGS=""
>  fi
>  

No optimization?????

>  AC_CHECK_PROGS(AWK,gawk nawk awk,"")
> @@ -468,60 +457,7 @@
>  MP_INLCUDE=""
>  if test $use_gmp = yes ; then
>  
> - AC_MSG_CHECKING([use_gmp=yes, doing configure in gmp directory])
> - echo
> - echo "#"
> - echo "#"
> - echo "# -------------------"
> - echo "# Subconfigure of GMP"
> - echo "#"
> - echo "#"
> -
> - if test "$enable_oldgmp" = "yes" ; then
> -     GMPDIR=gmp
> - else
> -     GMPDIR=gmp3
> - fi
> -
> - if test "$use_common_binary" = "yes"; then
> -   cd $GMPDIR && ./configure --host=$host && cd ..
> - else
> -   cd $GMPDIR && ./configure && cd ..
> - fi
> -#MY_SUBDIRS="$MY_SUBDIRS $GMPDIR" 
> -
> - echo "#"
> - echo "#"
> - echo "#"
> - echo "# Subconfigure of GMP done"
> - echo "# ------------------------"
> - echo "#"
> -
> - PATCHED_SYMBOLS=""
> - if test "$enable_dynsysgmp" = "yes" ; then
> -     AC_CHECK_HEADER(gmp.h,
> -             AC_CHECK_LIB(gmp,__gmpz_init,
> -                     MPFILES=$GMPDIR/mpn/mul_n.o
> -                     PATCHED_SYMBOLS=__gmpn_toom3_mul_n
> -                     if test "$use" = "m68k-linux" ; then
> -                             MPFILES="$MPFILES $GMPDIR/mpn/lshift.o 
> $GMPDIR/mpn/rshift.o"
> -                             PATCHED_SYMBOLS="$PATCHED_SYMBOLS __gmpn_lshift 
> __gmpn_rshift"
> -                     fi
> -                     TLIBS="$TLIBS -lgmp"
> -                     echo "#include \"gmp.h\"" >foo.c
> -                     echo "int main() {return 0;}" >>foo.c
> -                     MP_INCLUDE=`cpp foo.c | grep /gmp.h | head -1l | $AWK 
> '{print $3}' | tr -d '"'`
> -                     rm -f foo.c,
> -                     echo "Cannot use dynamic gmp lib" ; exit 1,),
> -             echo "Cannot use dynamic gmp lib" ; exit 1,)
> -
> -else                 
> -
> -     cp $GMPDIR/gmp.h h/gmp.h
> -     MP_INCLUDE=h/gmp.h
> -     MPFILES=gmp_all
> -
> -fi
> + MP_INCLUDE=gmp.h
>  

OK, can't apply this for reasons stated above.

>   AC_MSG_CHECKING("for size of gmp limbs")
>   AC_TRY_RUN([#include <stdio.h>
> @@ -563,11 +499,7 @@
>   GMP=1
>   AC_DEFINE(GMP)
>   AC_SUBST(GMP)
> - AC_SUBST(GMPDIR)
> - echo > makedefsafter
> - echo "MPFILES=$MPFILES" >> makedefsafter
> - echo "PATCHED_SYMBOLS=$PATCHED_SYMBOLS" >> makedefsafter
> - echo >> makedefsafter
> + TLIBS="$TLIBS -L${prefix}/lib -lgmp"
>  fi
>  

Nor this for the same reasons.

>  
> @@ -677,42 +609,6 @@
>       fi
>  fi
>  
> -if test "$enable_locbfd" = "yes" ; then
> -     echo "#"
> -     echo "#"
> -     echo "# -------------------------"
> -     echo "# Subconfigure of LIBIBERTY"
> -     echo "#"
> -     echo "#"
> -     cd binutils/libiberty && chmod +x configure && ./configure && cd ../..
> -#       MY_SUBDIRS="$MY_SUBDIRS binutils/libiberty " 
> -     echo "#"
> -     echo "#"
> -     echo "#"
> -     echo "# Subconfigure of LIBIBERTY done"
> -     echo "# ------------------------------"
> -     echo "#"
> -     echo "#"
> -     echo "#"
> -     echo "# -------------------"
> -     echo "# Subconfigure of BFD"
> -     echo "#"
> -     echo "#"
> -     cd binutils/bfd && chmod +x configure && ./configure && cd ../..
> -#       MY_SUBDIRS="$MY_SUBDIRS binutils/bfd " 
> -     echo "#"
> -     echo "#"
> -     echo "#"
> -     echo "# Subconfigure of BFD done"
> -     echo "# ------------------------"
> -     echo "#"
> -     TLIBS="$TLIBS `pwd`/binutils/bfd/libbfd.a 
> `pwd`/binutils/libiberty/libiberty.a"
> -     AC_DEFINE(HAVE_LIBBFD)
> -     BUILD_BFD="h/bfd.h h/bfdlink.h h/ansidecl.h h/symcat.h"
> -     AC_SUBST(BUILD_BFD)
> -fi
> -
> -#AC_CONFIG_SUBDIRS($MY_SUBDIRS)

You don't need this at all, but people without libbfd.a do, like
solaris users.

>  
>  # Find where Data begins.  This is used by the storage allocation
>  # mechanism, in the PAGE macro.  This offset is subtracted from
> @@ -1324,30 +1220,30 @@
>  
>  if test -d ${TK_CONFIG_PREFIX}/tk${TK_VERSION} ; then
>    TK_LIBRARY=${TK_CONFIG_PREFIX}/tk${TK_VERSION}
> -  else
> +else
>    if test -d ${TK_CONFIG_PREFIX}/../tk${TK_VERSION} ; then
>      TK_LIBRARY=${TK_CONFIG_PREFIX}/../tk${TK_VERSION}
>    fi
>  fi
>  if test -d ${TK_CONFIG_PREFIX}/tcl${TCL_VERSION} ; then
>    TCL_LIBRARY=${TK_CONFIG_PREFIX}/tcl${TCL_VERSION}
> -  else
> +else
>    if test -d ${TK_CONFIG_PREFIX}/../tcl${TCL_VERSION} ; then
>      TCL_LIBRARY=${TK_CONFIG_PREFIX}/../tcl${TCL_VERSION}
>    fi
>  fi
>  if test -f ${TK_CONFIG_PREFIX}/../include/tk.h ; then
>    TK_INCLUDE=-I${TK_CONFIG_PREFIX}/../include
> -  else
> -  if test -f /usr/include/tcl${TCL_VERSION}/tk.h ; then
> -    TK_INCLUDE=-I/usr/include/tcl${TCL_VERSION}
> +else
> +  if test -f ${TK_CONFIG_PREFIX}/../../include/tk${TK_VERSION}/tk.h ; then
> +    TK_INCLUDE=-I${TK_CONFIG_PREFIX}/../../include/tk${TK_VERSION}
>    fi 
>  fi
>  if test -f ${TCL_CONFIG_PREFIX}/../include/tcl.h ; then
>    TCL_INCLUDE=-I${TCL_CONFIG_PREFIX}/../include
> -  else
> -  if test -f /usr/include/tcl${TCL_VERSION}/tcl.h ; then
> -    TCL_INCLUDE=-I/usr/include/tcl${TCL_VERSION}
> +else
> +  if test -f ${TCL_CONFIG_PREFIX}/../../include/tcl${TCL_VERSION}/tcl.h ; 
> then
> +    TCL_INCLUDE=-I${TCL_CONFIG_PREFIX}/../../include/tcl${TCL_VERSION}
>    fi
>  fi

Am a bit confused here -- your tcl/tk is not being found?


>  AC_CHECK_LIB(lieee,main,have_ieee=1,have_ieee=0)
> @@ -1463,7 +1359,7 @@
>  AC_SUBST(LIBS)
>  FINAL_CFLAGS="$TCFLAGS $PROCESSOR_FLAGS"
>  AC_SUBST(FINAL_CFLAGS)
> -CFLAGS="$TCFLAGS $TO3FLAGS $PROCESSOR_FLAGS -I\$(GCLDIR)/o"
> +CFLAGS="$TCFLAGS $TO3FLAGS $PROCESSOR_FLAGS -I${prefix}/include 
> -I\$(GCLDIR)/o"
>  AC_SUBST(CFLAGS)

This looks interesting, but I can't envision the circumstance where
you need it. 

>  # Work around bug with gcc on ppc -- CM
>  NIFLAGS="$TCFLAGS $TONIFLAGS $PROCESSOR_FLAGS -I\$(GCLDIR)/o"
> Index: makedefc.in
> ===================================================================
> RCS file: /cvsroot/gcl/gcl/makedefc.in,v
> retrieving revision 1.16
> diff -u -d -r1.16 makedefc.in
> --- makedefc.in       24 Sep 2003 15:37:30 -0000      1.16
> +++ makedefc.in       5 Oct 2003 14:00:23 -0000
> @@ -16,13 +16,18 @@
>  address@hidden@
>  
>  # where to place the info files
> address@hidden@
> address@hidden@/info
> +
> +# configure has a clever process for figuring out where Emacs
> +# really expects to find site-lisp and default.el.  We use
> +# these values instead to ensure that building with --prefix=PREFIX
> +# will not make changes outside the specified tree. -twp
>  
>  # where to put emacs lisp files.
> address@hidden@
> address@hidden@/share/emacs/site-lisp
>  
>  # the default.el file
> address@hidden@
> address@hidden@/share/emacs/site-lisp/default.el
>  

I like this, as some have reported probs with this section, but it
does seem less flexible in general.  Do you happen to know of cases
where your simplification would give the wrong result?

>  # numerous TCL/TK variables culled from the tkConfig.sh and tclConfig.sh
>  # if these are found.
> @@ -56,8 +61,6 @@
>  
>  address@hidden@
>  address@hidden@
> address@hidden@
> address@hidden@
>  address@hidden@
>  address@hidden@
>  

Gotta keep this.

> Index: makefile
> ===================================================================
> RCS file: /cvsroot/gcl/gcl/makefile,v
> retrieving revision 1.81
> diff -u -d -r1.81 makefile
> --- makefile  24 Sep 2003 16:29:56 -0000      1.81
> +++ makefile  5 Oct 2003 14:00:24 -0000
> @@ -31,27 +31,16 @@
>  PCLDIR = pcl
>  MPDIR        = mp
>  TESTDIR = ansi-tests
> -#GMP_DIR = gmp3/
>  
> -all: $(BUILD_BFD) $(PORTDIR)/$(FLISP) command cmpnew/gcl_collectfn.o 
> lsp/gcl_info.o do-gcl-tk do-info
> +all: $(PORTDIR)/$(FLISP) command cmpnew/gcl_collectfn.o lsp/gcl_info.o 
> do-gcl-tk do-info
>  
>  xgcl: $(PORTDIR)/saved_xgcl
>  
>  $(PORTDIR)/saved_xgcl: $(PORTDIR)/saved_gcl
>       cd xgcl-2 && $(MAKE)
>  
> -binutils/bfd/libbfd.a binutils/libiberty/libiberty.a:
> -     cd $(@D) && $(MAKE)
> -
> -h/bfd.h: binutils/bfd/libbfd.a binutils/libiberty/libiberty.a
> -     cp $(<D)/$(@F) $@
> -
> -h/bfdlink.h h/ansidecl.h h/symcat.h: binutils/bfd/libbfd.a 
> binutils/libiberty/libiberty.a
> -     cp $(<D)/../include/$(@F) $@
> -
>  $(PORTDIR)/saved_pre_gcl: $(HDIR)cmpinclude.h
>       (cd $(BINDIR); $(MAKE) all)
> -     $(MAKE) mpfiles
>       rm -f o/cmpinclude.h ; cp h/cmpinclude.h o
>       (cd $(ODIR); $(MAKE) all)
>       $(MAKE) $<
> @@ -102,21 +91,9 @@
>  do-info:
>       cd info && $(MAKE)
>  
> -mpfiles: $(MPFILES)
> -
>  $(MPDIR)/libmport.a:
>       (cd mp ; $(MAKE) all)
>  
> -$(GMPDIR)/libgmp.a: $(GMPDIR)/Makefile
> -     cd $(GMPDIR) && $(MAKE) && rm -f libgmp.a &&  ar qc libgmp.a *.o */*.o
> -
> -gmp_all: $(GMPDIR)/Makefile
> -     cd $(GMPDIR) && $(MAKE) 
> -     touch $@
> -
> -$(GMPDIR)/mpn/mul_n.o $(GMPDIR)/mpn/lshift.o $(GMPDIR)/mpn/rshift.o: 
> $(GMPDIR)/Makefile
> -     cd $(@D) && $(MAKE) $(@F)
> -
>  command:
>       rm -f bin/gcl xbin/gcl
>       MGCLDIR=`echo $(GCLDIR) | sed -e 'sX^\([a-z]\):X/\1Xg'` ; \
> @@ -170,10 +147,11 @@
>       mkdir -p $(DESTDIR)$(prefix)/lib 
>       mkdir -p $(DESTDIR)$(prefix)/bin
>       mkdir -p $(DESTDIR)$(INSTALL_LIB_DIR)
> +     mkdir -p $(DESTDIR)$(prefix)/info
>       MINSTALL_LIB_DIR=`echo $(INSTALL_LIB_DIR) | sed -e 
> 'sX^\([a-z]\):X/\1Xg'` ; \
>       $(MAKE) install-command "INSTALL_LIB_DIR=$(INSTALL_LIB_DIR)" 
> "prefix=$(prefix)" "DESTDIR=$(DESTDIR)" "BINDIR=$$MINSTALL_LIB_DIR/unixport"
>       rm -f $(DESTDIR)$(prefix)/bin/gcl.exe
> -     tar cf - $(PORTDIR)/$(FLISP)$(EXE) info/*.info* $(LISP_LIB) \
> +     tar cf - $(PORTDIR)/$(FLISP)$(EXE) $(LISP_LIB) \
>       $(TCL_EXES)  |  (cd $(DESTDIR)$(INSTALL_LIB_DIR) ;tar xf -)
>       cd $(DESTDIR)$(INSTALL_LIB_DIR)/$(PORTDIR) && \
>               mv $(FLISP)$(EXE) temp$(EXE) && \
> @@ -207,24 +185,20 @@
>       (cd $(CMPDIR); $(MAKE) clean)
>       (cd $(PORTDIR); $(MAKE) clean)
>       (cd gcl-tk ; $(MAKE) clean)
> -     -(cd $(GMPDIR) ; $(MAKE) distclean)
>       cd $(CLCSDIR) && $(MAKE) clean
>       cd $(PCLDIR) && $(MAKE) clean
>       cd xgcl-2 && $(MAKE) clean
>       (cd $(TESTDIR); $(MAKE) clean)
>       (cd info ; $(MAKE) clean)
>       rm -f foo.tcl config.log makedefs makedefsafter config.cache 
> config.status makedefc
> -     rm -f h/config.h h/gclincl.h h/cmpinclude.h h/gmp.h
> -     rm -rf $(GMPDIR)/.deps $(GMPDIR)/libgmp.a
> -     rm -f xbin/gcl foo foo.c bin/gclm.bat gmp_all
> +     rm -f h/config.h h/gclincl.h h/cmpinclude.h
> +     rm -f xbin/gcl foo foo.c bin/gclm.bat
>       rm -f h/*-linux.defs h/bfd.h h/bfdlink.h h/ansidecl.h h/symcat.h
>       rm -f windows/gcl.iss bin/gcl.bat windows/gcl.ansi.iss 
> windows/install.ansi.lsp \
>               windows/install.lsp
>       rm -f ansi-tests/test_results ansi-tests/gazonk* \
>               ansi-tests/generated-eval-when-test-file.lisp
>       rm -f config.log config.cache config.status
> -     -cd binutils/bfd && $(MAKE) distclean
> -     -cd binutils/libiberty && $(MAKE) distclean
>  

Let me first state that our makefiles are a mess, and you are the
first person to attempt a cleanup, which I greatly appreciate.  Its
been a longstanding TODO to get simple Makefile.am's put in place.  By
in large, I can't commit these simplifications as they remove the gmp3
and binutils subbuilds, and I don't know what you're trying to get at
with the info files, but ...

>  CMPINCLUDE_FILES=$(HDIR)cmpincl1.h $(HDIR)gclincl.h $(HDIR)compbas.h 
> $(HDIR)enum.h $(HDIR)mgmp.h $(HDIR)object.h $(HDIR)vs.h \
>       $(HDIR)bds.h $(HDIR)frame.h \
> @@ -234,13 +208,16 @@
>  
>  OTHERS=$(HDIR)notcomp.h $(HDIR)rgbc.h $(HDIR)stacks.h 
>  
> -$(HDIR)cmpinclude.h: $(CMPINCLUDE_FILES) $(HDIR)config.h
> +$(HDIR)cmpinclude.h: $(CMPINCLUDE_FILES) $(HDIR)config.h $(HDIR)new_decl.h
>       cat $(HDIR)config.h | sed -e "1,/Begin for cmpincl/d" \
>               -e "/End for cmpinclude/,50000d" > tmpx
>       cat $(CMPINCLUDE_FILES) >> tmpx
>       ./xbin/move-if-changed mv tmpx h/cmpinclude.h
>       ./xbin/move-if-changed cp h/cmpinclude.h o/cmpinclude.h
>  
> +$(HDIR)new_decl.h:
> +     (cd $(ODIR); $(MAKE) decls1)
> +

... if you can get this working, it'll go in.

>  go:
>       mkdir go
>       (cd go ; cp -s ../o/makefile ../o/*.o ../o/*.c ../o/*.d ../o/*.ini  .)
> @@ -258,4 +235,4 @@
>       (cd go ; $(MAKE)  "CFLAGS = -I../h -pg  -c -g ")
>       (cd unixport ; $(MAKE) gcp)
>  
> -.INTERMEDIATE: unixport/saved_pcl_gcl
> \ No newline at end of file
> +.INTERMEDIATE: unixport/saved_pcl_gcl
> Index: clcs/makefile
> ===================================================================
> RCS file: /cvsroot/gcl/gcl/clcs/makefile,v
> retrieving revision 1.17
> diff -u -d -r1.17 makefile
> --- clcs/makefile     23 Sep 2003 21:48:26 -0000      1.17
> +++ clcs/makefile     5 Oct 2003 14:00:50 -0000
> @@ -33,5 +33,6 @@
>       echo '(load "package.lisp")(load "loading.lisp")(jamie-load-clcs 
> :compiled)(system::save-system "saved_full_gcl")' | ${LISP}
>  
>  clean:
> -     rm -f *.o *.fn saved_full_gcl$(EXE) saved_full_gcl cmpinclude.h
> -.INTERMEDIATE: saved_clcs_gcl
> \ No newline at end of file
> +     rm -f *.o *.fn saved_full_gcl$(EXE) saved_full_gcl
> +     rm -f *.[ch]
> +.INTERMEDIATE: saved_clcs_gcl

With Windows ansi, this will go in.

> Index: h/FreeBSD.defs
> ===================================================================
> RCS file: /cvsroot/gcl/gcl/h/FreeBSD.defs,v
> retrieving revision 1.2
> diff -u -d -r1.2 FreeBSD.defs
> --- h/FreeBSD.defs    1 Nov 2002 04:09:34 -0000       1.2
> +++ h/FreeBSD.defs    5 Oct 2003 14:01:07 -0000
> @@ -1,27 +1,23 @@
> -# Machine dependent makefile definitions for intel 386,486 running 386bsd
> +# Machine dependent makefile definitions for 386bsd
>  # Ported to FreeBSD 2.0 by Jeffrey Hsu (address@hidden).
>  # Hacked September-93 by Paul F. Werkowski for 386BSD 0.1 + Patchkit 0.2.4
> +# Hacked September-2003 by Juergen Weiss, Mark Murray for FreeBSD-5 CURRENT
>  
> -LBINDIR=/usr/local/bin
> -
> -OFLAG        = -pipe -O2 
> -CFLAGS       = -fwritable-strings -fomit-frame-pointer -DVOL=volatile 
> -I$(GCLDIR)/o -I/usr/local/lib/gcl-2.0/h -fsigned-char -I/usr/local/lib
> -LIBS    = -lm -L/usr/local/lib
> -ODIR_DEBUG=
> -NULLFILE=../h/twelve_null
> +LBINDIR=${prefix}/bin
> +# OFLAG  = -pipe -O2
> +# CFLAGS = @CFLAGS@@
> +CFLAGS = -O -pipe -mcpu=pentiumpro -I/usr/local/include
> +CFLAGS += -I$(GCLDIR)/o -fwritable-strings -fomit-frame-pointer 
> -fsigned-char -DVOL=volatile
> +# LIBS = @LOCALLIBS@@
> +LIBS = -L/usr/local/lib -lgmp -lm -lreadline

Please let me suggest you comment out these lines entirely, and let
configure set them, as in linux.defs.

>  
>  # This CC string will be used for compilation of the system,
>  # and also in the compiler::*cc* variable for later compilation of
>  # lisp files.
> -
> -CC = gcc
> +CC = cc $(CFLAGS)
>  

and this.

>  LDCC = $(CC) -static
>  

Please don't leave this in!  --enable-static is a configure option.

> -#  Use the mp.s file on 68k machine 
> -MPFILES= $(MPDIR)/mpi-386.o $(MPDIR)/libmport.a
> -GNULIB1=/usr/lib/libgcc.a
> -

This is cruft.

>  # Enable the fastloading mechanism which does not use ld -A
>  # requires c/rel_.. machine dependent code.
>  RSYM = rsym
> @@ -40,3 +36,6 @@
>  
>  # the  make to use for saved_kcp the profiler.
>  KCP=kcp-bsd
> +
> +# For AXIOM
> +# EXTRAS = ${OBJ}/${SYS}/lib/cfuns-c.o ${OBJ}/${SYS}/lib/sockio-c.o

Please let me suggest you build gcl externally, and then build axiom
with this external gcl via the patches I've posted to the axiom list,
and which can be found in the debian/ subdir of the Debian axiom
package.  In short, you don't need the gcl build tree to get these
axiom specifics in, but can do it from lisp via (compiler::link ...).

> Index: h/FreeBSD.h
> ===================================================================
> RCS file: /cvsroot/gcl/gcl/h/FreeBSD.h,v
> retrieving revision 1.2
> diff -u -d -r1.2 FreeBSD.h
> --- h/FreeBSD.h       1 Nov 2002 04:09:34 -0000       1.2
> +++ h/FreeBSD.h       5 Oct 2003 14:01:07 -0000
> @@ -1,5 +1,5 @@
>  /*
> - * FreeBSD.h for gcl 1.1
> + * FreeBSD.h for gcl
>   *
>   * Ported by Jeffrey Hsu (address@hidden).
>   *  Looked at previous versions by Hsu, Werkowsksi, Tobin, and Mogart.
> @@ -8,6 +8,50 @@
>  
>  #include "bsd.h"
>  
> +#ifndef __ELF__
> +#error FreeBSD systems use ELF
> +#endif
> +
> +#undef HAVE_AOUT
> +#define HAVE_AOUT <elf.h>
> +#define HAVE_ELF
> +
> +#if defined(__i386__)
> +#define __ELF_NATIVE_CLASS 32
> +#endif
> +#if defined(__alpha__) || defined(__sparc64__) || defined(__ia64__)
> +#define __ELF_NATIVE_CLASS 64
> +#endif
> +#define mjoin(a,b) a ## b
> +#define Mjoin(a,b) mjoin(a,b)
> +#if !defined(ElfW)
> +#define ElfW(a) Mjoin(Elf,Mjoin(__ELF_NATIVE_CLASS,Mjoin(_,a)))
> +#endif
> +#define ELFW(a) Mjoin(ELF,Mjoin(__ELF_NATIVE_CLASS,Mjoin(_,a)))
> +
> +/* Seeking to the end of ELF data is a little messy... */
> +#include <link.h>
> +#define SEEK_TO_END_OFILE(fp)\
> +  do { \
> +     long offset = 0, endofelf; int j; \
> +     ElfW(Ehdr) eheader; ElfW(Shdr) shdr; \
> +        fseek(fp, 0, SEEK_SET); \
> +        fread(&eheader, sizeof(eheader), 1, fp); \
> +  /* in case the headers themselves come AFTER the actual sections */ \
> +     endofelf=offset = eheader.e_shoff+ eheader.e_shentsize 
> *eheader.e_shnum;\
> +        fseek(fp, eheader.e_shoff, SEEK_SET); \
> +     if ( eheader.e_shentsize != sizeof(ElfW(Shdr)) ) \
> +       { FEerror("Bad ELF section header size",0); } \
> +        for ( j = 0; j < eheader.e_shnum; j++ ) \
> +       { fread(&shdr,eheader.e_shentsize,1,fp); \
> +            if ( (shdr.sh_offset > offset) && (shdr.sh_type != SHT_NOBITS) ) 
> \
> +           { offset = shdr.sh_offset; endofelf = offset+shdr.sh_size; } \
> +       } \
> +     if ( fseek(fp, endofelf, SEEK_SET) ) \
> +         FEerror("Bad ELF file",0); \
> +      } while(0)
> +
> +
>  #undef LD_COMMAND
>  #define LD_COMMAND(command,main,start,input,ldarg,output) \
>    sprintf(command, "ld -dc -N -x -A %s -T %x %s %s -o %s", \
> @@ -24,7 +68,7 @@
>  /* we don't need to worry about zeroing fp->_base, to prevent what??? */
>  #define FCLOSE_SETBUF_OK 
>  
> -#undef HAVE_XDR
> +#define HAVE_XDR
>  
>  #define USE_ATT_TIME
>  
> @@ -39,17 +83,9 @@
>  #endif
>  
>  #define DATA_BEGIN (char *) N_DATADDR(header);
> -#define A_TEXT_OFFSET(x) (sizeof (struct exec))
> -#define A_TEXT_SEEK(hdr) (N_TXTOFF(hdr) + A_TEXT_OFFSET(hdr))
> -#define start_of_data() &etext
> -#define start_of_text() ((char *)(sizeof(struct exec) + getpagesize()))
>  
> -#define UNIXSAVE "unexec.c"
> -#ifdef UNIXSAVE 
> - extern char etext;
> -#endif
> -
> -#define RELOC_FILE "rel_sun3.c"      /* for SFASL - enabled in bsd.h */
> +/*#define UNEXEC_USE_MAP_PRIVATE*/
> +#define UNIXSAVE "unexelf.c"
>  
>  #ifdef CLOCKS_PER_SEC
>  #define HZ CLOCKS_PER_SEC
> @@ -67,7 +103,8 @@
>  #define SETUP_SIG_STACK \
>  { \
>       static struct sigaltstack estack; \
> -     if ((estack.ss_sp = malloc(SIGSTKSZ)) == NULL) \
> +     if (estack.ss_sp == NULL && \
> +         (estack.ss_sp = malloc(SIGSTKSZ)) == NULL) \
>         perror("malloc"); \
>       estack.ss_size = SIGSTKSZ; \
>       estack.ss_flags = 0; \

Here I'd like to ask a favor -- start the FreeBSD.h file with #include
"linux.h", and then #undef and #ifdef as needed.  All of this looks
the same as in linux.h, except the need to handle the
__ELF_NATIVE_CLASS.  BTW, Mjoin is now in notcomp.h, so you may not
need to define it here.  (Not sure about the include order, we can
move it higher if necessary.)

> Index: h/bsd.h
> ===================================================================
> RCS file: /cvsroot/gcl/gcl/h/bsd.h,v
> retrieving revision 1.4
> diff -u -d -r1.4 bsd.h
> --- h/bsd.h   20 Jul 2002 07:10:55 -0000      1.4
> +++ h/bsd.h   5 Oct 2003 14:01:08 -0000
> @@ -1,8 +1,8 @@
> -#define BSD 1

I'll look into this.

> +#include <sys/param.h>
> +

???

>  #define UNIX
>  #define AV
>  #define SFASL
> -#define HAVE_AOUT <a.out.h>
>  

I'll look into this too.

>  
>  #define MEM_SAVE_LOCALS      \
> Index: h/new_decl.h
> ===================================================================
> RCS file: /cvsroot/gcl/gcl/h/new_decl.h,v
> retrieving revision 1.48
> diff -u -d -r1.48 new_decl.h
> --- h/new_decl.h      3 Oct 2003 16:03:16 -0000       1.48
> +++ h/new_decl.h      5 Oct 2003 14:01:08 -0000
> @@ -1,8 +1,8 @@
> -      EXTER object fLbye (fixnum exitc);
> -      EXTER object fLquit (fixnum exitc);
> +EXTER object fLbye (fixnum exitc);
> +EXTER object fLquit (fixnum exitc);
>  EXTER object sSAno_initA;
> -      EXTER object fLidentity (object x0);
> -      EXTER object fLlisp_implementation_version (void);
> +EXTER object fLidentity (object x0);
> +EXTER object fLlisp_implementation_version (void);
>  EXTER object sSAlisp_maxpagesA;
>  EXTER object sSAsystem_directoryA;
>  EXTER object sSAmultiply_stacksA;
> @@ -13,17 +13,17 @@
>  EXTER object fSallocated (object typ);
>  EXTER object fSreset_number_used (object typ);
>  EXTER object fSstaticp (object x);
> -      EXTER object fSallocate (object type,fixnum npages,...);
> -     EXTER object fSallocate_sgc (object type,fixnum min,fixnum max,fixnum 
> free_percent);
> -     EXTER object fSallocate_growth (object type,fixnum min,fixnum 
> max,fixnum percent,fixnum percent_free);
> -      EXTER object fSallocate_contiguous_pages (fixnum npages,...);
> -      EXTER object fSallocated_contiguous_pages (void);
> -      EXTER object fSmaximum_contiguous_pages (void);
> -      EXTER object fSallocate_relocatable_pages (fixnum npages,...);
> -      EXTER object fSallocated_relocatable_pages (void);
> -      EXTER object fSget_hole_size (void);
> -      EXTER object fSset_hole_size (fixnum npages,...);
> -      EXTER object fLgbc (object x0);
> +EXTER object fSallocate (object type,fixnum npages,...);
> +EXTER object fSallocate_sgc (object type,fixnum min,fixnum max,fixnum 
> free_percent);
> +EXTER object fSallocate_growth (object type,fixnum min,fixnum max,fixnum 
> percent,fixnum percent_free);
> +EXTER object fSallocate_contiguous_pages (fixnum npages,...);
> +EXTER object fSallocated_contiguous_pages (void);
> +EXTER object fSmaximum_contiguous_pages (void);
> +EXTER object fSallocate_relocatable_pages (fixnum npages,...);
> +EXTER object fSallocated_relocatable_pages (void);
> +EXTER object fSget_hole_size (void);
> +EXTER object fSset_hole_size (fixnum npages,...);
> +EXTER object fLgbc (object x0);
>  EXTER object sSAnotify_gbcA;
>  EXTER object sSAgbc_messageA;
>  EXTER object sLcommon;
> @@ -137,55 +137,55 @@
>  EXTER object sLwarning;
>  EXTER object sSchar_size;
>  EXTER object sSshort_size;
> -      EXTER object fLfuncall (object fun,...);
> -      EXTER object fLapply (object fun,...);
> -      EXTER object fLeval (object x0);
> -      EXTER object fLconstantp (object x0);
> +EXTER object fLfuncall (object fun,...);
> +EXTER object fLapply (object fun,...);
> +EXTER object fLeval (object x0);
> +EXTER object fLconstantp (object x0);
>  EXTER object sSlambda_block_expanded;
>  EXTER object sSAbreak_pointsA;
>  EXTER object sSAbreak_stepA;
> -      EXTER object fLmacroexpand (object form,...);
> +EXTER object fLmacroexpand (object form,...);
>  EXTER object sLfuncall;
>  EXTER object sLAmacroexpand_hookA;
>  EXTER object sSdefmacroA;
>  EXTER object sSAinhibit_macro_specialA;
> -         EXTER object fLnot (object x0);
> -  EXTER object fLnot (object x0);
> -  EXTER object fLsymbolp (object x0);
> -  EXTER object fLatom (object x0);
> -  EXTER object fLconsp (object x0);
> -  EXTER object fLlistp (object x0);
> -  EXTER object fLnumberp (object x0);
> -  EXTER object fLintegerp (object x0);
> -  EXTER object fLrationalp (object x0);
> -  EXTER object fLrealp (object x0);
> -  EXTER object fLfloatp (object x0);
> -  EXTER object fLcomplexp (object x0);
> -  EXTER object fLcharacterp (object x0);
> -  EXTER object fLstringp (object x0);
> -  EXTER object fLbit_vector_p (object x0);
> -  EXTER object fLvectorp (object x0);
> -  EXTER object fLsimple_string_p (object x0);
> -  EXTER object fLsimple_bit_vector_p (object x0);
> -  EXTER object fLsimple_vector_p (object x0);
> -  EXTER object fLarrayp (object x0);
> -  EXTER object fLpackagep (object x0);
> -  EXTER object fLfunctionp (object x0);
> -  EXTER object fLcompiled_function_p (object x0);
> -  EXTER object fLcommonp (object x0);
> -  EXTER object fLeq (object x0,object x1);
> -  EXTER object fLeql (object x0,object x1);
> -  EXTER object fLequal (object x0,object x1);
> -  EXTER object fLequalp (object x0,object x1);
> -  EXTER object fScontains_sharp_comma (object x0);
> -  EXTER object fSspicep (object x0);
> -  EXTER object fSfixnump (object x0);
> -  EXTER object fLset (object symbol,object value);
> -  EXTER object fSfset (object sym,object function);
> -  EXTER object fLmakunbound (object sym);
> -  EXTER object fLfmakunbound (object sym);
> +EXTER object fLnot (object x0);
> +EXTER object fLnot (object x0);
> +EXTER object fLsymbolp (object x0);
> +EXTER object fLatom (object x0);
> +EXTER object fLconsp (object x0);
> +EXTER object fLlistp (object x0);
> +EXTER object fLnumberp (object x0);
> +EXTER object fLintegerp (object x0);
> +EXTER object fLrationalp (object x0);
> +EXTER object fLrealp (object x0);
> +EXTER object fLfloatp (object x0);
> +EXTER object fLcomplexp (object x0);
> +EXTER object fLcharacterp (object x0);
> +EXTER object fLstringp (object x0);
> +EXTER object fLbit_vector_p (object x0);
> +EXTER object fLvectorp (object x0);
> +EXTER object fLsimple_string_p (object x0);
> +EXTER object fLsimple_bit_vector_p (object x0);
> +EXTER object fLsimple_vector_p (object x0);
> +EXTER object fLarrayp (object x0);
> +EXTER object fLpackagep (object x0);
> +EXTER object fLfunctionp (object x0);
> +EXTER object fLcompiled_function_p (object x0);
> +EXTER object fLcommonp (object x0);
> +EXTER object fLeq (object x0,object x1);
> +EXTER object fLeql (object x0,object x1);
> +EXTER object fLequal (object x0,object x1);
> +EXTER object fLequalp (object x0,object x1);
> +EXTER object fScontains_sharp_comma (object x0);
> +EXTER object fSspicep (object x0);
> +EXTER object fSfixnump (object x0);
> +EXTER object fLset (object symbol,object value);
> +EXTER object fSfset (object sym,object function);
> +EXTER object fLmakunbound (object sym);
> +EXTER object fLfmakunbound (object sym);
>  EXTER object sSclear_compiler_properties;
> -  EXTER object fSclear_compiler_properties (object x0,object x1);
> +EXTER object fSclear_compiler_properties (object x0,object x1);
>  EXTER object sLaref;
>  EXTER object sLcar;
>  EXTER object sLcdr;
> @@ -207,36 +207,36 @@
>  EXTER object sStraced;
>  EXTER object sLvector;
>  EXTER object sKallow_other_keys;
> -      EXTER object fSerror_set (volatile object x0);
> +EXTER object fSerror_set (volatile object x0);
>  EXTER object sLgensym_counter;
> -  EXTER object fSmc (object name,object address);
> -  EXTER object fSmfsfun (object name,object address,object argd);
> -  EXTER object fSmfvfun (object name,object address,object argd);
> -  EXTER object fSmfvfun_key (object symbol,object address,object argd,object 
> keys);
> -  EXTER object fSmf (object name,object addr);
> -  EXTER object fSmm (object name,object addr);
> -  EXTER object fScompiled_function_name (object fun);
> -  EXTER object fSturbo_closure (object funobj);
> -      EXTER object fSspecialp (object sym);
> +EXTER object fSmc (object name,object address);
> +EXTER object fSmfsfun (object name,object address,object argd);
> +EXTER object fSmfvfun (object name,object address,object argd);
> +EXTER object fSmfvfun_key (object symbol,object address,object argd,object 
> keys);
> +EXTER object fSmf (object name,object addr);
> +EXTER object fSmm (object name,object addr);
> +EXTER object fScompiled_function_name (object fun);
> +EXTER object fSturbo_closure (object funobj);
> +EXTER object fSspecialp (object sym);
>  EXTER object sSdebug;
> -      EXTER object fSdefvar1 (object sym,object val,...);
> -      EXTER object fSdebug (object sym,object val);
> -      EXTER object fSsetvv (object index,object val);
> +EXTER object fSdefvar1 (object sym,object val,...);
> +EXTER object fSdebug (object sym,object val);
> +EXTER object fSsetvv (object index,object val);
>  EXTER object sSPmemory;
>  EXTER object sSPinit;
> -     EXTER object fSinit_cmp_anon (void);
> +EXTER object fSinit_cmp_anon (void);
>  EXTER object sKexternal;
>  EXTER object sKinherited;
>  EXTER object sKinternal;
>  EXTER object sKnicknames;
>  EXTER object sKuse;
>  EXTER object sLApackageA;
> -     EXTER object fSset_gmp_allocate_relocatable (object flag);
> -     EXTER object fSallocate_bigger_fixnum_range (fixnum min,fixnum max);
> -  EXTER object fScmod (object num);
> -  EXTER object fScplus (object x0,object x1);
> -  EXTER object fSctimes (object x0,object x1);
> -  EXTER object fScdifference (object x0,object x1);
> +EXTER object fSset_gmp_allocate_relocatable (object flag);
> +EXTER object fSallocate_bigger_fixnum_range (fixnum min,fixnum max);
> +EXTER object fScmod (object num);
> +EXTER object fScplus (object x0,object x1);
> +EXTER object fSctimes (object x0,object x1);
> +EXTER object fScdifference (object x0,object x1);
>  EXTER object fLnth (fixnum index,object list);
>  EXTER object fLfirst (object x);
>  EXTER object fLsecond (object x);
> @@ -251,37 +251,37 @@
>  EXTER object fSnext_hash_table_entry (object table,object ind);
>  EXTER object fLhash_table_test (object table);
>  EXTER object fLhash_table_size (object table);
> -        EXTER object sLarray_rank_limit;
> -        EXTER object sLarray_dimension_limit;
> -        EXTER object sLarray_total_size_limit;
> +EXTER object sLarray_rank_limit;
> +EXTER object sLarray_dimension_limit;
> +EXTER object sLarray_total_size_limit;
>  EXTER object sLbit;
> -      EXTER object fLaref (object x,fixnum i, ...);
> -     EXTER object fLsvref (object x,ufixnum i);
> -     EXTER object fLrow_major_aref (object x,fixnum i);
> +EXTER object fLaref (object x,fixnum i, ...);
> +EXTER object fLsvref (object x,ufixnum i);
> +EXTER object fLrow_major_aref (object x,fixnum i);
>  EXTER object fSaset1 (object x, fixnum i,object val);
> -      EXTER object fSaset (object x,fixnum i,object y, ...);
> -      EXTER object fSsvset (object x,fixnum i,object val);
> -     EXTER object fSmake_vector1 (fixnum n,fixnum elt_type,object 
> staticp,...);
> +EXTER object fSaset (object x,fixnum i,object y, ...);
> +EXTER object fSsvset (object x,fixnum i,object val);
> +EXTER object fSmake_vector1 (fixnum n,fixnum elt_type,object staticp,...);
>  EXTER object fSget_aelttype (object x);
> -      EXTER object fSmake_vector (object x0,object x1,object x2,object 
> x3,object x4,object x5,object x6,...);
> -      EXTER object fSmake_array1 (fixnum elt_type,object staticp,object 
> initial_element,object displaced_to,fixnum displaced_index_offset, object 
> dimensions);
> -  EXTER object fScopy_array_portion (object x,object y,fixnum i1,fixnum 
> i2,object n1o);
> -      EXTER object fSfill_pointer_set (object x,fixnum i);
> -      EXTER object fLfill_pointer (object x);
> -     EXTER object fLarray_has_fill_pointer_p (object x);
> -      EXTER object fLarray_element_type (object x);
> -      EXTER object fLadjustable_array_p (object x);
> -      EXTER object fSdisplaced_array_p (object x);
> -      EXTER object fLarray_rank (object x);
> -      EXTER object fLarray_dimension (object x,fixnum i);
> -      EXTER object fSreplace_array (object old,object new);
> -      EXTER object fLarray_total_size (object x);
> -      EXTER object fSaset_by_cursor (object array,object val,object cursor);
> +EXTER object fSmake_vector (object x0,object x1,object x2,object x3,object 
> x4,object x5,object x6,...);
> +EXTER object fSmake_array1 (fixnum elt_type,object staticp,object 
> initial_element,object displaced_to,fixnum displaced_index_offset, object 
> dimensions);
> +EXTER object fScopy_array_portion (object x,object y,fixnum i1,fixnum 
> i2,object n1o);
> +EXTER object fSfill_pointer_set (object x,fixnum i);
> +EXTER object fLfill_pointer (object x);
> +EXTER object fLarray_has_fill_pointer_p (object x);
> +EXTER object fLarray_element_type (object x);
> +EXTER object fLadjustable_array_p (object x);
> +EXTER object fSdisplaced_array_p (object x);
> +EXTER object fLarray_rank (object x);
> +EXTER object fLarray_dimension (object x,fixnum i);
> +EXTER object fSreplace_array (object old,object new);
> +EXTER object fLarray_total_size (object x);
> +EXTER object fSaset_by_cursor (object array,object val,object cursor);
>  EXTER object sSAmatch_dataA;
> -      EXTER object sSAcase_fold_searchA;
> -  EXTER object fSmatch_beginning (fixnum i);
> -  EXTER object fSmatch_end (fixnum i);
> -     EXTER object fSstring_match (object pattern,object string,...);
> +EXTER object sSAcase_fold_searchA;
> +EXTER object fSmatch_beginning (fixnum i);
> +EXTER object fSmatch_end (fixnum i);
> +EXTER object fSstring_match (object pattern,object string,...);
>  EXTER object sSs_data;
>  EXTER object sLcompile;
>  EXTER object sLcompile_tl;
> @@ -309,7 +309,7 @@
>  EXTER object sLAstandard_outputA;
>  EXTER object sLAerror_outputA;
>  EXTER object sLAterminal_ioA;
> -       EXTER object sLAquery_ioA;
> +EXTER object sLAquery_ioA;
>  EXTER object sLAdebug_ioA;
>  EXTER object sLAtrace_outputA;
>  EXTER object sSAignore_eof_on_terminal_ioA;
> @@ -336,7 +336,7 @@
>  EXTER object sKset_default_pathname;
>  EXTER object sKsupersede;
>  EXTER object sKverbose;
> -  EXTER object sLAread_default_float_formatA;
> +EXTER object sLAread_default_float_formatA;
>  EXTER object sLAread_baseA;
>  EXTER object sLAread_suppressA;
>  EXTER object sSY;
> @@ -377,32 +377,32 @@
>  EXTER object sSAprint_structureA;
>  EXTER object sSpretty_print_format;
>  EXTER object sSAprint_nansA;
> -      EXTER object fLformat (object strm, object control,...);
> +EXTER object fLformat (object strm, object control,...);
>  EXTER object sSAindent_formatted_outputA;
>  EXTER object fSsetenv (object variable,object value);
> -  EXTER object fLdelete_file (object path);
> -      EXTER object fLerror (object fmt_string,...);
> -      EXTER object fLspecific_error (object error_name,object 
> fmt_string,...);
> -      EXTER object fLspecific_correctable_error (object error_name,object 
> fmt_string,...);
> -      EXTER object fLcerror (object continue_fmt_string,object 
> fmt_string,...);
> -      EXTER object fSihs_top (void);
> -      EXTER object fSihs_fun (object x0);
> -      EXTER object fSihs_vs (object x0);
> -      EXTER object fSfrs_top (void);
> -      EXTER object fSfrs_vs (object x0);
> -      EXTER object fSfrs_bds (object x0);
> -      EXTER object fSfrs_class (object x0);
> -      EXTER object fSfrs_tag (object x0);
> -      EXTER object fSfrs_ihs (object x0);
> -      EXTER object fSbds_top (void);
> -      EXTER object fSbds_var (object x0);
> -      EXTER object fSbds_val (object x0);
> -      EXTER object fSvs_top (void);
> -      EXTER object fSvs (object x0);
> -      EXTER object fSsch_frs_base (object x0,object x1);
> -      EXTER object fSinternal_super_go (object tag,object x1,object x2);
> -            EXTER object sSuniversal_error_handler;
> -          EXTER object fSuniversal_error_handler (object x0,object x1,object 
> x2,object x3,object error_fmt_string);
> +EXTER object fLdelete_file (object path);
> +EXTER object fLerror (object fmt_string,...);
> +EXTER object fLspecific_error (object error_name,object fmt_string,...);
> +EXTER object fLspecific_correctable_error (object error_name,object 
> fmt_string,...);
> +EXTER object fLcerror (object continue_fmt_string,object fmt_string,...);
> +EXTER object fSihs_top (void);
> +EXTER object fSihs_fun (object x0);
> +EXTER object fSihs_vs (object x0);
> +EXTER object fSfrs_top (void);
> +EXTER object fSfrs_vs (object x0);
> +EXTER object fSfrs_bds (object x0);
> +EXTER object fSfrs_class (object x0);
> +EXTER object fSfrs_tag (object x0);
> +EXTER object fSfrs_ihs (object x0);
> +EXTER object fSbds_top (void);
> +EXTER object fSbds_var (object x0);
> +EXTER object fSbds_val (object x0);
> +EXTER object fSvs_top (void);
> +EXTER object fSvs (object x0);
> +EXTER object fSsch_frs_base (object x0,object x1);
> +EXTER object fSinternal_super_go (object tag,object x1,object x2);
> +EXTER object sSuniversal_error_handler;
> +EXTER object fSuniversal_error_handler (object x0,object x1,object x2,object 
> x3,object error_fmt_string);
>  EXTER object sSterminal_interrupt;
>  EXTER object sKwrong_type_argument;
>  EXTER object sKtoo_few_arguments;
> @@ -418,45 +418,46 @@
>  EXTER object sKcatch;
>  EXTER object sKprotect;
>  EXTER object sKcatchall;
> -  EXTER object fLget_universal_time (void);
> +EXTER object fLget_universal_time (void);
>  EXTER object fLget_internal_real_time (void);
>  EXTER object sSAdefault_time_zoneA;
> -     EXTER object fSgetpid (void);
> -     EXTER object fSuse_fast_links (object flag,...);
> +EXTER object fSgetpid (void);
> +EXTER object fSuse_fast_links (object flag,...);
>  EXTER object sScdefn;
>  EXTER object sLAlink_arrayA;
> -      EXTER object fSprofile (object start_address,object scale);
> -      EXTER object fSfunction_start (object funobj);
> -      EXTER object fSset_up_combined (object first,...);
> -      EXTER object fSdisplay_profile (object start_addr,object scal);
> -      EXTER object fSarray_adress (object array);
> +EXTER object fSprofile (object start_address,object scale);
> +EXTER object fSfunction_start (object funobj);
> +EXTER object fSread_externals (object x0);
> +EXTER object fSset_up_combined (object first,...);
> +EXTER object fSdisplay_profile (object start_addr,object scal);
> +EXTER object fSarray_adress (object array);
>  EXTER object sSAprofile_arrayA;
>  EXTER object sSAinterrupt_enableA;
>  EXTER object sSsigusr1_interrupt;
>  EXTER object sSsigio_interrupt;
> -     EXTER object sSsignal_safety_required (fixnum signo,fixnum safety);
> -     EXTER object fSallow_signal (fixnum n);
> -     EXTER object fSinitfun (object sym,object addr_ind,object argd,...);
> -     EXTER object fSinitmacro (object first,...);
> -     EXTER object fSset_key_struct (object key_struct_ind);
> -     EXTER object fSinvoke (object x);
> +EXTER object sSsignal_safety_required (fixnum signo,fixnum safety);
> +EXTER object fSallow_signal (fixnum n);
> +EXTER object fSinitfun (object sym,object addr_ind,object argd,...);
> +EXTER object fSinitmacro (object first,...);
> +EXTER object fSset_key_struct (object key_struct_ind);
> +EXTER object fSinvoke (object x);
>  EXTER object fSopen_named_socket (fixnum port);
> -     EXTER object fSclose_fd (fixnum fd);
> -     EXTER object fSclose_sfd (object sfd);
> -     EXTER object fSaccept_socket_connection (object named_socket);
> -     EXTER object fShostname_to_hostid (object host);
> -     EXTER object fSgethostname (void);
> -     EXTER object fShostid_to_hostname (object host_id);
> +EXTER object fSclose_fd (fixnum fd);
> +EXTER object fSclose_sfd (object sfd);
> +EXTER object fSaccept_socket_connection (object named_socket);
> +EXTER object fShostname_to_hostid (object host);
> +EXTER object fSgethostname (void);
> +EXTER object fShostid_to_hostname (object host_id);
>  EXTER object fScheck_fd_for_input (fixnum fd,fixnum timeout);
> -     EXTER object fSclear_connection (fixnum fd);
> +EXTER object fSclear_connection (fixnum fd);
>  EXTER object fSconnection_state_fd (object sfd);
>  EXTER object fSour_write (object sfd,object buffer,fixnum nbytes);
> -     EXTER object fSour_read_with_offset (object fd,object buffer,fixnum 
> offset,fixnum nbytes,fixnum timeout);
> -     EXTER object fSprint_to_string1 (object str,object x,object the_code);
> +EXTER object fSour_read_with_offset (object fd,object buffer,fixnum 
> offset,fixnum nbytes,fixnum timeout);
> +EXTER object fSprint_to_string1 (object str,object x,object the_code);
>  EXTER object fSset_sigio_for_fd (fixnum fd);
> -     EXTER object fSreset_string_input_stream (object strm,object 
> string,fixnum start,fixnum end);
> -     EXTER object fScheck_state_input (object osfd,fixnum timeout);
> -     EXTER object fSclear_connection_state (object osfd);
> +EXTER object fSreset_string_input_stream (object strm,object string,fixnum 
> start,fixnum end);
> +EXTER object fScheck_state_input (object osfd,fixnum timeout);
> +EXTER object fSclear_connection_state (object osfd);
>  EXTER object fSgetpeername (object sock);
>  EXTER object fSgetsockname (object sock);
> -     EXTER object fSset_blocking (object sock,object setBlocking);
> +EXTER object fSset_blocking (object sock,object setBlocking);

This as we know is a generated file.

> Index: info/gcl-si.texi
> ===================================================================
> RCS file: /cvsroot/gcl/gcl/info/gcl-si.texi,v
> retrieving revision 1.3
> diff -u -d -r1.3 gcl-si.texi
> --- info/gcl-si.texi  19 Feb 2002 19:21:19 -0000      1.3
> +++ info/gcl-si.texi  5 Oct 2003 14:01:08 -0000
> @@ -19,6 +19,10 @@
>  
>  @setchapternewpage odd
>  @ifinfo
> address@hidden GNU Common Lisp
> address@hidden
> +* GCL Systems Internals: (gcl-si).   GCL SYSTEM INTERNALS Manual
> address@hidden direntry
>  This is a Texinfo GCL SYSTEM INTERNALS Manual
>  

I'll look into this.

>  Copyright 1994 William F. Schelter
> Index: info/makefile
> ===================================================================
> RCS file: /cvsroot/gcl/gcl/info/makefile,v
> retrieving revision 1.26
> diff -u -d -r1.26 makefile
> --- info/makefile     8 Jul 2003 04:20:43 -0000       1.26
> +++ info/makefile     5 Oct 2003 14:01:08 -0000
> @@ -1,7 +1,7 @@
>  .SUFFIXES:
>  .SUFFIXES: .info .dvi  .texi
>  
> -INFO_DIR=/usr/local/lib/info
> +INFO_DIR=${prefix}/lib/info

Going in, thanks!

>  
>  GCL_DVI=gcl-tk.dvi gcl-si.dvi gcl.dvi
>  GCL_HTML=gcl-si_toc.html gcl-tk_toc.html gcl_toc.html
> @@ -9,12 +9,12 @@
>  
>  -include ../makedefs
>  
> -all: gcl-tk.info gcl-si.info gcl.info $(GCL_DVI) $(GCL_HTML)
> +all: gcl-tk.info gcl-si.info gcl.info
>  

no dvi and html docs?

>  .texi.info:
> -     rm -f $*.*gz
> -     -$(MAKEINFO) $*.texi
> -     - gzip $*.info-*
> +     rm -f $*gz
> +     rm -f $*.info
> +     -$(MAKEINFO) --no-split $*.texi
>  

GCL can read compressed info files.  The --no-split may be a good idea
-- what are the pros and cons?

>  GCL_SI= number.texi sequence.texi character.texi list.texi io.texi \
>       form.texi compile.texi symbol.texi system.texi structure.texi \
> @@ -32,19 +32,16 @@
>       TEXINPUTS=.:$$TEXINPUTS tex --interaction nonstopmode gcl-si.texi || 
> true
>  
>  gcl-si.info: ${GCL_SI} gcl-si.texi
> -     -$(MAKEINFO) gcl-si.texi        
>  
>  gcl-tk.dvi: ${GCL_TK} gcl-tk.texi
>       TEXINPUTS=.:$$TEXINPUTS tex --interaction nonstopmode gcl-tk.texi || 
> true
>  
>  gcl-tk.info: ${GCL_TK} gcl-tk.texi
> -     -$(MAKEINFO) gcl-tk.texi
>  
>  gcl.dvi: ${GCL_MAN} gcl.texi
>       TEXINPUTS=.:$$TEXINPUTS tex --interaction nonstopmode gcl.texi || true
>  
>  gcl.info: ${GCL_MAN} gcl.texi
> -     -$(MAKEINFO) gcl.texi
>  

Are these rules makefile defaults?

>  gcl-si_toc.html: ${GCL_SI} gcl-si.texi
>       $(HTML_CMD) gcl-si.texi
> @@ -61,20 +58,7 @@
>  install:
>       mkdir -p $(DESTDIR)${INFO_DIR}
>       [ -f $(DESTDIR)$(INFO_DIR)dir ] || touch $(DESTDIR)$(INFO_DIR)dir
> -     grep -q gcl-si $(DESTDIR)${INFO_DIR}dir || \
> -     echo "* GCL Doc: (gcl-si.info). GNU Common Lisp specific 
> Documentation." >> $(DESTDIR)${INFO_DIR}dir
> -     grep -q gcl-tk $(DESTDIR)${INFO_DIR}dir || \
> -     echo "* GCL TK Doc: (gcl-tk.info).      TK window GCL interface." >> 
> $(DESTDIR)${INFO_DIR}dir
> -     grep -q gcl.info $(DESTDIR)${INFO_DIR}dir || \
> -     echo "* GCL Ansi Doc: (gcl.info).  Ansi Common Lisp Specification." >> 
> $(DESTDIR)${INFO_DIR}dir
>       cp *.info* $(DESTDIR)${INFO_DIR}
> -     mkdir -p $(DESTDIR)$(INFO_DIR)../doc/gcl-doc/gcl.html
> -     mkdir -p $(DESTDIR)$(INFO_DIR)../doc/gcl-doc/gcl-si.html
> -     mkdir -p $(DESTDIR)$(INFO_DIR)../doc/gcl-doc/gcl-tk.html
> -     cp gcl_*html $(DESTDIR)$(INFO_DIR)../doc/gcl-doc/gcl.html
> -     cp gcl-si_*html $(DESTDIR)$(INFO_DIR)../doc/gcl-doc/gcl-si.html
> -     cp gcl-tk_*html $(DESTDIR)$(INFO_DIR)../doc/gcl-doc/gcl-tk.html
> -     cp *dvi $(DESTDIR)$(INFO_DIR)../doc/gcl-doc
>  

Perhaps we should break out these steps into separate makefile
targets?  They appear needed at least on some systems.

>  FILE=gcl-si.texi
>  srcs:
> @@ -90,4 +74,4 @@
>  
>  clean:
>       rm -f *.info* *.html *.dvi *.cp *.ky *.vr *.tp *.pg *.toc *.aux *.log 
> *.fn
> -     rm -rf gcl.IC gcl.IE gcl.IG gcl.IP gcl.IR gcl.IT gcl.fu 
> \ No newline at end of file
> +     rm -rf gcl.IC gcl.IE gcl.IG gcl.IP gcl.IR gcl.IT gcl.fu 
> Index: o/gcl_readline.d
> ===================================================================
> RCS file: /cvsroot/gcl/gcl/o/gcl_readline.d,v
> retrieving revision 1.2
> diff -u -d -r1.2 gcl_readline.d
> --- o/gcl_readline.d  14 Sep 2003 02:43:07 -0000      1.2
> +++ o/gcl_readline.d  5 Oct 2003 14:01:32 -0000
> @@ -94,7 +94,6 @@
>     the word to complete.  We can use the entire contents of rl_line_buffer
>     in case we want to do some simple parsing.  Return the array of matches,
>     or NULL if there aren't any. */
> -extern char **completion_matches(char *,char *(*)(char *,int));
>  static char **rl_completion(char *text, int start, int end) {
>       return completion_matches(text, rl_completion_words);

Will look into this .

>  }
> Index: o/makefile
> ===================================================================
> RCS file: /cvsroot/gcl/gcl/o/makefile,v
> retrieving revision 1.28
> diff -u -d -r1.28 makefile
> --- o/makefile        14 Sep 2003 02:43:07 -0000      1.28
> +++ o/makefile        5 Oct 2003 14:01:32 -0000
> @@ -79,6 +79,7 @@
>       $(OD)makefun.o $(OD)sockets.o $(OD)clxsocket.o  \
>       $(OD)init_pari.o $(OD)nsocket.o $(NEW_INIT) $(MPFILES) $(SFASL) 
> $(EXTRAS) \
>       $(RL_OBJS)
> +INI_FILES=$(patsubst %.o,%.ini,${OBJS})
>  
>  all:  ../bin/dpp${EXE} $(OBJS) new-init $(LIBFILES) new_init.o  $(GCLIB) 
> $(LAST_FILE)  $(FIRST_FILE) 
>  
> @@ -89,10 +90,10 @@
>       ${CC} ${DEFS} -DUNIX -o ../bin/dpp${EXE} ../bin/dpp.c
>  
>  
> -new-init: grab_defs
> -     $(MAKE) new_init.c decls1 "INI_FILES=`echo ${OBJS} | sed -e 
> 's:\.o:.ini:g'  -e 's:new_init.o::g' `"
> +new-init:
> +     $(MAKE) new_init.c decls1
>  
> -new_init.c: ${INI_FILES}
> +new_init.c: grab_defs ${INI_FILES}
>       echo '#include "make-init.h"' > new_init.c
>       echo 'void NewInit(void){' >> new_init.c
>       cat ${INI_FILES} >> new_init.c

I like this, going in, thanks!

> @@ -100,10 +101,10 @@
>  
>  ifneq ($(NIFLAGS),)
>  new_init.o: new_init.c
> -     $(CC) -c $(NIFLAGS) $(DEFS) $< -o $@
> +     $(CC) -c $(NIFLAGS) $(CFLAGS) $(DEFS) $< -o $@
>  endif

Can't do this, this is a work-around for a long-standing gcc bug on
ppc.  Have to decrease the optimization on this file alone.  Could
recheck now that the ini setup has changed with the ia64 fixes.

>  
> -decls1:
> +decls1: grab_defs ${INI_FILES}
>       echo '#include "make-decl.h"' > foo.c
>       cat ${INI_FILES} >> foo.c
>       ${CC} -E -I${HDIR} foo.c | sed -n -e '/#/d' -e '/DO_/d' -e 
> '/[a-zA-Z;]/p' > tmpx

Going in, thanks!

> Index: o/sfaslelf.c
> ===================================================================
> RCS file: /cvsroot/gcl/gcl/o/sfaslelf.c,v
> retrieving revision 1.8
> diff -u -d -r1.8 sfaslelf.c
> --- o/sfaslelf.c      24 Jul 2002 19:05:53 -0000      1.8
> +++ o/sfaslelf.c      5 Oct 2003 14:01:33 -0000
> @@ -23,7 +23,7 @@
>   */
>  
>  
> -#ifndef __linux__
> +#if !defined(__linux__) && !defined(__FreeBSD__)
>  #define ELF_TARGET_SPARC 1
>  #endif
>  
> @@ -83,7 +83,7 @@
>   if (!(symin=fopen(symfile,"r")))
>     {perror(symfile);exit(1);};
>   if(!fread((char *)&tab,sizeof(tab),1,symin))
> -   FEerror("No header",0,0);
> +   FEerror("No header",0);
>   symbols=malloc(tab.tot_leng);
>   c_table.alloc_length=( (PTABLE_EXTRA+ tab.n_symbols));
>   (c_table.ptable) = (TABL *) malloc(sizeof(struct node) * 
> c_table.alloc_length);
> @@ -196,7 +196,7 @@
>     file = fileno(fp);
>  
>     if (fstat (file, &stat_buf) == -1)
> -     FEerror ("Can't fstat(~a): errno %d\n", 1,faslfile);
> +     FEerror ("Can't fstat(~a): errno %d\n", 2,faslfile,0);
>  
>  
>     if (use_mmap) {
> @@ -303,7 +303,7 @@
>     
>     relocate_symbols(symbol_table,nsyms,file_h->e_shnum,&init_address);
>     if (init_address < 0)
> -     { FEerror(0,"Init address not found ");
> +     { FEerror("Init address not found ",0);
>       }
>  
>     { 
> @@ -317,7 +317,7 @@
>          {
>            int index_to_relocate = shp->sh_info;
>            if (symtab_index != shp->sh_link)
> -            FEerror("unexpected symbol table used");
> +            FEerror("unexpected symbol table used",0);
>            the_start = start_address + section[index_to_relocate].start;
>          }
>  /*    else if (shp->sh_type == SHT_REL */
> @@ -332,7 +332,7 @@
>        else if ( (shp->sh_type == SHT_REL) || (shp->sh_type == SHT_RELA) )
>          {  if (get_section_number(".rel.stab") == j)
>                continue;
> -          FEerror("unknown rel type");
> +          FEerror("unknown rel type",0);
>          }
>        else
>          continue;
> @@ -520,7 +520,7 @@
>      else if (sh_type == SHT_REL)
>        a = 0;
>      else {
> -      FEerror("relocate() error: unknown sh_type in ELF object");
> +      FEerror("relocate() error: unknown sh_type in ELF object",0);
>        a=0;
>      }
>      b = (unsigned int) the_start;
> @@ -540,9 +540,9 @@
>  /*      do_bfd_reloc(ELF32_R_TYPE(reloc_info->r_info),s+a,(unsigned int 
> *)where); */
>  /*  #else */
>      switch(ELF32_R_TYPE(reloc_info->r_info)){
> -#if (defined(__svr4__) || defined(__linux__)) && defined(__i386__)
> +#if (defined(__svr4__) || defined(__linux__) || defined(__FreeBSD__)) && 
> defined(__i386__)
>      case     R_386_NONE:
> -      FEerror("Unsupported ELF type R_386_NONE");
> +      FEerror("Unsupported ELF type R_386_NONE",0);
>        break;
>  
>      case     R_386_32:
> @@ -556,40 +556,40 @@
>        break;
>  
>      case     R_386_GOT32:
> -      FEerror("Unsupported ELF type R_386_GOY32");
> +      FEerror("Unsupported ELF type R_386_GOY32",0);
>        break;
>  
>      case     R_386_PLT32:
> -      FEerror("Unsupported ELF type R_386_PLT32");
> +      FEerror("Unsupported ELF type R_386_PLT32",0);
>        break;
>  
>      case     R_386_COPY:
> -      FEerror("Unsupported ELF type R_386_COPY");
> +      FEerror("Unsupported ELF type R_386_COPY",0);
>        break;
>  
>      case     R_386_GLOB_DAT:
> -      FEerror("Unsupported ELF type R_386_GLOB_DAT");
> +      FEerror("Unsupported ELF type R_386_GLOB_DAT",0);
>        break;
>  
>      case     R_386_JMP_SLOT:
> -      FEerror("Unsupported ELF type R_386_JMP_SLOT");
> +      FEerror("Unsupported ELF type R_386_JMP_SLOT",0);
>        break;
>  
>      case     R_386_RELATIVE:
> -      FEerror("Unsupported ELF type R_386_RELATIVE");
> +      FEerror("Unsupported ELF type R_386_RELATIVE",0);
>        break;
>  
>      case     R_386_GOTOFF:
> -      FEerror("Unsupported ELF type R_386_GOTOFF");
> +      FEerror("Unsupported ELF type R_386_GOTOFF",0);
>        break;
>  
>      case     R_386_GOTPC:
> -      FEerror("Unsupported ELF type R_386_GOTPC");
> +      FEerror("Unsupported ELF type R_386_GOTPC",0);
>        break;
>  
>  #ifdef R_386_NUM
>      case     R_386_NUM:
> -      FEerror("Unsupported ELF type R_386_NUM");
> +      FEerror("Unsupported ELF type R_386_NUM",0);
>        break;
>  #endif
>  
> @@ -657,7 +657,7 @@
>         fflush(stdout);
>       }
>      }
> -  else{FEerror("symbol table not loaded",0,0);}
> +  else{FEerror("symbol table not loaded",0);}
>  }
>  
>  static void

All of this is going int, thanks!  But I thought you were using bfd
for relocation, i.e. sfaslbfd.c?  This should only be included when
using --enable-custreloc.


> Index: o/unixfasl.c
> ===================================================================
> RCS file: /cvsroot/gcl/gcl/o/unixfasl.c,v
> retrieving revision 1.5
> diff -u -d -r1.5 unixfasl.c
> --- o/unixfasl.c      14 Sep 2003 02:43:08 -0000      1.5
> +++ o/unixfasl.c      5 Oct 2003 14:01:33 -0000
> @@ -282,7 +282,7 @@
>  static int
>  faslink(object faslfile, object ldargstring)
>  {
> -#if defined(__linux__) && defined(__ELF__)
> +#if (defined(__linux__) || defined(__FreeBSD__)) && defined(__ELF__)
>    FEerror("faslink() not supported for ELF yet",0);
>    return 0;

Going in, thanks!

>  #else
> Index: pcl/makefile
> ===================================================================
> RCS file: /cvsroot/gcl/gcl/pcl/makefile,v
> retrieving revision 1.8
> diff -u -d -r1.8 makefile
> --- pcl/makefile      2 Oct 2003 14:26:24 -0000       1.8
> +++ pcl/makefile      5 Oct 2003 14:01:33 -0000
> @@ -34,10 +34,6 @@
>       rm -f *.o *gazonk*
>       cp ../h/cmpinclude.h .
>       echo ${SETUP} '(pcl::compile-pcl)' | ../unixport/saved_mod_gcl 
> ../unixport/
> -# FIXME -- small compiler setjmp/volatile detection bug -- CM
> -# doesn't seem to be needed now, but investigate more later
> -#    patch -p0 <pcl_methods.patch
> -#    rm -f pcl_methods.o

Want this for documentation.

>       for i in gazonk* ; do j=$$(echo $$i | sed 's,\..*$$,,1');\
>               cat $$i | sed "s,$$j,pcl_$$j,g" >pcl_$$i && rm $$i; done
>  
> @@ -46,7 +42,8 @@
>       ../xbin/append $*.data $@
>  
>  clean:
> -     rm -f *.o *.fn *.exe *.dll saved_gcl_pcl cmpinclude.h
> +     rm -f *.o *.fn *.exe *.dll saved_gcl_pcl
> +     rm -f *.[ch] *gazonk*
>  

Pending Windows ansi.

>  
>  # remake the sys-package.lisp and sys-proclaim.lisp files
> Index: unixport/makefile
> ===================================================================
> RCS file: /cvsroot/gcl/gcl/unixport/makefile,v
> retrieving revision 1.48
> diff -u -d -r1.48 makefile
> --- unixport/makefile 24 Sep 2003 16:30:12 -0000      1.48
> +++ unixport/makefile 5 Oct 2003 14:03:52 -0000
> @@ -14,29 +14,11 @@
>  PORTDIR = $(shell pwd)
>  
>  LD_LIBS_PRE=$(addprefix -u ,$(PATCHED_SYMBOLS))
> -LD_LIBS_POST=$(LIBS) $(LIBC) -lgclp
> +LD_LIBS_POST=$(LIBS) $(LIBC) -lgclp ${OBJ}/${SYS}/lib/libspad.a

Pleaxe consider my axiom advice above.


>  
>  libgclp.a: $(ODIR)/gcllib.a
>       cp $< $@
>  
> -gmpfiles: $(shell find ../$(GMPDIR) -name "*.o" |grep -v '\.lib')
> -     rm -rf gmp
> -     mkdir gmp
> -     a="$^" ; \
> -     for i in $^ ; do \
> -             cp $$i gmp/$$(echo $$i | sed -e 's,\.\./,,1' -e 's,/,_,g') ; \
> -     done
> -     touch $@
> -
> -bfdfiles: $(shell find ../binutils -name "*.o")
> -     rm -rf bfd
> -     mkdir bfd
> -     a="$^" ; \
> -     for i in $$a ; do \
> -             cp $$i bfd/$$(echo $$i | sed -e 's,\.\./,,1' -e 's,/,_,g') ; \
> -     done 
> -     touch $@
> -

Gotta keep this.

>  OOBJS:=$(shell j=$$(ar t $(ODIR)/gcllib.a) ; for i in $$(ls -1 $(ODIR)/*.o) 
> ; do if ! echo $$j |grep -q $$(basename $$i) ; then echo $$i ; fi ; done)
>  OBJS:=$(OOBJS) $(shell ls -1 $(LSPDIR)/*.o)
>  OBJS:=$(OBJS) $(shell ls -1 $(CMPDIR)/*.o | grep -v collectfn.o)
> @@ -114,28 +96,28 @@
>  $(HDIR)/mdefs.h: $(HDIR)/include.h
>       cat $(HDIR)/include.h | sed -e "/include/d" > $(HDIR)/mdefs.h
>  
> -libgcl.a: $(FIRST_FILE) $(OBJS) sys_gcl.o $(LAST_FILE) gmpfiles bfdfiles
> +libgcl.a: $(FIRST_FILE) $(OBJS) sys_gcl.o $(LAST_FILE)
>       rm -rf $@
> -     ar rs $@ $(filter %.o,$^) $(shell find gmp bfd -name "*.o")
> +     ar rs $@ $(filter %.o,$^)
>  
> -libpre_gcl.a: $(FIRST_FILE) $(OOBJS) sys_pre_gcl.o $(LAST_FILE) gmpfiles 
> bfdfiles
> +libpre_gcl.a: $(FIRST_FILE) $(OOBJS) sys_pre_gcl.o $(LAST_FILE)
>       rm -rf $@
> -     ar rs $@ $(filter %.o,$^) $(shell find gmp bfd -name "*.o")
> +     ar rs $@ $(filter %.o,$^)
>  
> -libmod_gcl.a: $(FIRST_FILE) $(OBJS) $(MODOBJS) sys_mod_gcl.o $(LAST_FILE) 
> gmpfiles bfdfiles
> +libmod_gcl.a: $(FIRST_FILE) $(OBJS) $(MODOBJS) sys_mod_gcl.o $(LAST_FILE)
>       rm -rf $@
> -     ar rs $@ $(filter %.o,$^) $(shell find gmp bfd -name "*.o")
> +     ar rs $@ $(filter %.o,$^)
>  
>  libxgcl.a: libgcl.a
>       ln -snf $< $@
>  
> -libansi_gcl.a: $(FIRST_FILE) $(OBJS) $(ANSIOBJS) sys_ansi_gcl.o $(LAST_FILE) 
> gmpfiles bfdfiles
> +libansi_gcl.a: $(FIRST_FILE) $(OBJS) $(ANSIOBJS) sys_ansi_gcl.o $(LAST_FILE)
>       rm -rf $@
> -     ar rs $@ $(filter %.o,$^) $(shell find gmp bfd -name "*.o")
> +     ar rs $@ $(filter %.o,$^)
>  
> -libpcl_gcl.a: $(FIRST_FILE) $(OBJS) $(PCLOBJS) sys_pcl_gcl.o $(LAST_FILE) 
> gmpfiles bfdfiles
> +libpcl_gcl.a: $(FIRST_FILE) $(OBJS) $(PCLOBJS) sys_pcl_gcl.o $(LAST_FILE)
>       rm -rf $@
> -     ar rs $@ $(filter %.o,$^) $(shell find gmp bfd -name "*.o")
> +     ar rs $@ $(filter %.o,$^)
>  
>  raw_%: lib%.a libgclp.a $(SYSTEM_OBJS) $(EXTRAS)
>       $(CC) -o raw_$*$(EXE) $(filter %.o,$^) \
> @@ -143,8 +125,8 @@
>  
>  clean:
>       rm -rf  saved_*$(EXE) raw_*$(EXE) *.o core a.out $(RSYM) \
> -             $(LSPDIR)/auto_new.lsp foo *maxima* init_*.lsp lib*.a gmp* bfd* 
> *.lsp.tmp \
> +             $(LSPDIR)/auto_new.lsp foo *maxima* init_*.lsp lib*.a *.lsp.tmp 
> \
>               gazonk*.lsp
>  
>  .INTERMEDIATE: init_ansi_gcl.lsp.tmp init_gcl.lsp.tmp raw_gcl raw_ansi_gcl
> -.PRECIOUS: init_gcl.lsp init_ansi_gcl.lsp
> \ No newline at end of file
> +.PRECIOUS: init_gcl.lsp init_ansi_gcl.lsp

Gotta keep these gmp and bfd options.


> Index: unixport/rsym_elf.c
> ===================================================================
> RCS file: /cvsroot/gcl/gcl/unixport/rsym_elf.c,v
> retrieving revision 1.10
> diff -u -d -r1.10 rsym_elf.c
> --- unixport/rsym_elf.c       25 Jul 2002 21:49:47 -0000      1.10
> +++ unixport/rsym_elf.c       5 Oct 2003 14:03:52 -0000
> @@ -136,7 +136,6 @@
>       unsigned int i;
>       FILE *fp;
>       int symsize;
> -     extern char *malloc();
>       

OK, going in, thanks!

>          
>       fp = fopen(filename, RDONLY);
> _______________________________________________
> Gcl-devel mailing list
> address@hidden
> http://mail.gnu.org/mailman/listinfo/gcl-devel

Take care,


-- 
Camm Maguire                                            address@hidden
==========================================================================
"The earth is but one country, and mankind its citizens."  --  Baha'u'llah




reply via email to

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