Installing Smatch!!!
Note: gcc-3.1.1 is the only release to use. (There is no good reason
for this choice, it was just a milestone to develop against at the
time).
- Download gcc-3.1.1 (gcc mirrors).
- zcat gcc-3.1.1.tar.gz | tar -xv
- Download the most recent diff-smatch from sourceforge
- cd gcc-3.1.1 && cat ../diff-smatch.<version> | patch -p1
- cd ..
- mkdir build/
- cd build/
- ../gcc-3.1.1/configure --prefix=../build --enable-languages=c
- make
At this point
you will have compiled a program build/gcc/xgcc that can generate Smatch output.
Read the section on
using Smatch to compile a kernel.
Or to upgrade from a previous version of smatch:
- cd gcc-3.1.1
- cat ../diff-smatch.<old version> | patch -p1 -R
- cat ../diff-smatch.<new version> | patch -p1
- cd ../build/ && make
|