The Amsterdam Compiler Kit
Go to file
Ceriel Jacobs 2483e5723d Fixed CFU
2011-06-15 10:56:58 +02:00
bin fixup commit for tag 'release-6-0-pre-4' 2010-08-04 18:04:08 +00:00
distr Removed bashish. 2007-04-24 19:48:41 +00:00
doc fixup commit for tag 'release-6-0-pre-4' 2010-08-04 18:04:08 +00:00
emtest fixup commit for tag 'release-6-0-pre-4' 2010-08-04 18:04:08 +00:00
etc em_table is now in /h; new_table is now in util/data. 2007-02-25 12:58:41 +00: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 fixup commit for tag 'release-6-0-pre-4' 2010-08-04 18:04:08 +00:00
h fixup commit for tag 'release-6-0-pre-4' 2010-08-04 18:04:08 +00:00
include fixup commit for tag 'release-6-0-pre-4' 2010-08-04 18:04:08 +00:00
lang Replaced dis and new with modern implementations donated by erik@backerud.se. 2010-10-02 21:52:29 +00:00
lib fixup commit for tag 'release-6-0-pre-4' 2010-08-04 18:04:08 +00:00
mach fixup commit for tag 'release-6-0-pre-4' 2010-08-04 18:04:08 +00:00
man Header --> Id 1994-06-24 14:02:31 +00:00
modules fixup commit for tag 'release-6-0-pre-4' 2010-08-04 18:04:08 +00:00
plat Added support for remove() and unlink(). 2010-09-27 20:44:49 +00:00
util Fixed CFU 2011-06-15 10:56:58 +02:00
.distr Configured distr system for the 6.0pre3 release. 2007-04-29 23:09:24 +00: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 Fixed typo. 2010-08-04 17:59:40 +00:00
Copyright new copyright notice in repository 2005-05-26 06:47:43 +00:00
DistrAction fixup commit for tag 'release-6-0-pre-4' 2010-08-04 18:04:08 +00:00
Makefile fixup commit for tag 'release-6-0-pre-4' 2010-08-04 18:04:08 +00:00
NEW Added some new readmes at the top level. 2005-06-24 23:20:41 +00:00
pm Applied a patch to support OpenBSD. 2007-02-25 22:07:11 +00:00
pmfile Added cpm platform. 2007-04-27 22:42:41 +00:00
README Forgot to update version number. 2010-08-04 18:04:07 +00: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.0pre4
                     ===================================

                  © 1987-2005 Vrije Universiteit, Amsterdam
                                2010-08-08


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. 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
cpm           produces i80 CP/M .COM files


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

The version 6.0 build mechanism has been completely rewritten and is based
around the Prime Mover build tool (see http://primemover.sf.net for more
information). Installation ought to be fairly straightforward.

Requirements:

- an ANSI C compiler. Currently, I'm afraid, it's hard-coded to use gcc.
  To change, try changing the variable definitions in first/c.pm. This also
  needs to be available as 'cc' from the shell.
  
- about 20MB free in /tmp (or some other temporary directory).

- about 6MB in the target directory.

Instructions:

- edit config.pm. There's a small section at the top containing some editable
  variables. Probably the only one you may want to edit is PREFIX, which
  changes where the ACK installs to.
  
- Run:

    ./pm configure
    
  ...from the command line. This will write out a configuration file.
  
- Run:

    ./pm
    
  ...from the command line. This will actually do the build. This takes
  about two minutes on my 1.6GHz Athlon Linux machine and about 30 on my
  166MHz Pentium OpenBSD machine.
  
- Run:

    ./pm install
    
  ...from the command line (possibly with sudo). This will install the built
  ACK into whatever directory you nominated in PREFIX.
  
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
  -ansi            compile ANSI C (when using the C compiler)
  <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

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
2010-08-08

# $Source$
# $State$
# $Revision$