Installing checker


Other languages

For Ada95 (and nearly any languages, even C):

You can use checker as a bullet proof malloc, with a garbage detector. To do this, configure with `--disable-check-usage'. The result of make is an object, gccchecker.o, which can be linked with your binary.

For C++ (this is not so simple):

You have to get sources of you gcc/g++ compiler, which must be gcc-2.95.2., since the patches provided are for this version of gcc.

Note: You can try with an other version, but you could encounter problems while patching gcc sources. Furthermore, since while compiling with checker, standard headers are used, you need to get the sources of your libstdc++ libraries.

So, get gcc-2.95.2.tar.gz. Untar it, and apply patches:

      gcc-2.95.2> patch -p1 < XXX/Checker/patch/gcc2952.diffs
    
Configure it (do not forget to enable C++ with `--enable-languages=c++') and install it.

At this stage you should have a working gcc/g++ compiler with libstdc++, the standard c++ library.

Then, you can configure checker as decribe above and install it. Do not forget to add option --enable-cxx to activate c++ stubs generation.

You should then compile libio and libstdc++ with checker. First go to the libio directory and clean the files:

      > cd i686-pc-linux-gnu/libio
      > make clean
    
You have to suppress the following lines from Makefile, since the libio used does not call libc:
  # We have those in libc.a.
  IO_OBJECTS= iogetline.o
  STDIO_WRAP_OBJECTS=
  OSPRIM_OBJECTS=
  STDIO_OBJECTS=
    
Then you can recompile libio and libstdc++:
      > make CC=checkergcc CXX=checkerg++ MT_CFLAGS=
      > cd ../libstdc++
      > make clean
      > make CC=checkergcc CXX=checkerg++ MT_CFLAGS=
    
Note: this libstdc++ library is not thread safe, since checker itself is not thread safe.

You are now ready to install libstdc++ in the checker library directory:

      > cp libstdc++ CHECKER_PREFIX_DIR/lib/checker/i686-pc-linux-gnu
    

Tristan Gingold
Last modified: Sun Apr 16 17:27:08 CEST 2000