In my quest to compile large C programs using SUIF 2, I have found the need for a gcc replacement which can be used within the GNU autoconf (i.e. ./configure scripts) framework. Thus, I have developed scc and sld which are replacements for gcc and ld. The general procedure I apply to build a SUIF file from a GNU tarball is as follows:
> tar xvzf files.tgz
> cd app
> export CC=scc
> export SCC_USE_CC=1
> export SCC_USE_CC=0
The SCC_USE_CC variable tells ``scc'' to use the available ``cc'' compiler. In general, this is necessary because many configure scripts do not support cross-compiling properly. Once configure has finished, we simply tell scc to use itself (!) and then run make as normal. In an ideal world, this would work perfectly first time. However, the reality is that many applications are not properly typed. By this I mean that they often do things, such as omitting ``#include'' for functions they use, which cause problems when type checking the whole program together, instead of just as seperate compilation units. The solution is to manually go through correcting these mistakes.
Finally, the linker ``sld'' has builtin support for archive files ``.a'' and also for including libraries with the ``-l'' switch. These work very well in general.