This software is a port of the TenDRA C/C++ compiler, version 4.1.2, to the Minix operating system. See http://www.ten15.org and http://www.tendra.org for other sites of TenDRA. Version 4.1.2 was the last version released by the original developers, the British DERA. Please read the file COPYRIGHT (at the top of the sources hierarchy) for the original license (OSD compliant). Additions and changes made for this port are public domain.
The latest release is "b", with many bug fixes in the C++ compiler.
This package will compile under versions 2.0.0/2/3/4 and 3.1.1 of Minix. You need at least an i486 processor (or i386+i387) and 4 MB of RAM to build (and use) the compiler.
To compile and install, type (as bin user),
cd /usr/local/src gzip -d -c TenDRA412b.tgz | tar xf - cd TenDRA-4.1.2 ./INSTALL >> messages.build 2>&1
(If you are using Minix 2, you will probably need to install gzip to unpack the sources.)
The compilation and installation may take up to 8 hours on a slow machine (33 MHz). You can monitor the compilation process on another virtual terminal,
cd /usr/local/src/TenDRA-4.1.2 tail -n 24 -f messages.build
At the end, there should be no error messages in this file. Common causes of failure are:
In general, the original sources are very clean and the makefiles very well behaved, so if the installation gets interrupted somewhere, you can restart it with the ./INSTALL command above; no need of deleting anything nor unpacking again.
Almost everything gets installed under /usr/local/lib/TenDRA, a few scripts go into /usr/local/bin (tcc, tchk, tspec, ld), and man pages into /usr/local/man (don't forget "makewhatis /usr/local/man" to read them).
To compile a simple C program,
tcc hello.c
To compile a simple C++ program,
tcc -Yc++ hello.C
As mentioned before, the frontends don't use the system headers. Instead, they check your program against precompiled libraries of "tokens" (= macro definitions) that specify Application Programming Interfaces (APIs). These precompiled API token libraries are built during installation, using the specs given in src/lib/apis and the contents of the system headers. The TenDRA-4.1.2 distribution comes with several APIs, but only two of them can be built on standard Minix: ansi (X3.159) and posix (1003.1). APIs are chosen by specifying an environment with the -Y switch. By default, the ansi environment is used. Several -Y switches may be combined in the same command line,
tcc -Yposix -Yc++ prog.C
If you want to bypass API checking and use normal system headers, there is a special environment for doing this,
tcc -Ysystem prog.c tcc -Ysystem -Yc++ prog.C
This is necessary for using Minix specific features (networking, for example). The compiler driver tcc behaves like any other one, accepting common options like -c (compile only), -o (name output file), etc. See the man page tcc(1). You can pass options to the linker script through the -Wl: switch; the most important use of this is to produce a separate I&D executable,
tcc -Ysystem -Wl:-i main.o module.o -lcurses
Of course, there is a list of caveats about this program.
#pragma TenDRA function pointer as pointer allowSee also the switch -X (compilation mode) in the documentation.
The C++ frontend was not so good as I thought at the time of the first release, but with the bunch of bugs fixed for this new release, it should compile most freestanding C++ programs without problems.
I have made some tests involving relatively complex inheritance hierarchies, with template classes, virtual bases, virtual tables, and exceptions, and everything has worked fine.
I don't plan to develop this project very actively, but I want it to be bug free. If you find some problem other than the five warnings I made above, please tell me (email me at the address josejuanmr <at> users <dot> sourceforge <dot> net) and I'll try to fix it (you'll have to be patient).
Go to the project summary page to download. The file named TenDRA412b.tgz is a compressed tar file (.tar.gz) with the compiler sources. The letter following 412 indicates the release. The latest release is b. The file named TenDRA-doc.tgz contains plenty of HTML documentation.