there is no documentation on how to use --enable-checking=valgrind, when valgrind is installed, but can't be found during configuration. Something like --with-valgrind=... or --valgrind-includes=... doesn't work. Setting C_INCLUDE_PATH to the appropriate directory works, but IMHO there should be an option to configure. My configure-command is: tobi@marktplatz build-valgrind]$ ../gcc/configure --prefix=/home/tobi/usr --enable-languages=c,f95 --with-gmp=/home/tobi/usr --enable-checking=valgrind when building it fails (not surprisingly) with: ... checking for unistd.h... yes checking valgrind.h usability... no checking valgrind.h presence... no checking for valgrind.h... no checking for VALGRIND_DISCARD in <valgrind/memcheck.h>... no checking for VALGRIND_DISCARD in <memcheck.h>... no checking for valgrind... /home/tobi/usr/bin/valgrind configure: error: *** Can't find both valgrind and valgrind/memcheck.h, memcheck.h or valgrind.h make: *** [configure-gcc] Error 1 [tobi@marktplatz build-valgrind]$
Confirmed.
I should add that there is no documentation at all on how to use the valgrind enabled compiler. Running the compiler driver does the right thing, but there doesn't seem to be a way to find out, how the compiler driver invokes valgrind on the compiler proper. 'gfortran -v' provides the same information a non-valgrind-enabled compiler gives. 'valgrind f951' seems to do the trick, but I don't know if that's all that has to be done. I'm specifically interested in this because I found a crash in f951 which only triggers when input is read from stdin (PR15032), so I can't use the compiler driver.
I believe this has been addressed. r97390 documents --enable-checking=valgrind and r233735 adds --enable-valgrind-annotations to install.texi.