1 .\" $Id: install.doc,v 1.38 1994/06/24 10:01:58 ceriel Exp $
6 Amsterdam Compiler Kit Installation Guide
9 (revised for 3rd, 4th and 5th distribution by Ceriel Jacobs)
18 describes the process of installing the Amsterdam Compiler Kit (ACK).
19 It depends on the combination of hard- and software how
20 hard it will be to install the Kit.
21 This description is intended for a Sun-3 or SPARC workstation.
22 Installation on VAXen running Berkeley
25 Sun-2 systems and most System V
27 systems should be easy.
28 As of this distribution, installation on PDP-11's or other
29 systems with a small address space is no longer supported.
30 See section 8 for installation on other systems.
32 The ACK installation process
34 In the ACK installation process, three directory trees are used:
36 the ACK source tree. This is the tree on the ACK distribution medium.
37 For the rest of this document, we will refer to this directory
40 a configuration tree. This tree is built by the installation process and
41 is used to do compilations in. Its structure reflects that of the source tree,
42 but this tree will mostly contain Makefiles and relocatable objects.
43 For the rest of this document, we will refer to this directory
46 an ACK users tree. This tree is also built by the installation process.
47 For the rest of this document, we will refer to this directory
51 the directories in $TARGET_HOME contain the following information:
55 the few utilities that knot things together.
56 See the section about "Commands".
58 root of a tree containing almost all libraries used by
60 Files specific to a certain machine are collected in one subtree
61 per machine. E.g. "lib/pdp", "lib/z8000".
62 The names used here are the same names as used for subtrees
65 command descriptor files used by the program ack.
67 files used by the LL(1) parser generator.
69 files used by the lexical analyzer generator Flex.
71 definition modules for Modula-2.
73 root of a tree containing almost all binaries used by
75 All programs specific to a certain machine are collected in one subtree
76 per machine. E.g. "lib.bin/pdp", "lib.bin/z8000".
77 The names used here are the same names as used for subtrees
80 files used by the global optimizer.
82 binaries for the lint passes and lint libraries.
84 files used by the code-expander-generator.
86 contains the file "ip_spec.t" needed for EM interpreters and EM documentation.
88 contains two include files:
91 em_path.h path names used by \fIack\fP, intended for all utilities
92 local.h various definitions for local versions
94 These include files are specific for the current machine, so they
95 are in a separate directory.
96 .IP "include/_tail_cc"
98 include files needed by modules
99 in the C library from lang/cem/libcc.
100 .IP "include/tail_ac"
102 include files for ANSI C.
104 include files for occam.
105 .IP "include/_tail_mon"
107 more or less system independent include files needed by modules
108 in the library lang/cem/libcc/mon.
110 the #include files for:
113 arch.h definition of the ACK archive format
114 as_spec.h used by EM assembler and interpreters
115 bc_io.h used by the Basic run-time system
116 bc_string.h used by the Basic run-time system
117 cg_pattern.h used by the backend program "cg" and its bootstrap
118 cgg_cg.h used by the backend program "ncg" and its bootstrap
119 em_abs.h contains trap numbers and address for lin and fil
120 em_ego.h definition of names for some global optimizer
122 em_flag.h definition of bits in array em_flag in
123 $TARGET_HOME/lib.bin/em_data.a. Describes parameters
124 effect on flow of instructions
125 em_mes.h definition of names for mes pseudo numbers
126 em_mnem.h instruction => compact mapping
127 em_pseu.h pseudo instruction => compact mapping
128 em_ptyp.h useful for compact code reading/writing,
129 defines classes of parameters
130 em_reg.h definition of mnemonics indicating register type
131 em_spec.h definition of constants used in compact code
132 ip_spec.h used by programs that read e.out files
133 m2_traps.h used by the Modula-2 run-time system
134 ocm_chan.h used by the occam run-time system
135 ocm_parco.h used by the occam run-time system
136 ocm_proc.h used by the occam run-time system
137 out.h defines the ACK a.out format
138 pc_err.h definitions of error numbers in Pascal
139 pc_file.h macro's used in file handling in Pascal
140 pc_math.h used by the Pascal runtime system
141 ranlib.h defines symbol table format for archives
142 stb.h defines debugger symbol table types
145 root of a tree containing modules for compiler writers.
147 manual pages for all modules.
149 contains module objects.
151 include files for some of the modules.
153 include files for some of the modules.
155 this directory contains the unformatted documents for the Kit.
156 A list of the available documents can be found in the last section.
157 These documents must be processed by [nt]roff.
159 man files for various utilities.
162 When installing ACK on several types of machines with a shared file system,
163 it may be useful to know that the "doc", "etc", "h",
164 "include", "lib" and "man" sub-directories do not depend on this
165 particular installation. They do not contain binaries or path-dependent
166 information. These directories can therefore be shared between the
167 ACK installations. This can be accomplished by creating the tree and
168 suitable symbolic links before starting the installation process.
170 For instance, let us say there is a file-system that is accessible from
171 the different machines as "/usr/share/local", and the ACK binary tree
172 must be installed in "/usr/local/ack". In this case, proceed as follows:
174 create a directory "/usr/share/local/ack", with subdirectories
175 "doc", "etc", "h", "include", "lib" and "man".
177 create a directory "/usr/local/ack" and
178 then create symbolic links "doc" to "/usr/share/local/ack/doc", etc.
180 If this is done on all machines on which ACK will be installed, the
181 machine-independent part only has to be installed once, preferably
182 on the fastest processor (it takes a long time to install all libraries).
184 The directories in the source tree contain the following information:
188 source of some shell-scripts.
190 mostly description files for the "ack" program.
192 the main description of EM sits here.
193 Files (e.g. em_table) describing
194 the opcodes and pseudos in use,
195 the operands allowed, effect in stack etc. etc.
197 just there to group the directories with all sources for each machine.
198 The section about "Machines" of this manual indicates which subdirectories
199 are used for which systems.
201 These directories have subdirectories named:
205 cg the backend (*.m => *.s)
206 ncg the new backend (*.m => *.s)
207 as the assembler (*.s => *.o) or
208 assembler/linker (*.s + libraries => a.out)
209 cv conversion programs for a.out files
210 dl down-load programs
211 top the target optimizer
212 int source for an interpreter
214 libbc to create Basic run-time system and libraries
215 libcc to create C run-time system and libraries
216 libcc.ansi to create ANSI C run-time system and libraries
217 libpc to create Pascal run-time system and libraries
218 libf77 to create Fortran run-time system and libraries
219 libm2 to create Modula-2 run-time system and libraries
220 liboc to create occam run-time system and libraries
221 libem EM runtime system, only depending on CPU type
222 libend library defining end, edata, etext
223 libfp to create floating point library
224 libdb to create debugger support library
225 libsys system-dependent EM library
226 libce fast cc-compatible C compiler library support
228 ce code expander (fast back-end)
233 Actually, some of these directories will only appear in the configuration tree.
235 The directory proto contains files used by most machines,
236 like machine-independent sources and Makefiles.
240 mach/proto/cg current backend sources
241 mach/proto/ncg new backend sources
242 mach/proto/as assembler sources
243 mach/proto/top target optimizer sources
244 mach/proto/fp floating point package sources
245 mach/proto/libg makefiles for compiling libraries
246 mach/proto/grind machine-independent debugger support
249 contains prototype of em test set.
251 just there to group the directories for all front-ends.
253 the Pascal front-end.
256 source of Pascal run-time system (in EM or C).
258 some test programs written in Pascal.
260 the Pascal compiler proper.
265 directories with sources of C runtime system, libraries (in EM or C).
266 .IP "lang/cem/libcc/gen"
268 sources for routines in chapter III of
272 .IP "lang/cem/libcc/stdio"
275 .IP "lang/cem/libcc/math"
277 sources for mathematical routines, normally available with the
278 \fB-lm\fP option to \fIcc\fP.
279 .IP "lang/cem/libcc/mon"
281 sources for routines in chapter II, mostly written in EM.
282 .IP "lang/cem/cemcom"
285 .IP "lang/cem/cemcom.ansi"
287 the ANSI C compiler proper.
288 .IP "lang/cem/cpp.ansi"
290 the ANSI C preprocessor.
291 .IP "lang/cem/libcc.ansi"
293 the ANSI C library sources.
297 .IP "lang/cem/ctest/cterr"
299 programs developed for pinpointing previous errors.
300 .IP "lang/cem/ctest/ct*"
305 .IP "lang/cem/lint/lpass1"
307 the first pass of lint.
308 .IP "lang/cem/lint/lpass1.ansi"
310 the first pass of lint, this time for ANSI C.
311 .IP "lang/cem/lint/lpass2"
313 the second pass of lint, shared between ANSI C and "old-fashioned" C.
314 .IP "lang/cem/lint/llib"
316 programs for producing lint libraries.
324 the Basic run-time library source.
325 .IP "lang/basic/test"
327 various Basic programs.
330 .IP "lang/occam/comp"
335 source of occam run-time system (in EM or C).
336 .IP "lang/occam/test"
340 the Modula-2 front-end.
344 source of Modula-2 run-time system (in EM, C and Modula-2).
346 the Modula-2 makefile generator.
348 some Modula-2 example programs.
350 the Fortran front-end (translates Fortran into C). This compiler is not
351 a part of ACK, but is included because it adds another language.
352 The Fortran system carries the following copyright notice:
355 /**************************************************************
356 Copyright 1990, 1991 by AT&T Bell Laboratories and Bellcore.
358 Permission to use, copy, modify, and distribute this software
359 and its documentation for any purpose and without fee is hereby
360 granted, provided that the above copyright notice appear in all
361 copies and that both that the copyright notice and this
362 permission notice and warranty disclaimer appear in supporting
363 documentation, and that the names of AT&T Bell Laboratories or
364 Bellcore or any of their entities not be used in advertising or
365 publicity pertaining to distribution of the software without
366 specific, written prior permission.
368 AT&T and Bellcore disclaim all warranties with regard to this
369 software, including all implied warranties of merchantability
370 and fitness. In no event shall AT&T or Bellcore be liable for
371 any special, indirect or consequential damages or any damages
372 whatsoever resulting from loss of use, data or profits, whether
373 in an action of contract, negligence or other tortious action,
374 arising out of or in connection with the use or performance of
376 **************************************************************/
378 .IP "lang/fortran/comp"
381 .IP "lang/fortran/lib"
383 source of Fortran runtime system and libraries.
385 contains sub-directories for installing the fast ACK compatible compilers.
388 contains the sources of the fast ACK compatible compiler drivers.
390 contains the fast cc-compatible C compiler for SUN-3 and VAX.
392 contains directories with sources for various utilities.
394 the program used for translation with the Kit.
396 the EM peephole optimizer (*.k => *.m).
398 the global optimizer.
400 the target optimizer generator.
402 decode (*.[km] => *.e) + encode (*.e => *.k).
404 the C-code for $TARGET_HOME/lib.bin/em_data.a.
405 These sources are created by the Makefile in `etc`.
407 the EM assembler (*.[km] + libraries => e.out).
409 the archivers to be used for all EM utilities.
411 a program needed for compiling backends.
413 a program needed for compiling the newest backends.
419 the extended LL(1) parser generator.
421 contains some programs handling ACK a.out format, such as anm, asize.
423 contains some programs to help in resolving name conflicts, and
424 a dependency generator for makefiles.
426 the ACK link-editor, reading ACK relocatable a.out format, and writing
429 an EM interpreter, written in C. Very useful for checking out software,
432 code expander generator.
436 this is Berkeley yacc, in the public domain.
438 this is a replacement for lex. It carries the following copyright notice:
441 Copyright (c) 1990 The Regents of the University of California.
444 This code is derived from software contributed to Berkeley by
447 The United States Government has rights in this work pursuant
448 to contract no. DE-AC03-76SF00098 between the United States
449 Department of Energy and the University of California.
451 Redistribution and use in source and binary forms are permitted
452 provided that: (1) source distributions retain this entire
453 copyright notice and comment, and (2) distributions including
454 binaries display the following acknowledgement: ``This product
455 includes software developed by the University of California,
456 Berkeley and its contributors'' in the documentation or other
457 materials provided with the distribution and in all advertising
458 materials mentioning features or use of this software. Neither the
459 name of the University nor the names of its contributors may be
460 used to endorse or promote products derived from this software
461 without specific prior written permission.
463 THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
464 IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
465 WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
471 All path names mentioned in the text of this document are relative to
472 $SRC_HOME, unless they start with '/' or one of $SRC_HOME,
473 $TARGET_HOME or $CONFIG.
475 Restoring the ACK tree
477 The process of installing the Amsterdam Compiler Kit is quite simple.
478 The first step is to restore the Amsterdam Compiler Kit
479 distribution tree structure.
482 Create a directory, for example /usr/share/local/src/ack, on a device
483 with at least 15 Megabytes left. This directory will be $SRC_HOME.
485 Change to that directory (cd ...).
487 Extract all files from the distribution medium, for instance
491 Keep a copy of the original distribution to be able to repeat the process
492 of installation in case of disasters.
493 This copy is also useful as a reference point for diff-listings.
495 Adapting ACK to the local system
497 Before compiling the sources in the Kit some installation dependent
498 actions have to be taken.
499 Most of these are performed by an interactive shell script in the file
500 .I $SRC_HOME/first/first.
501 Calling this script should be done
502 from another directory, for instance an empty directory which will later
511 Asking for the path names of the ACK source directory ($SRC_HOME), the
512 configuration directory ($CONFIG), and the ACK users directory ($TARGET_HOME).
513 About 5M are needed for the configuration tree. The disk space needed
514 for the ACK users tree depends on which front-ends and back-ends are to be
516 For instance, on our SPARC systems
517 we have installed all languages and 6 back-ends, including the
518 system-independent part. This amounts to about 16M.
519 On our SUN-3 systems, we have installed all front-ends and 5 back-ends,
520 but only the machine-dependent part. The machine-independent directories are
521 symbolic links to the SPARC ACK users tree.
522 We also have the fast ACK compilers
523 installed on the SUN-3's.
524 The total amount of disk-space used is less than 8M.
526 Asking for what type of system the binary tree must be produced for
527 and creating the shell script "ack_sys" in the Kit's bin directory.
528 Several utilities make use of "ack_sys" to determine the type of
530 The current choice is between:
534 answer system type default machine
535 vax_bsd4_1a VAX11 + BSD4.1a vax4
536 vax_bsd4_2 VAX11 + BSD4.2 vax4
537 vax_sysV_2 VAX11 + System V.2 vax4
538 i386 Intel 80386 system + Xenix System V i386
539 sun3 Sun-3 Motorola 68020 workstation sun3
540 sun2 Sun-2 Motorola 68010 workstation sun2
541 m68_sysV_0 68000 + Uniplus System V.0 mantra
542 m68020 Motorola 68020 VME131 + System V/68 R2V2.1 m68020
543 sparc Sun-4 or SPARC workstation running SunOs 4 sparc
544 sparc_solaris Sun-4 or SPARC workstation running Solaris 2 sparc_solaris
545 ANY Neither of the above ???
547 For some of these, the installation procedure has not been tested, as
549 For others, the installation procedure has only been tested with earlier
550 distributions, as we don't have those systems anymore.
551 However, the sun3 and sparc systems are known to behave reasonably.
552 The sparc_solaris system has only been tested with the GNU C compiler,
553 because we don't have the SUN C compiler (it is unbundled in Solaris 2).
554 The Sun systems should run SunOs Release 3.0 or newer.
555 The i386 choice may also be used for Intel 80386 or 80486 systems
558 System V Release 4. These systems are also able to run Xenix System V
560 If the target system is not on this list, choose one that comes close.
561 If none of them come close, use the "ANY" choice.
562 For ANY, any name can be used,
563 but the Kit will not be able to compile programs for the target system.
564 See the section about "compilation
565 on a different machine".
567 Setting the default machine for which code is
568 produced to the local type of system according to the table above.
569 This in done in the file "$TARGET_HOME/config/local.h".
570 See also section 9.1.
572 Asking for things that don't have to be installed.
574 Producing a shell script called "INSTALL" that will take care of the
575 ACK installation process.
579 The next step in the installation process is to run the "INSTALL"
580 shell-script. When using a Bourne-shell, type:
582 sh INSTALL > INSTALL.out 2>&1 &
584 When using a C-shell, type:
586 sh INSTALL >& INSTALL.out &
588 This shell-script performs the following steps:
592 Produce a configuration tree ($CONFIG), reflecting the structure of the
595 Produce Makefiles in $CONFIG.
596 As mentioned before, compilations
597 will be done in the configuration tree, not in the source tree.
598 Most configuration directories will have Makefiles
599 used to compile and install the programs in that
601 All programs needed for compilation and/or cross compilation
602 with the Kit are installed in $TARGET_HOME by these Makefiles.
603 These Makefiles are produced from corresponding files called
604 "proto.make" in the source tree. In fact, the "proto.make" files
605 are almost complete Makefiles, except for some macro definitions that
606 are collected by the \fIfirst\fP script.
607 The Makefiles adhere to a standard which is described in the
610 Copy "Action" files to the configuration tree and editing them to
611 reflect the choices concerning the parts of ACK that have to be
612 installed. "Action" files are described below.
614 Copy part of the source tree to the ACK users tree (include files,
615 manual pages, documentation, et cetera).
617 Calling the "TakeAction" script.
618 All these Makefiles do not have to be called separately.
619 We wrote a shell script calling the make's needed to install
621 This script consists of the file $SRC_HOME/TakeAction
622 and a few files called Action in some configuration directories.
623 The Action files describe in a very simple form which actions
624 have to be performed in which directories.
625 The default action is to start "make install && make clean".
626 The output of each make is diverted to a file called "Out"
627 in the same directory as the make was started in.
628 If the make was successful (return code 0) the Out file is removed
629 and the script TakeAction produces a small message indicating
630 that it succeeded in fulfilling its goal.
631 If the make was not successful (any other return code) the Out file
632 is left alone for further examination and the script TakeAction
633 produces a small message indicating that it failed.
635 For some programs the scripts already know they can't be
636 installed on the local type of system.
637 In that case they produce a message "Sorry, ....." and
638 happily proceed with further installation commands.
642 Installation of the Kit might take anything from a few
643 hours to more than a day, depending on the speed of the local machine and
644 what must be installed.
646 If the installation succeeded, the Kit is ready to be used.
647 Read section 6 and the manuals provided
648 with the Kit (in the $TARGET_HOME/man directory) on how to use it.
652 on Unisoft m68000 systems.
654 The Unisoft C compiler has a bug which impedes the correct
655 translation of the peephole optimizer.
656 For a more detailed description of this phenomenon see
657 the file "$SRC_HOME/mach/m68k2/Unisoft_bug".
658 (This observation was made in 1985 or so, so it is probably
663 The backends for the PDP11, VAX, Motorola 68000 and 68020,
664 SPARC, Intel 8086, and Intel 80386
665 have been heavily used by ourselves and are well tested.
666 The backends for the other machines are known to run our own
668 but might reveal errors when more heavily used.
670 An example output of TakeAction.
674 System definition -- done
675 EM definition library -- done
677 Flex lexical analyzer generator -- done
678 Yacc parser generator -- done
679 system-call interface module -- done
683 EM Global optimizer -- done
685 Program 'ack' -- done
686 Bootstrap for backend tables -- done
687 Bootstrap for newest form of backend tables -- done
692 ANSI-C frontend -- done
693 ANSI-C preprocessor -- done
694 ANSI-C header files -- done
695 Failed for LINT C program checker, see lang/cem/lint/Out
696 Pascal frontend -- done
697 Basic frontend -- done
701 Vax 4-4 assembler -- done
702 Vax 4-4 backend -- done
703 Vax target optimizer -- done
704 ACK a.out to VAX a.out conversion program -- done
705 Sorry, Vax code expander library can only be made on vax* systems
706 Vax 4-4 EM library -- done
707 Vax 4-4 debugger support library -- done
708 Vax 4-4 etext,edata,end library -- done
709 Vax 4-4 systemcall interface -- done
716 The lines starting with "Sorry, " indicate that certain programs cannot
717 be translated on the local machine.
718 The lines starting with "Failed for" indicate
719 that certain programs/libraries were expected to,
721 In this example, the installation of LINT failed.
722 To repeat a certain part of the installation, look in
723 the Action file, which resides in the root of the configuration tree,
724 for the directory in which that part is to be found.
725 If that directory contains an Action file issue the command
726 "sh $CONFIG/bin/TakeAction", otherwise type "make install".
730 The following commands are available in the $TARGET_HOME/bin directory after compilation
732 .IP "\fIack\fP, \fIacc\fP, \fIabc\fP, \fIapc\fP, \fIocm\fP, \fIm2\fP, \fIf2c\fP and their links" 14
734 the names mentioned here can be used to compile Pascal, C, etc... programs.
735 Most of the links can be used to generate code for a particular
737 See also the section about "Machines".
739 the archiver used for the EM- and universal assembler/loader.
741 the archiver used for ACK objects.
743 this program selects a interpreter to execute an e.out file.
744 Interpreters exist for PDP-11 and Motorola 68000 systems.
746 the program to unravel the post-mortem information of
747 the EM interpretator for the PDP-11.
749 the LL(1) parser generator.
751 a shell script producing an identification of the target system.
752 Used by some utilities to determine what is, and what is
753 not feasible on the target system.
755 a shell script used while compiling libraries.
756 .IP "\fIasize\fP, \fIanm\fP, \fIastrip\fP"
758 do the same as \fIsize\fP, \fInm\fP and \fIstrip\fP, but for ACK object format.
760 a dependency generator for makefiles.
761 .IP "\fIcid\fP, \fIprid\fP, \fIcclash\fP"
763 some utilities for handling name clashes in C programs. Some
764 systems have C-compilers with only 7 or 8 characters significant in
767 a utility for generating character tables for C-programs.
769 an EM interpreter. This one is written in C, and is very useful for checking
772 a source level debugger for C, ANSI-C, Modula-2 and Pascal.
773 .IP "\fIafcc\fP, \fIafm2\fP, \fIafpc\fP"
775 these are ACK-compatible fast C, Modula-2 and Pascal compilers,
776 available for M68020, VAX and Intel 80386 systems. They compile very fast,
777 but produce slow code.
779 this is a cc-compatible fast C compiler, available on SUN-3 and VAX
780 systems. It compiles very fast, but produces slow code.
782 We currently make the Kit available to our users by telling
783 them that they should include the $TARGET_HOME/bin directory in
784 their PATH shell variable.
785 The programs will still work when moved to a different
786 directory or linked to.
787 Copying should preferably be done with tar, since links are
789 Renaming of the programs linked to \fIack\fP will not always
790 produce the desired result.
791 This program uses its call name as an argument.
792 Any call name not being \fIcc\fP, \fIacc\fP, \fIabc\fP, \fIpc\fP, \fIf2c\fP,
793 \fIocm\fP, \fIm2\fP, or \fIapc\fP will be
794 interpreted as the name of a 'machine description' and the
795 program will try to find a description file with that name.
796 The installation process will only touch the utilities in the $TARGET_HOME/bin
797 directory, not copies of these utilities.
801 Below is a table with entries for all commands in
802 the bin directory used to (cross)compile for a particular machine.
803 The name in the first column gives the name in the bin directory.
804 The column headed dir indicates which subdirectories of
805 $TARGET_HOME/lib and/or $TARGET_HOME/lib.bin are needed for compilation.
806 The column head i/p contains the integer and pointer size used in units of
808 The subdirectories with the same name in mach contain the sources.
809 A * in the column headed 'fp' indicates that floating point can be used
810 for that particular machine. A + in that column indicates that floating
811 point is available under the '-fp' option. In this case, software
812 floating point emulation is used.
815 command system i/p languages fp dir remarks
817 pdp PDP/UNIX V7 2/2 C * pdp
823 vax4 VAX/BSD 4.? 4/4 C * vax4
830 sparc Sun-4 4/4 C * sparc
837 sparc_solaris Sun-4 4/4 C * sparc_solaris
844 m68k2 M68000/ 2/4 C + m68k2
850 m68k4 M68000/ 4/4 C + m68k4
857 pmds M68000/ 2/4 C + pmds Philips Micro
858 PMDS Pascal m68k2 Devel. System
863 pmds4 M68000/ 4/4 C + pmds4 Philips Micro
864 PMDS Pascal m68k2 Devel. System
870 mantra M68000/ 4/4 C + mantra
877 m68020 M68020/ 4/4 C + m68020
878 Sys V/68 R2V2.1 Pascal
884 sun3 Sun-3 R4.1 4/4 C + sun3
891 sun2 Sun-2 R3.0 4/4 C + sun2
898 i86 IBM PC/IX 2/2 C + i86 IBM PC with PC/IX
899 Pascal Causes kernel crashes
904 xenix3 Microsoft 2/2 C + xenix3 IBM AT with Xenix
910 i386 SCO Xenix 4/4 C + i386 Intel 80386
911 System V Pascal Xenix System V
917 minix Minix PC 2/2 C + minix IBM PC running Minix
923 minixST ST Minix 2/4 C + minixST Atari ST running Minix
929 z8000 Zilog 8000 2/2 C z8000 Central Data
931 Basic Assembler/loader
935 em22 EM machine 2/2 C * em22 Needs interpreter
941 em24 EM machine 2/4 C * em24 Needs interpreter
947 em44 EM machine 4/4 C * em44 Needs interpreter
954 6500 6502/BBC 2/2 C 6500 Assembler/loader
960 6800 Bare 6800 6800 Assembler only
962 6805 Bare 6805 6805 Assembler only
964 6809 Bare 6809 6809 Assembler only
966 ns Bare NS16032 4/4 C ns
973 i80 Hermac/z80 2/2 C i80
979 z80 Hermac/z80 2/2 C z80 \fIi80\fP is faster
985 s2650 Signetics s2650 Assembler only
987 arm Acorn 4/4 C * arm Assembler/loader
995 The commands \fBem22\fP, \fBem24\fP and \fBem44\fP
996 produce e.out files with EM machine code which must be interpreted.
997 The Kit contains three interpreters: one running under PDP 11/V7 UNIX,
998 one for the M68000, running under the PMDS system, Sun systems,
999 the Mantra system, etc, and a portable one, written in C.
1000 The first one can only interpret 2/2 e.out files,
1001 the second takes 2/4 and 4/4 files,
1002 and the last one takes 2/2, 2/4 and 4/4.
1003 The PDP 11 interpreter executes floating point instructions.
1005 The program \fB$TARGET_HOME/bin/em\fP calls the appropriate
1007 The interpreters are looked for in the em22, em24 and em44
1008 subdirectories of $TARGET_HOME/lib.bin.
1009 The third interpreter is available as the program \fB$TARGET_HOME/bin/int\fP
1010 in the bin directory.
1012 Compilation on a different machine.
1014 The installation mechanism of the Kit is supposed to be portable across
1017 the Kit can be installed and used as a cross-compiler
1018 for the languages it supports on any
1021 The presence of most
1023 utilities is essential for compilation.
1024 A few of the programs certainly needed are: sh, C-compiler, sed, ed,
1029 The existence of a backend with a system call library
1030 for the target system is essential
1031 for producing executable files for that system.
1032 Rewriting the system call library if the one supplied does
1033 not work on the target system is fairly straightforward.
1034 If no backend exists for the target CPU type, a new backend has to be written
1035 which is a major undertaking.
1037 Universal assembler/loader, link editor
1039 For most machines, the description files in $TARGET_HOME/lib/*/descr use our
1040 universal assembler and our link editor.
1041 The load file produced is not directly
1042 usable in any system known to us,
1043 but has to be converted before it can be put to use.
1044 The \fIcv\fP programs convert our a.out format into
1046 The \fIdl\fP programs present for some machines unravel
1047 our a.out files and transmit commands to load memory
1048 to a microprocessor over a serial line.
1049 The file $TARGET_HOME/man/man5/ack.out.5 contains a description of the format of
1050 the universal assembler load file.
1051 It might be useful to those who wish or need to write their
1052 own conversion programs.
1053 Also, a module is included to read and write our a.out format.
1054 See $TARGET_HOME/man/man3/object.3.
1060 There is one important option in $TARGET_HOME/config/local.h.
1061 The utility \fIack\fP uses a default machine name when called
1062 as \fIacc\fP, \fIcc\fP, \fIabc\fP, \fIapc\fP, \fIpc\fP, \fIocm\fP,
1063 \fIm2\fP, \fIf2c\fP, or \fIack\fP.
1064 The machine name used by default is determined by the
1065 definition of ACKM in $TARGET_HOME/config/local.h.
1066 The Kit is distributed with "sun3" as the default machine,
1067 but the shell script "first" in the directory "first" alters this
1068 to suit the target system.
1069 There is nothing against using the Kit as a cross-compiler
1070 and by default produce code that can't run on the local system.
1074 Absolute path names are concentrated in "$TARGET_HOME/config/em_path.h".
1075 Only the utilities \fIack\fP, \fIflex\fP, and \fILLgen\fP use
1076 absolute path names to access files in the Kit.
1077 The tree is distributed with /usr/em as the working
1079 The definition of EM_DIR in em_path.h should be altered to
1081 directory for the Compiler Kit binaries on the local system ($TARGET_HOME).
1082 This is done automatically by the shell script "first" in the
1084 Em_path.h also specifies which directory should be used for
1086 Most programs from the Kit do indeed use that directory
1087 although some remain stubborn and use /tmp or /usr/tmp.
1089 The shape of the tree should not be altered lightly because
1090 most Makefiles and the
1091 utility \fIack\fP know the shape of the ACK tree.
1092 The knowledge of the utility \fIack\fP about the shape of the tree is
1093 concentrated in the files in the directory $TARGET_HOME/lib/*/descr and $TARGET_HOME/lib/descr/*.
1097 Most directories contain a "proto.make", from which a Makefile is derived.
1098 Apart from commands applying to that specific directory these
1099 files all recognize a few special commands.
1100 When called with one of these they will apply the command to
1101 their own directory.
1102 The special commands are:
1105 recompile and install all binaries and libraries.
1107 Some Makefiles allow errors to occur in the programs they call.
1108 They ignore such errors and notify the user with the message
1109 "~....... error code n: ignored".
1110 Whenever such a message appears in the output it can be ignored.
1112 recompile all binaries and libraries and compare them to the
1113 ones already installed.
1115 print the sources and documentation on the standard output.
1119 Opr should be an off-line printer daemon.
1120 On some systems it exists under another name e.g. lpr.
1121 The easiest way to call such a spooler is using a shell script
1122 with the name opr that calls lpr.
1123 This script should be placed in /usr/bin or $TARGET_HOME/bin or
1124 one of the directories in the PATH environment variable.
1126 remove all files not needed for day-to-day use,
1127 that is binaries not in $TARGET_HOME/bin or $TARGET_HOME/lib.bin, object files etc.
1133 given as command in a configuration directory will cause
1134 compilation of all programs in the directory and copying of the results
1135 to the $TARGET_HOME/bin and $TARGET_HOME/lib.bin directories.
1139 Test sets are available in Pascal, C, Basic and EM assembly:
1141 the directory $SRC_HOME/emtest contains a few EM test programs.
1142 The EM assembly files in these tests must be transformed into
1144 These tests use the LIN and NOP instructions to mark the passing of each
1146 The NOP instruction prints the current line number during the
1148 Each test notifies its correctness by calling LIN with a unique
1149 number followed by a NOP which prints this line number.
1150 The test finishes normally with 0 as the last number printed
1151 In all other cases a bug showed its
1154 the directory $SRC_HOME/lang/pc/test contains a few Pascal test programs.
1155 All these programs print the number of errors found and a
1156 identification of these errors.
1159 We also tested Pascal with the Validation Suite.
1160 The Validation Suite is a collection of more than 200 Pascal programs,
1161 designed by Brian Wichmann and Arthur Sale to test Pascal compilers.
1162 We are not allowed to distribute it, but a copy may
1169 Easton, Pennsylvania 18042
1173 the sub-directories in $SRC_HOME/lang/cem/ctest contain C test programs.
1174 The idea behind these tests is:
1175 if there is a program called xx.c, compile it into xx.cem.
1176 Run it with standard output to xx.cem.r, compare this file to
1177 xx.cem.g, a file containing the 'ideal' output.
1178 Any differences will point to implementation differences or
1180 Giving the command "run gen" or plain "run" starts this
1182 The differences will be presented on standard output.
1183 The contents of the result files depend on the word size,
1184 the xx.cem.g files on the distribution are intended for a
1187 the directory $SRC_HOME/lang/basic/test contains some forty Basic programs.
1188 Not all of these programs are correct, some have syntactic errors,
1189 some simply don't work.
1190 The Makefile in that directory attempts to compile and run
1192 If it compiles its output is compared to a file with suffix .g
1193 which contains the output to be expected.
1194 The make should be started with its standard input diverted
1196 An example of the output of a make is present in the file Out.std.
1200 After installation, the manual pages for Amsterdam Compiler Kit can be found
1201 in the $TARGET_HOME/man directory. Also, the following documents are provided
1202 in the $TARGET_HOME/doc directory:
1205 toolkit.doc general overview (CACM article)
1206 em.doc description of the EM machine architecture
1207 ack.doc format of machine description files (lib/*/descr)
1208 ansi_C.doc ANSI C implementation description
1209 basic.doc Basic reference manual
1210 pcref.doc Pascal-frontend reference manual
1211 val.doc results of running the Pascal Validation Suite
1212 crefman.doc C-frontend description
1213 LLgen description of the LL(1) parser generator
1214 peep.doc internal documentation for the peephole optimizer
1215 cg.doc documentation for backend writers and maintainers
1216 regadd.doc addendum to previous document describing register variables
1217 ncg.doc documentation for the newest backends
1218 v7bugs.doc bugs in the V7 system and how to fix them
1219 6500.doc MSC 6500 backend description
1220 i80.doc Intel 8080 backend description
1221 z80.doc Zilog Z80 backend description
1222 m68020.doc Motorola M68000/M68020 backend description
1223 sparc.doc SPARC code expander description
1224 occam.doc occam-frontend description
1225 ego.doc Global Optimizer description
1226 top.doc Target Optimizer description
1227 int.doc description of the EM interpreter written in C
1228 ceg.doc documentation for code-expander writers and maintainers
1229 lint.doc documentation of LINT
1230 m2ref.doc Modula-2 frontend description
1231 install.doc this document
1232 install.pr this document (formatted for a simple line printer)
1235 Use the Makefile to get readable copies.