README 5.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170
  1. # $Source$
  2. # $State$
  3. # $Revision$
  4. THE AMSTERDAM COMPILER KIT V6.0pre1
  5. ===================================
  6. © 1987-2005 Vrije Universiteit, Amsterdam
  7. 2007-02-25
  8. INTRODUCTION
  9. ============
  10. The Amsterdam Compiler Kit is a complete compiler toolchain consisting of
  11. front end compilers for a number of different languages, code generators,
  12. support libraries, and all the tools necessary to go from source code to
  13. executable on any of the platforms it supports.
  14. This is an early prerelease of the upcoming version 6.0 release. Not a
  15. lot is supported, the build mechanism needs work, and a lot of things are
  16. probably broken. However, what's there should be sufficient to get things
  17. done and to evaluate how the full 6.0 release should work.
  18. SUPPORT
  19. =======
  20. Languages:
  21. ANSI C, K&R C, Pascal, Modula 2, Occam 1, and a Basic variant.
  22. Platforms:
  23. pc86 produces bootable floppy disk images for 8086 PCs
  24. INSTALLATION
  25. ============
  26. The version 6.0 build mechanism has been completely rewritten and is based
  27. around the Prime Mover build tool (see http://primemover.sf.net for more
  28. information). Installation ought to be fairly straightforward.
  29. Requirements:
  30. - an ANSI C compiler. Currently, I'm afraid, it's hard-coded to use gcc.
  31. To change, try changing the variable definitions in first/c.pm. This also
  32. needs to be available as 'cc' from the shell.
  33. - about 20MB free in /tmp (or some other temporary directory).
  34. - about 6MB in the target directory.
  35. Instructions:
  36. - edit config.pm. There's a small section at the top containing some editable
  37. variables. Probably the only one you may want to edit is PREFIX, which
  38. changes where the ACK installs to.
  39. - Run:
  40. ./pm configure
  41. ...from the command line. This will write out a configuration file.
  42. - Run:
  43. ./pm
  44. ...from the command line. This will actually do the build. This takes
  45. about two minutes on my 1.6GHz Athlon Linux machine and about 30 on my
  46. 166MHz Pentium OpenBSD machine.
  47. - Run:
  48. ./pm install
  49. ...from the command line (possibly with sudo). This will install the built
  50. ACK into whatever directory you nominated in PREFIX.
  51. The ACK should now be ready to use.
  52. USAGE
  53. =====
  54. Currently I haven't sorted out all the documentation --- it's supplied in the
  55. distribution, but not all of it gets installed yet --- so here is a quickstart
  56. guide.
  57. The main command to use is 'ack'. This invokes the compiler and the linker.
  58. Some useful options include:
  59. -m<platform> build for the specified platform
  60. -o <file> specifies the output file
  61. -c produce a .o file
  62. -c.s produce a .s assembly file
  63. -O enable optimisation
  64. -ansi compile ANSI C (when using the C compiler)
  65. <file> build file
  66. ack figures out which language to use from the file extension:
  67. .c C (ANSI or K&R)
  68. .b Basic
  69. .mod Modula-2
  70. .ocm Occam 1
  71. .p Pascal
  72. .o object files
  73. .s assembly files
  74. For further information, see the man page (which actually does get
  75. installed, but is rather out of date).
  76. There are some (known working) example programs in the 'examples' directory.
  77. GOTCHAS
  78. =======
  79. There are some things you should be aware of.
  80. - The only platform supported so far is pc86, which generates 8086 tiny mode
  81. executables that will work as floppy disk boot images. So, to run, simply dd
  82. the output file (pc86.img by default) onto a floppy disk and boot from it.
  83. Be aware that very little functionality is supported and that the entire
  84. program, heap and stack and code and all, must fit within 64kB. See
  85. plat/pc86/README for more information.
  86. - By default, the ack tool will compile K&R C. Practically all C source these
  87. days is ANSI C --- use the -ansi switch to enable ANSI mode. No, the ACK is
  88. not C99 compatible.
  89. - When compiling languages other than C, the ACK will usually look at the
  90. first character of the file. If it's a #, then the file will be run through
  91. the C preprocessor anyway.
  92. - BSD systems may need to up the number of file descriptors (e.g.
  93. 'ulimit -n 200') before the ACK will compile.
  94. - The ACK uses its own .o format. You won't be able to mix the ACK's object
  95. files and another compiler's.
  96. DISCLAIMER
  97. ==========
  98. The ACK is mature, well-tested software, but the environment in which it was
  99. developed for and tested under is rather different from that available on
  100. today's machines. There will probably be little in the way of logical bugs,
  101. but there may be many compilation and API bugs.
  102. If you wish to use the ACK, *please* join the mailing list. We are interested
  103. in any reports of success and particularly, failure. If it does fail for you,
  104. we would love to know why, in as much detail as possible. Bug fixes are even
  105. more welcome.
  106. The ACK is licensed under a BSD-like license. Please see the 'Copyright' file
  107. for the full text.
  108. You can find the mailing list on the project's web site:
  109. http://tack.sourceforge.net/
  110. Please enjoy.
  111. David Given (dtrg on Sourceforge)
  112. dg@cowlark.com
  113. 2007-02-25