The Amsterdam Compiler Kit
Go to file
David Given 76ba0bf6b3 First steps towards a code generator.
--HG--
branch : dtrg-videocore
2013-05-19 23:33:42 +01:00
bin Delete 689 undead files. 2012-09-20 22:26:32 -04:00
distr Update distribution files. 2013-05-15 23:46:15 +01:00
doc Delete 689 undead files. 2012-09-20 22:26:32 -04:00
emtest Delete 689 undead files. 2012-09-20 22:26:32 -04:00
etc Delete 689 undead files. 2012-09-20 22:26:32 -04:00
examples Flush stdout before prompting the user for input. 2010-08-06 17:02:16 +00:00
fast use stdarg when compiling with ANSI C compiler 1995-08-17 14:36:05 +00:00
fcc use stdarg when compiling with ANSI C compiler 1995-08-18 07:26:18 +00:00
first Dependency fixes. 2013-05-17 00:04:37 +01:00
h Add special relocation type for VC4 jump instructions. 2013-05-17 22:40:50 +01:00
include Delete 689 undead files. 2012-09-20 22:26:32 -04:00
lang Fix warning. 2013-05-17 00:04:54 +01:00
lib Build ego. 2013-05-15 21:14:06 +01:00
mach First steps towards a code generator. 2013-05-19 23:33:42 +01:00
man Delete 689 undead files. 2012-09-20 22:26:32 -04:00
modules Update distribution files. 2013-05-15 23:46:15 +01:00
plat Added skeleton bootstrap code. 2013-05-19 23:33:29 +01:00
util Add special relocation type for VC4 jump instructions. 2013-05-17 22:40:50 +01:00
.distr Update distribution files. 2013-05-15 23:46:15 +01:00
.hgtags convert CVS tags 2011-02-11 00:51:45 +00:00
Action Modified to no longer build LLgen, as it is now distributed seperately. 2006-07-18 17:34:30 +00:00
CHANGES Updated for 6.0pre4. 2010-08-04 18:01:12 +00:00
config.pm Build ego. 2013-05-15 21:14:06 +01:00
Copyright new copyright notice in repository 2005-05-26 06:47:43 +00:00
Makefile A few last build tweaks. 2013-05-16 14:20:58 +01:00
NEW Added some new readmes at the top level. 2005-06-24 23:20:41 +00:00
pmfile Merge changes from branch: linux68k platform, linuxppc platform (partially 2013-05-09 18:14:16 +01:00
README Now describe the make-based build system in the README. 2013-05-15 23:12:05 +01:00
TakeAction Added the appropriate #! magic at the beginning of shell scripts. (Some modern shells don't like scripts to be without it.) 2006-07-18 17:20:46 +00:00
TODO Added some new readmes at the top level. 2005-06-24 23:20:41 +00:00

                     THE AMSTERDAM COMPILER KIT V6.0pre5
                     ===================================

                  © 1987-2005 Vrije Universiteit, Amsterdam
                                2013-05-15


INTRODUCTION
============

The Amsterdam Compiler Kit is a complete compiler toolchain consisting of
front end compilers for a number of different languages, code generators,
support libraries, and all the tools necessary to go from source code to
executable on any of the platforms it supports.

This is an early prerelease of the apocryphal version 6.0 release. Not a
lot is supported, the build mechanism needs work, and a lot of things are
probably broken. However, what's there should be sufficient to get things
done and to evaluate how the full 6.0 release should work. 


SUPPORT
=======

Languages:

ANSI C, Pascal, Modula 2, Basic. K&R is supported via the ANSI C compiler.

Platforms:

pc86          produces bootable floppy disk images for 8086 PCs
linux386      produces ELF executables for PC Linux systems
linux68k      produces ELF executables for m68020 Linux systems
cpm           produces i80 CP/M .COM files


INSTALLATION
============

The version 5.0 build mechanism has been completely rewritten. Installation
ought to be fairly straightforward.

Requirements:

- an ANSI C compiler. This defaults to gcc. You can change this by setting
  the CC make variable.

- about 40MB free in /tmp (or some other temporary directory).

- about 6MB in the target directory.

Instructions:

- edit the Makefile. There's a small section at the top where you can change
  the configuration. Probably the only one you may want to edit is PREFIX,
  which changes where the ACK installs to.

- Run:

    make

  ...from the command line. This will do the build.

  The make system is fully parallelisable. If you have a multicore system,
  you probably want to do:

    make -j8

  ...instead (substituting the right number of cores, of course). You can
  also shave a few seconds of the build time by using the -r flag.

- Run:

    sudo make install

  ...from the command line. This will install the ACK in your PREFIX
  directory (by default, /usr/local).

The ACK should now be ready to use.


USAGE
=====

Currently I haven't sorted out all the documentation --- it's supplied in the
distribution, but not all of it gets installed yet --- so here is a quickstart
guide.

The main command to use is 'ack'. This invokes the compiler and the linker.
Some useful options include:

  -m<platform>     build for the specified platform
  -o <file>        specifies the output file
  -c               produce a .o file
  -c.s             produce a .s assembly file
  -O               enable optimisation (optimisation levels go up to 6)
  -ansi            compile ANSI C (when using the C compiler)
  -v               be more verbose (repeatable)
  <file>           build file

ack figures out which language to use from the file extension:

  .c               C (ANSI or K&R)
  .b               Basic
  .mod             Modula-2
  .ocm             Occam 1
  .p               Pascal
  .o               object files
  .s               assembly files
  .e               ACK intermediate code assembly files

For further information, see the man page (which actually does get
installed, but is rather out of date).

There are some (known working) example programs in the 'examples' directory.
A sample command line is:

ack -mlinux386 -O examples/paranoia.c



GOTCHAS
=======

There are some things you should be aware of.

- Look at plat/<PLATFORMNAME>/README for information about the two supported
  platforms.
  
- The library support is fairly limited; for C, it's at roughly the ANSI C
  level, and for the other languages it's similar.
  
- When compiling languages other than C, the ACK will usually look at the
  first character of the file. If it's a #, then the file will be run through
  the C preprocessor anyway.

- BSD systems may need to up the number of file descriptors (e.g.
  'ulimit -n 200') before the ACK will compile.
  
- The ACK uses its own .o format. You won't be able to mix the ACK's object
  files and another compiler's.


DISCLAIMER
==========

The ACK is mature, well-tested software, but the environment in which it was
developed for and tested under is rather different from that available on
today's machines. There will probably be little in the way of logical bugs,
but there may be many compilation and API bugs.

If you wish to use the ACK, *please* join the mailing list. We are interested
in any reports of success and particularly, failure. If it does fail for you,
we would love to know why, in as much detail as possible. Bug fixes are even
more welcome.

The ACK is licensed under a BSD-like license. Please see the 'Copyright' file
for the full text.

You can find the mailing list on the project's web site:

	http://tack.sourceforge.net/
	
Please enjoy.

David Given (dtrg on Sourceforge)
dg@cowlark.com
2013-05-13