]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
Fix instructions for using Tor with gcov
authorNick Mathewson <nickm@torproject.org>
Wed, 24 Oct 2012 19:03:49 +0000 (15:03 -0400)
committerNick Mathewson <nickm@torproject.org>
Wed, 24 Oct 2012 19:03:49 +0000 (15:03 -0400)
It seems as if our new build system broke gcov for me.  I've tried to
fix doc/HACKING to describe what I needed to do in order to make it
work again.

doc/HACKING

index e76b374d30fe907168e1f2ca201b9d1c8e3d2c4f..c06a682683224040c72527ed7e202e0f8d0b9079 100644 (file)
@@ -121,7 +121,8 @@ Running gcov for unit test coverage
   make clean
   make CFLAGS='-g -fprofile-arcs -ftest-coverage'
   ./src/test/test
-  cd src/common; gcov *.[ch]
+  gcov -o src/common src/common/*.[ch]
+  gcov -o src/or src/or/*.[ch]
   cd ../or; gcov *.[ch]
 -----
 
@@ -130,6 +131,13 @@ compiler generated  no code for that line.  '######' means that the
 line was never reached.  Lines with numbers were called that number
 of times.
 
+If that doesn't work:
+   * Try configuring Tor with --disable-gcc-hardening
+   * On recent OSX versions, you might need to add CC=clang to your
+     build line, as in:
+        make CFLAGS='-g -fprofile-arcs -ftest-coverage' CC=clang
+     Their llvm-gcc doesn't work so great for me.
+
 Profiling Tor with oprofile
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~