[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Installing AKCL on MIPS/RISCOS
On Tue, 16 Jun 92 16:46:13 +1000,
berglas@cs.uq.oz.au said:
berglas> I have attempted to install AKCL 1.615 on a Mips
berglas> running Riscos and it don't go. I have used the
berglas> sgi4d definitions.
berglas> I would like to here from anybody that
berglas> 1) has ever got AKCL woring on the mips.
Yes.
berglas> 2) has any knowledge about the sgi4d port
No.
berglas> 3) understands the differences between riscos and sgi.
No.
Here is my experience.
Machine and os:
$ uname -A
srarc2 srarc2 4_52C UMIPS mips RC6280 ATT_V3_0
C Compiler: gcc 2.2.2
I use this gcc with command name as ``gcc-sysv''
$ cat ~gnu/src/gcc-2.2.2/config.status
#!/bin/sh
# GCC was configured as follows:
./configure mips-mips-sysv
Source code: akcl-1-615
ChangeLog:
Thu Jun 25 16:02:00 1992 Nobuyuki Hikichi (lisp@srarc2)
* c/save_sgi4.c(filepy): use std C cpp operation with __STDC__.
* unixport/makefile: patch for compiling with gcc.
Install step:
Using following patch without unixport/makefile, I execute,
$ add-defs mips4
$ make -f Smakefile
When I get the error linking *.o, I add the patch for
``unixport/makefile''. And I reinvoke it again.
$ makef -f Smakefile
Name: Nobuyuki Hikichi <hikichi@sra.co.jp>
Office: Software Research Associates, Inc. Japan.
Patch:
#!/bin/sh
# This is a shell archive (produced by shar 3.49)
# To extract the files from this archive, save it to a file, remove
# everything above the "!/bin/sh" line above, and type "sh file_name".
#
# made 06/25/1992 07:04 UTC by lisp@srarc2
# Source directory /local/lisp/src/akcl-1-615
#
# existing files will NOT be overwritten unless -c is specified
#
# This shar contains:
# length mode name
# ------ ---------- ------------------------------------------
# 1479 -rw-r--r-- h/mips4.defs
# 1289 -rw-r--r-- h/mips4.h
# 1429 -rw-rw-rw- RISCos.diff
#
# ============= h/mips4.defs ==============
if test ! -d 'h'; then
echo 'x - creating directory h'
mkdir 'h'
fi
if test -f 'h/mips4.defs' -a X"$1" != X"-c"; then
echo 'x - skipping h/mips4.defs (File already exists)'
else
echo 'x - extracting h/mips4.defs (Text)'
sed 's/^X//' << 'SHAR_EOF' > 'h/mips4.defs' &&
X
# Machine dependent makefile definitions for MIPS RISC os 4.X
X
LBINDIR=/usr/local/bin
X
OFLAG =
#LIBS = -lm -lbsd
# for gcc
LIBS = -lm
ODIR_DEBUG= -g
NULLFILE = ../h/twelve_null
SHELL=/bin/sh
X
.IGNORE:
X
# This CC string will be used for compilation of the system,
# and also in the compiler::*cc* variable for later compilation of
# lisp files.
X
# also defined in `machine'.h file
# The one here must be >= the one in the .h file.
# It must be a multiple of 0x200000 greater that 0x400000 the
# default text start.
DBEGIN= A00000
X
# If you don't plan on linking in a lot of other stuff
# like maxima, you can increase the -G 8 to -G 800 or so.
# That should be a bit faster..
X
#CC = cc -systype sysv -DVOL=volatile -Olimit 798 -G 8 -I${AKCLDIR}/o -I/usr/include/bsd
#LDCC = cc -systype sysv -Wl,-D -Wl,${DBEGIN}
CC = gcc-sysv -DVOL=volatile -G 8 -I${AKCLDIR}/o
LDCC = gcc-sysv -D ${DBEGIN}
X
# Where the original KCL distribution resides.
X
MAINDIR = /usr/local/lisp/src/kcl
X
# Enable the fastloading mechanism which does not use ld -A
# requires c/rel_.. machine dependent code.
X
# RSYM = rsym
# SFASL = $(ODIR)/sfasl.o
X
# When using SFASL it is good to have (si::build-symbol-table)
# INITFORM=(si::build-symbol-table)
# incremental loading with -A requires -G 0
#INITFORM=(setq compiler::*cc* "cc -systype bsd43 -DVOL=volatile -G 0 ")
INITFORM=(setq compiler::*cc* "gcc-sysv -DVOL=volatile -G 0 ")
X
# Use symbolic links
SYMB=-s
X
EMUL= $(ODIR)/sgi4d_emul.o
X
RANLIB= ar lts
SHAR_EOF
chmod 0644 h/mips4.defs ||
echo 'restore of h/mips4.defs failed'
Wc_c="`wc -c < 'h/mips4.defs'`"
test 1479 -eq "$Wc_c" ||
echo 'h/mips4.defs: original size 1479, current size' "$Wc_c"
fi
# ============= h/mips4.h ==============
if test -f 'h/mips4.h' -a X"$1" != X"-c"; then
echo 'x - skipping h/mips4.h (File already exists)'
else
echo 'x - extracting h/mips4.h (Text)'
sed 's/^X//' << 'SHAR_EOF' > 'h/mips4.h' &&
#define SGI
#include "att.h"
X
#define ADDITIONAL_FEATURES \
X ADD_FEATURE("RISC os"); \
X ADD_FEATURE("MIPS")
X
/* #define mips 1
X The system defines this
X */
#define IEEEFLOAT
X
#undef FILECPY_HEADER
#define FILECPY_HEADER \
X filecpy(save, original, header.a_text);
X
X
X /* text relocated; data is page-aligned after the text */
#define DATA_BEGIN (char *)((TXTRELOC+header.a_text+(PAGSIZ-1)) & ~(PAGSIZ-1))
X
#define PAGSIZ 4096
#define TXTRELOC 4096
X
#undef SET_REAL_MAXPAGE
#define SET_REAL_MAXPAGE real_maxpage = MAXPAGE
X
#define RELOC_FILE "rel_mips.c"
X
#undef SFASL
X
#ifdef SYSTYPE_BSD43
#undef NEED_GETWD
#else
#undef LISTEN_FOR_INPUT
#define GETCWD
#endif
X
#define SEEK_TO_END_OFILE \
X do{HDRR symhdr; \
X fp = faslfile->sm.sm_fp;\
X fread(&fileheader, sizeof(fileheader), 1, fp); \
X fseek(fp, fileheader.f_symptr, 0); \
X fread(&symhdr, cbHDRR, 1, fp); \
X fseek(fp, symhdr.cbExtOffset + symhdr.iextMax * cbEXTR, 0);} \
X while(0);
X
X
#ifdef IN_UNIXFSYS
#undef ATT
#define BSD
#endif
X
/* #define DBEGIN 0x10000000 */
#define DBEGIN 0x600000
X
#define UNIXSAVE "save_sgi4.c"
#define UNIXFASL "faslsgi4.c"
#ifdef SYSTYPE_BSD43
#define HAVE_GETDTABLESIZE
#endif
X
/* Begin for cmpinclude */
X
X
/* End for cmpinclude */
SHAR_EOF
chmod 0644 h/mips4.h ||
echo 'restore of h/mips4.h failed'
Wc_c="`wc -c < 'h/mips4.h'`"
test 1289 -eq "$Wc_c" ||
echo 'h/mips4.h: original size 1289, current size' "$Wc_c"
fi
# ============= RISCos.diff ==============
if test -f 'RISCos.diff' -a X"$1" != X"-c"; then
echo 'x - skipping RISCos.diff (File already exists)'
else
echo 'x - extracting RISCos.diff (Text)'
sed 's/^X//' << 'SHAR_EOF' > 'RISCos.diff' &&
--- ./c/save_sgi4.c~ Tue Oct 31 12:20:39 1989
+++ ./c/save_sgi4.c Wed Jun 24 11:06:50 1992
@@ -298,7 +298,11 @@
X lseek(0, pfilehdr->f_symptr, SEEK_SET);
X diff = hdrs.filehdr.f_symptr - pfilehdr->f_symptr;
X read(0, &symhdr, cbHDRR);
+#ifdef __STDC__
+#define adjust(field)if(symhdr.cb ## field ## Offset)symhdr.cb ## field ## Offset+= diff
+#else
X #define adjust(field)if(symhdr.cb/**/field/**/Offset)symhdr.cb/**/field/**/Offset+= diff
+#endif
X adjust(Line);
X adjust(Dn);
X adjust(Pd);
--- ./unixport/makefile~ Wed Jun 24 11:11:28 1992
+++ ./unixport/makefile Wed Jun 24 11:22:51 1992
@@ -49,7 +49,8 @@
X #CC = cc -systype sysv -DVOL=volatile -Olimit 798 -G 8 -I${AKCLDIR}/o -I/usr/include/bsd
X #LDCC = cc -systype sysv -Wl,-D -Wl,${DBEGIN}
X CC = gcc-sysv -DVOL=volatile -G 8 -I${AKCLDIR}/o
-LDCC = gcc-sysv -D ${DBEGIN}
+#LDCC = gcc-sysv -D ${DBEGIN}
+LDCC =ld -systype sysv -D ${DBEGIN}
X
X # Where the original KCL distribution resides.
X
@@ -173,7 +174,13 @@
X else make raw_$(KCL)1 "SYS_KCL=sys_boot.o" ; fi
X
X raw_$(KCL)1: $(SYS_KCL)
- $(LDCC) -o raw_$(KCL) $(FOR_RAW) $(SYS_KCL) -lc $(LIBS1)
+# $(LDCC) -o raw_$(KCL) $(FOR_RAW) $(SYS_KCL) -lc $(LIBS1)
+ $(LDCC) -o raw_$(KCL) \
+ /usr/lib/cmplrs/cc/crt1.o \
+ $(FOR_RAW) $(SYS_KCL) \
+ /usr/local/gnu/lib/gcc-lib/mips-mips-sysv/2.1/libgcc.a \
+ -lc -lm ../o/akcllib.a \
+ /usr/lib/cmplrs/cc/crtn.o
X
X saved_kcl_boot:
X make raw_$(KCL)1 "SYS_KCL=sys_boot.o"
SHAR_EOF
chmod 0666 RISCos.diff ||
echo 'restore of RISCos.diff failed'
Wc_c="`wc -c < 'RISCos.diff'`"
test 1429 -eq "$Wc_c" ||
echo 'RISCos.diff: original size 1429, current size' "$Wc_c"
fi
exit 0