How to prevent Waf from renaming object files?

Viewed 667

I am using Waf to build a C project and gcov to have some test code coverage. However, Waf calls gcc in a way that produces foo.c.1.o from source file foo.c that confuses gcov when searching for the generated files:

$ gcov foo.c
$ foo.gcno:cannot open graph file

Fortunately, gcov has the -o option with which it is possible to specify the corresponding object file. Nevertheless, this is not convenient and executing lcov still fails. Therefore, my questions are:

  1. Why does Waf rename the object files?
  2. How can this behaviour be disabled or ...
  3. How can gcov/lcov work around this issue?
2 Answers
Related