README 5.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182
  1. THE AMSTERDAM COMPILER KIT V6.1pre1
  2. ===================================
  3. © 1987-2005 Vrije Universiteit, Amsterdam
  4. 2016-08-02
  5. INTRODUCTION
  6. ============
  7. The Amsterdam Compiler Kit is a complete compiler toolchain consisting of
  8. front end compilers for a number of different languages, code generators,
  9. support libraries, and all the tools necessary to go from source code to
  10. executable on any of the platforms it supports.
  11. This is an early prerelease of the apocryphal version 6.1 release. Not a
  12. lot is supported, the build mechanism needs work, and a lot of things are
  13. probably broken. However, what's there should be sufficient to get things
  14. done and to evaluate how the full 6.1 release should work.
  15. SUPPORT
  16. =======
  17. Languages:
  18. ANSI C, Pascal, Modula 2, Basic. K&R is supported via the ANSI C compiler.
  19. Platforms:
  20. pc86 produces bootable floppy disk images for 8086 PCs
  21. linux386 produces ELF executables for PC Linux systems
  22. linux68k produces ELF executables for m68020 Linux systems
  23. cpm produces i80 CP/M .COM files
  24. rpi produces Raspberry Pi GPU binaries
  25. INSTALLATION
  26. ============
  27. The version 5.0 build mechanism has been completely rewritten. Installation
  28. ought to be fairly straightforward.
  29. Requirements:
  30. - an ANSI C compiler. This defaults to gcc. You can change this by setting
  31. the CC make variable.
  32. - flex and yacc.
  33. - GNU make.
  34. - Lua 5.1 and the luaposix library (used by the build system).
  35. - (optionally) ninja; if you've got this, this will be autodetected and give
  36. you faster builds.
  37. - about 40MB free in /tmp (or some other temporary directory).
  38. - about 6MB in the target directory.
  39. Instructions:
  40. - edit the Makefile. There's a small section at the top where you can change
  41. the configuration. Probably the only one you may want to edit is PREFIX,
  42. which changes where the ACK installs to.
  43. - Run:
  44. make
  45. ...from the command line. This will do the build.
  46. The make system is fully parallelisable. If you have a multicore system,
  47. install ninja and it'll use all your cores. If you don't have ninja, you
  48. can still use make for parallel builds with:
  49. make MAKEFLAGS='-r -j8' # or however many cores you have
  50. ...but frankly, I recommend ninja.
  51. - Run:
  52. sudo make install
  53. ...from the command line. This will install the ACK in your PREFIX
  54. directory (by default, /usr/local).
  55. The ACK should now be ready to use.
  56. USAGE
  57. =====
  58. Currently I haven't sorted out all the documentation --- it's supplied in the
  59. distribution, but not all of it gets installed yet --- so here is a quickstart
  60. guide.
  61. The main command to use is 'ack'. This invokes the compiler and the linker.
  62. Some useful options include:
  63. -m<platform> build for the specified platform
  64. -o <file> specifies the output file
  65. -c produce a .o file
  66. -c.s produce a .s assembly file
  67. -O enable optimisation (optimisation levels go up to 6)
  68. -ansi compile ANSI C (when using the C compiler)
  69. -v be more verbose (repeatable)
  70. <file> build file
  71. ack figures out which language to use from the file extension:
  72. .c C (ANSI or K&R)
  73. .b Basic
  74. .mod Modula-2
  75. .ocm Occam 1
  76. .p Pascal
  77. .o object files
  78. .s assembly files
  79. .e ACK intermediate code assembly files
  80. For further information, see the man page (which actually does get
  81. installed, but is rather out of date).
  82. There are some (known working) example programs in the 'examples' directory.
  83. A sample command line is:
  84. ack -mlinux386 -O examples/paranoia.c
  85. GOTCHAS
  86. =======
  87. There are some things you should be aware of.
  88. - Look at plat/<PLATFORMNAME>/README for information about the supported
  89. platforms.
  90. - The library support is fairly limited; for C, it's at roughly the ANSI C
  91. level, and for the other languages it's similar.
  92. - When compiling languages other than C, the ACK will usually look at the
  93. first character of the file. If it's a #, then the file will be run through
  94. the C preprocessor anyway.
  95. - BSD systems may need to up the number of file descriptors (e.g.
  96. 'ulimit -n 200') before the ACK will compile.
  97. - The ACK uses its own .o format. You won't be able to mix the ACK's object
  98. files and another compiler's.
  99. - The distribution contains *everything*, including the weird, ancient,
  100. archaic stuff that doesn't work any more and never will, such as the int EM
  101. interpreter and the assembler-linkers. Only some of it builds. Look for
  102. build.lua files.
  103. DISCLAIMER
  104. ==========
  105. The ACK is mature, well-tested software, but the environment in which it was
  106. developed for and tested under is rather different from that available on
  107. today's machines. There will probably be little in the way of logical bugs,
  108. but there may be many compilation and API bugs.
  109. If you wish to use the ACK, *please* join the mailing list. We are interested
  110. in any reports of success and particularly, failure. If it does fail for you,
  111. we would love to know why, in as much detail as possible. Bug fixes are even
  112. more welcome.
  113. The ACK is licensed under a BSD-like license. Please see the 'Copyright' file
  114. for the full text.
  115. You can find the mailing list on the project's web site:
  116. http://tack.sourceforge.net/
  117. Please enjoy.
  118. David Given (dtrg on Sourceforge)
  119. dg@cowlark.com
  120. 2016-08-02