2016-09-02 21:00:38 +00:00
|
|
|
THE AMSTERDAM COMPILER KIT V6.1pre1
|
2007-02-25 12:53:55 +00:00
|
|
|
===================================
|
|
|
|
|
|
|
|
© 1987-2005 Vrije Universiteit, Amsterdam
|
2016-11-26 18:25:02 +00:00
|
|
|
2016-11-26
|
2007-02-25 12:53:55 +00:00
|
|
|
|
|
|
|
|
|
|
|
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.
|
|
|
|
|
2016-09-02 21:00:38 +00:00
|
|
|
This is an early prerelease of the apocryphal version 6.1 release. Not a
|
2007-02-25 12:53:55 +00:00
|
|
|
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
|
2016-09-02 21:00:38 +00:00
|
|
|
done and to evaluate how the full 6.1 release should work.
|
2007-02-25 12:53:55 +00:00
|
|
|
|
|
|
|
|
2016-11-26 18:25:02 +00:00
|
|
|
|
2007-02-25 12:53:55 +00:00
|
|
|
SUPPORT
|
|
|
|
=======
|
|
|
|
|
|
|
|
Languages:
|
|
|
|
|
2013-05-15 22:12:05 +00:00
|
|
|
ANSI C, Pascal, Modula 2, Basic. K&R is supported via the ANSI C compiler.
|
2007-02-25 12:53:55 +00:00
|
|
|
|
|
|
|
Platforms:
|
|
|
|
|
|
|
|
pc86 produces bootable floppy disk images for 8086 PCs
|
2007-04-24 20:45:58 +00:00
|
|
|
linux386 produces ELF executables for PC Linux systems
|
2013-05-15 22:12:05 +00:00
|
|
|
linux68k produces ELF executables for m68020 Linux systems
|
2016-11-26 18:25:02 +00:00
|
|
|
linuxppc produces ELF executables for PowerPC Linux systems
|
2007-04-29 23:09:24 +00:00
|
|
|
cpm produces i80 CP/M .COM files
|
2013-05-22 08:47:22 +00:00
|
|
|
rpi produces Raspberry Pi GPU binaries
|
2007-02-25 12:53:55 +00:00
|
|
|
|
|
|
|
|
2016-11-26 18:25:02 +00:00
|
|
|
|
2007-02-25 12:53:55 +00:00
|
|
|
INSTALLATION
|
|
|
|
============
|
|
|
|
|
2013-05-15 22:12:05 +00:00
|
|
|
The version 5.0 build mechanism has been completely rewritten. Installation
|
|
|
|
ought to be fairly straightforward.
|
2007-02-25 12:53:55 +00:00
|
|
|
|
|
|
|
Requirements:
|
|
|
|
|
2013-05-15 22:12:05 +00:00
|
|
|
- an ANSI C compiler. This defaults to gcc. You can change this by setting
|
|
|
|
the CC make variable.
|
|
|
|
|
2013-05-18 11:15:53 +00:00
|
|
|
- flex and yacc.
|
|
|
|
|
|
|
|
- GNU make.
|
|
|
|
|
2016-09-02 21:00:38 +00:00
|
|
|
- Lua 5.1 and the luaposix library (used by the build system).
|
|
|
|
|
|
|
|
- (optionally) ninja; if you've got this, this will be autodetected and give
|
|
|
|
you faster builds.
|
|
|
|
|
2016-11-26 18:25:02 +00:00
|
|
|
- (optionally) the qemu suite: if you have this installed, the build system
|
|
|
|
will detect it automatically and run the test suites for the supported
|
|
|
|
architectures. Get both the qemu-system-* platform emulators and the qemu-*
|
|
|
|
userland emulators (only works on Linux).
|
|
|
|
|
2013-05-15 22:12:05 +00:00
|
|
|
- about 40MB free in /tmp (or some other temporary directory).
|
2007-02-25 12:53:55 +00:00
|
|
|
|
|
|
|
- about 6MB in the target directory.
|
|
|
|
|
|
|
|
Instructions:
|
|
|
|
|
2013-05-15 22:12:05 +00:00
|
|
|
- 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.
|
2007-02-25 12:53:55 +00:00
|
|
|
|
|
|
|
- Run:
|
|
|
|
|
2016-09-02 21:00:38 +00:00
|
|
|
make
|
2013-05-15 22:12:05 +00:00
|
|
|
|
|
|
|
...from the command line. This will do the build.
|
|
|
|
|
|
|
|
The make system is fully parallelisable. If you have a multicore system,
|
2016-09-02 21:00:38 +00:00
|
|
|
install ninja and it'll use all your cores. If you don't have ninja, you
|
|
|
|
can still use make for parallel builds with:
|
2013-05-15 22:12:05 +00:00
|
|
|
|
2016-09-02 21:00:38 +00:00
|
|
|
make MAKEFLAGS='-r -j8' # or however many cores you have
|
2013-05-15 22:12:05 +00:00
|
|
|
|
2016-09-02 21:00:38 +00:00
|
|
|
...but frankly, I recommend ninja.
|
2013-05-15 22:12:05 +00:00
|
|
|
|
2007-02-25 12:53:55 +00:00
|
|
|
- Run:
|
|
|
|
|
2013-05-15 22:12:05 +00:00
|
|
|
sudo make install
|
|
|
|
|
|
|
|
...from the command line. This will install the ACK in your PREFIX
|
|
|
|
directory (by default, /usr/local).
|
|
|
|
|
2007-02-25 12:53:55 +00:00
|
|
|
The ACK should now be ready to use.
|
|
|
|
|
|
|
|
|
2016-11-26 18:25:02 +00:00
|
|
|
|
2007-02-25 12:53:55 +00:00
|
|
|
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
|
2013-05-15 22:12:05 +00:00
|
|
|
-O enable optimisation (optimisation levels go up to 6)
|
2007-02-25 12:53:55 +00:00
|
|
|
-ansi compile ANSI C (when using the C compiler)
|
2013-05-15 22:12:05 +00:00
|
|
|
-v be more verbose (repeatable)
|
2007-02-25 12:53:55 +00:00
|
|
|
<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
|
2013-05-15 22:12:05 +00:00
|
|
|
.e ACK intermediate code assembly files
|
2007-02-25 12:53:55 +00:00
|
|
|
|
|
|
|
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.
|
2007-04-24 20:45:58 +00:00
|
|
|
A sample command line is:
|
|
|
|
|
|
|
|
ack -mlinux386 -O examples/paranoia.c
|
2007-02-25 12:53:55 +00:00
|
|
|
|
|
|
|
|
2013-05-15 22:12:05 +00:00
|
|
|
|
2007-02-25 12:53:55 +00:00
|
|
|
GOTCHAS
|
|
|
|
=======
|
2005-06-24 23:20:41 +00:00
|
|
|
|
|
|
|
There are some things you should be aware of.
|
|
|
|
|
2013-05-22 08:47:22 +00:00
|
|
|
- Look at plat/<PLATFORMNAME>/README for information about the supported
|
2007-04-29 23:09:24 +00:00
|
|
|
platforms.
|
2005-06-24 23:20:41 +00:00
|
|
|
|
2007-04-24 20:45:58 +00:00
|
|
|
- The library support is fairly limited; for C, it's at roughly the ANSI C
|
|
|
|
level, and for the other languages it's similar.
|
2005-06-24 23:20:41 +00:00
|
|
|
|
2007-02-25 12:53:55 +00:00
|
|
|
- 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.
|
|
|
|
|
2007-02-25 22:09:15 +00:00
|
|
|
- BSD systems may need to up the number of file descriptors (e.g.
|
|
|
|
'ulimit -n 200') before the ACK will compile.
|
2005-06-24 23:20:41 +00:00
|
|
|
|
2007-02-25 22:09:15 +00:00
|
|
|
- The ACK uses its own .o format. You won't be able to mix the ACK's object
|
|
|
|
files and another compiler's.
|
|
|
|
|
2016-09-02 21:00:38 +00:00
|
|
|
- The distribution contains *everything*, including the weird, ancient,
|
|
|
|
archaic stuff that doesn't work any more and never will, such as the int EM
|
|
|
|
interpreter and the assembler-linkers. Only some of it builds. Look for
|
|
|
|
build.lua files.
|
2007-02-25 22:09:15 +00:00
|
|
|
|
2016-11-26 18:25:02 +00:00
|
|
|
|
|
|
|
|
2007-02-25 12:53:55 +00:00
|
|
|
DISCLAIMER
|
|
|
|
==========
|
2005-06-24 23:20:41 +00:00
|
|
|
|
|
|
|
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.
|
|
|
|
|
2016-11-26 18:25:02 +00:00
|
|
|
David Given (davidgiven on Github)
|
2005-06-24 23:20:41 +00:00
|
|
|
dg@cowlark.com
|
2016-11-26 18:25:02 +00:00
|
|
|
2016-11-26
|