[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gcl-devel] Making GCL-2.6.5pre work on FreeBSD
From: |
Mark Murray |
Subject: |
[Gcl-devel] Making GCL-2.6.5pre work on FreeBSD |
Date: |
Fri, 13 Aug 2004 15:55:03 +0100 |
Hi
Here is my current patchset to make GCL-2.6.5pre work as a FreeBSD
"port" (like RPM, sorta). I'll comment on each patch individually.
This includes a bit of a hack to make sure that the piggybacked gmp
doesn't get invoked. The second half of the patch fixes the TCL/TK
inclusions, etc. As part of the FreeBSD build, I blow away configure,
and use autoconfig/automake to build a new one.
Index: configure.in
===================================================================
RCS file: /cvsroot/gcl/gcl/configure.in,v
retrieving revision 1.112.4.1.2.2.2.47.2.3.2.1.4.1
diff -u -d -r1.112.4.1.2.2.2.47.2.3.2.1.4.1 configure.in
--- configure.in 12 Aug 2004 16:39:29 -0000
1.112.4.1.2.2.2.47.2.3.2.1.4.1
+++ configure.in 13 Aug 2004 14:39:28 -0000
@@ -598,6 +598,7 @@
NEED_LOCAL_GMP=1;
fi
+if false ; then
if test "$NEED_LOCAL_GMP" != "" ; then
AC_MSG_CHECKING([use_gmp=yes, doing configure in gmp directory])
@@ -630,6 +631,9 @@
fi
fi
+else
+ MP_INCLUDE=gmp.h
+fi
AC_MSG_CHECKING("for leading underscore in object symbols")
cat>foo.c <<EOFF
@@ -1657,15 +1661,15 @@
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}
+ if test -f ${TK_CONFIG_PREFIX}/../../include/tk${TCL_VERSION}/tk.h ; then
+ TK_INCLUDE=-I${TK_CONFIG_PREFIX}/../../include/tk${TCL_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}
+ if test -f ${TK_CONFIG_PREFIX}/../../include/tcl${TCL_VERSION}/tcl.h ; then
+ TCL_INCLUDE=-I${TK_CONFIG_PREFIX}/../../include/tcl${TCL_VERSION}
fi
fi
AC_CHECK_LIB(lieee,main,have_ieee=1,have_ieee=0)
Tidy up the Emacs and info locations.
Index: makedefc.in
===================================================================
RCS file: /cvsroot/gcl/gcl/makedefc.in,v
retrieving revision 1.15.6.3
diff -u -d -r1.15.6.3 makedefc.in
--- makedefc.in 10 Mar 2004 22:51:36 -0000 1.15.6.3
+++ makedefc.in 13 Aug 2004 14:39:31 -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
# numerous TCL/TK variables culled from the tkConfig.sh and tclConfig.sh
# if these are found.
Tidy up the Emacs and info locations. Some of this is a local hack
to not install the info stuff from here. There is a "proper" info
install later. Please add the last part. The lack of the \n at the
end of the file is annoying ;-).
Index: makefile
===================================================================
RCS file: /cvsroot/gcl/gcl/makefile,v
retrieving revision 1.73.4.2.2.21.6.1
diff -u -d -r1.73.4.2.2.21.6.1 makefile
--- makefile 5 Aug 2004 22:49:39 -0000 1.73.4.2.2.21.6.1
+++ makefile 13 Aug 2004 14:39:31 -0000
@@ -165,10 +165,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 -)
if gcc --version | grep -i mingw >/dev/null 2>&1 ; then if grep -i
oncrpc makedefs >/dev/null 2>&1 ; then cp /mingw/bin/oncrpc.dll
$(DESTDIR)$(INSTALL_LIB_DIR)/$(PORTDIR); fi ; fi
cd $(DESTDIR)$(INSTALL_LIB_DIR)/$(PORTDIR) && \
@@ -262,4 +263,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
Make some aspects of the build less hardcoded. Some of the
funnier things (the @@.FOO@@ stuff is to allow the port
build to select a compiler options and so on The lines
immediately following those lines are what sed did to them,
and are reasonable defaults. Note the -lgmp, however, which
may be a bit hackish.
Index: h/FreeBSD.defs
===================================================================
RCS file: /cvsroot/gcl/gcl/h/FreeBSD.defs,v
retrieving revision 1.2.6.1.4.1
diff -u -d -r1.2.6.1.4.1 FreeBSD.defs
--- h/FreeBSD.defs 15 Jul 2004 16:28:43 -0000 1.2.6.1.4.1
+++ h/FreeBSD.defs 13 Aug 2004 14:39:54 -0000
@@ -1,12 +1,16 @@
-# 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
+LBINDIR=${prefix}/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
+#CFLAGS = @@.CFLAGS@@
+CFLAGS = -O -pipe -I/usr/local/include
+CFLAGS += -fomit-frame-pointer -fsigned-char -DVOL=volatile -I$(GCLDIR)/o
-I${prefix}/include
+#LIBS = @@.LOCALLIBS@@
+LIBS = -L/usr/local/lib -lgmp -lm -lreadline
#ODIR_DEBUG=
NULLFILE=../h/twelve_null
FreeBSD doesn't like this.
Index: h/linux.h
===================================================================
RCS file: /cvsroot/gcl/gcl/h/linux.h,v
retrieving revision 1.7.6.4
diff -u -d -r1.7.6.4 linux.h
--- h/linux.h 3 May 2004 21:35:58 -0000 1.7.6.4
+++ h/linux.h 13 Aug 2004 14:39:56 -0000
@@ -138,8 +138,6 @@
sprintf(command, "ld -d -S -N -x -A %s -T %x %s %s -o %s", \
main,start,input,ldarg,output)
-#define SET_SESSION_ID() (setpgrp() ? -1 : 0)
-
#define CLEANUP_CODE \
setbuf(stdin,0); \
setbuf(stdout,0);
These seem to be better placed here?
Index: h/notcomp.h
===================================================================
RCS file: /cvsroot/gcl/gcl/h/notcomp.h,v
retrieving revision 1.15.6.3.8.1
diff -u -d -r1.15.6.3.8.1 notcomp.h
--- h/notcomp.h 12 Aug 2004 16:27:43 -0000 1.15.6.3.8.1
+++ h/notcomp.h 13 Aug 2004 14:39:56 -0000
@@ -82,9 +82,21 @@
pack == LISP ? LISP_makefun(string,fname,argd) : \
error("Bad pack variable in MAKEFUN\n"))
+#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)))
+
#define SI 0
#define LISP 1
Silence some whining from the info system.
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 13 Aug 2004 14:39:58 -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
Copyright 1994 William F. Schelter
Clean up the info building and installing. I believe this
is a more caninical way of doing things, and it looks a
bit cleaner mto me. The very first bit is a hack to not
install HTML and DVI. The rest, I think, is good.
Index: info/makefile
===================================================================
RCS file: /cvsroot/gcl/gcl/info/makefile,v
retrieving revision 1.23.6.4.2.1
diff -u -d -r1.23.6.4.2.1 makefile
--- info/makefile 25 Jun 2004 22:40:25 -0000 1.23.6.4.2.1
+++ info/makefile 13 Aug 2004 14:39:58 -0000
@@ -11,12 +11,12 @@
-include ../makedefs
-all: gcl-tk.info gcl-si.info $(GCL_DVI) $(GCL_HTML) #gcl.info
+all: gcl-tk.info gcl-si.info
.texi.info:
- rm -f $*.*gz
- -$(MAKEINFO) $*.texi
- - gzip $*.info-*
+ rm -f $*gz
+ rm -f $*.info
+ -$(MAKEINFO) --no-split $*.texi
GCL_SI= number.texi sequence.texi character.texi list.texi io.texi \
form.texi compile.texi symbol.texi system.texi structure.texi \
@@ -34,19 +34,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
#gcl-si_toc.html: ${GCL_SI} gcl-si.texi
# $(HTML_CMD) gcl-si.texi
@@ -69,15 +66,15 @@
install-html: gcl-tk_toc.html gcl-si_toc.html gcl_toc.html
cp *.html /d/www/gcl
-install: $(GCL_DVI) $(GCL_HTML)
+install:
mkdir -p $(DESTDIR)${INFO_DIR}
- [ -f $(DESTDIR)$(INFO_DIR)dir ] || touch $(DESTDIR)$(INFO_DIR)dir
- grep gcl-si $(DESTDIR)${INFO_DIR}dir >/dev/null 2>&1 || \
- echo "* GCL Doc: (gcl-si.info). GNU Common Lisp specific
Documentation." >> $(DESTDIR)${INFO_DIR}dir
- grep gcl-tk $(DESTDIR)${INFO_DIR}dir >/dev/null 2>&1 || \
- echo "* GCL TK Doc: (gcl-tk.info). TK window GCL interface." >>
$(DESTDIR)${INFO_DIR}dir
- grep gcl.info $(DESTDIR)${INFO_DIR}dir >/dev/null 2>&1 || \
- echo "* GCL Ansi Doc: (gcl.info). Ansi Common Lisp Specification." >>
$(DESTDIR)${INFO_DIR}dir
+ [ -f $(DESTDIR)$(INFO_DIR)/dir ] || touch $(DESTDIR)$(INFO_DIR)/dir
+ grep gcl-si $(DESTDIR)${INFO_DIR}/dir >/dev/null 2>&1 || \
+ echo "* GCL Doc: (gcl-si.info). GNU Common Lisp specific
Documentation." >> $(DESTDIR)${INFO_DIR}/dir
+ grep gcl-tk $(DESTDIR)${INFO_DIR}/dir >/dev/null 2>&1 || \
+ echo "* GCL TK Doc: (gcl-tk.info). TK window GCL interface." >>
$(DESTDIR)${INFO_DIR}/dir
+ grep gcl.info $(DESTDIR)${INFO_DIR}/dir >/dev/null 2>&1 || \
+ 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
@@ -88,10 +85,10 @@
# -cp gcl/* $(DESTDIR)$(INFO_DIR)../doc/gcl-doc/gcl.html
# -cp gcl-si/* $(DESTDIR)$(INFO_DIR)../doc/gcl-doc/gcl-si.html
# -cp gcl-tk/* $(DESTDIR)$(INFO_DIR)../doc/gcl-doc/gcl-tk.html
- -mkdir -p $(DESTDIR)$(INFO_DIR)../doc
+# -mkdir -p $(DESTDIR)$(INFO_DIR)../doc
# -cp -r gcl-si gcl gcl-tk $(DESTDIR)$(INFO_DIR)../doc
- -cp -r gcl-si gcl-tk $(DESTDIR)$(INFO_DIR)../doc
- -cp *dvi $(DESTDIR)$(INFO_DIR)../doc
+# -cp -r gcl-si gcl-tk $(DESTDIR)$(INFO_DIR)../doc
+# -cp *dvi $(DESTDIR)$(INFO_DIR)../doc
FILE=gcl-si.texi
srcs:
@@ -107,4 +104,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 gcl gcl-si
gcl-tk
\ No newline at end of file
+ rm -rf gcl.IC gcl.IE gcl.IG gcl.IP gcl.IR gcl.IT gcl.fu gcl gcl-si
gcl-tk
Thanks!
M
--
Mark Murray
iumop ap!sdn w,I idlaH
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Gcl-devel] Making GCL-2.6.5pre work on FreeBSD,
Mark Murray <=