[Bug gcov-profile/51807] New: Fail to generate .gcno file when use libtool to compile la library

2012-01-09 Thread beanflowersh at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51807

 Bug #: 51807
   Summary: Fail to generate .gcno file when use libtool to
compile la library
Classification: Unclassified
   Product: gcc
   Version: unknown
Status: UNCONFIRMED
  Severity: critical
  Priority: P3
 Component: gcov-profile
AssignedTo: unassig...@gcc.gnu.org
ReportedBy: beanflowe...@gmail.com


1.The project need to use libtool to compile la files.
2.Add LIBS+=" -lgcov" in configure
3.configure CFLAGS="-g -Wall -Werror -Wno-unknown-pragmas -fprofile-arcs
-ftest-coverage" \
 CXXFLAGS="-g -Wall -Werror -Wno-unknown-pragmas -fprofile-arcs
-ftest-coverage" \
 --enable-unit-tests \
 --enable-libcurl \
 --disable-shared \
 --enable-developer-mode \

4.make
5.Check the la related cpp files ant gcov didn't generate .gcno file.

Is there any work around to resolve this issue? or if it needs to add
additional parameter.


[Bug gcov-profile/51807] Fail to generate .gcno file when use libtool to compile la library

2012-01-09 Thread beanflowersh at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51807

--- Comment #1 from lei  2012-01-10 07:10:13 UTC 
---
(In reply to comment #0)
> 1.The project need to use libtool to compile la files.
> 2.Add LIBS+=" -lgcov" in configure
> 3.configure CFLAGS="-g -Wall -Werror -Wno-unknown-pragmas -fprofile-arcs
> -ftest-coverage" \
>  CXXFLAGS="-g -Wall -Werror -Wno-unknown-pragmas -fprofile-arcs
> -ftest-coverage" \
>  --enable-unit-tests \
>  --enable-libcurl \
>  --disable-shared \
>  --enable-developer-mode \
> 
> 4.make
> 5.Check the la related cpp files ant gcov didn't generate .gcno file.
> 
> Is there any work around to resolve this issue? or if it needs to add
> additional parameter.

E.g.:
The frame of my project as below:
Dir1: 1.cpp 2.cpp 3.cpp
After compiled(add -fprofile-arcs -ftest-coverage), the files in the Dir1 as
below:
1.cpp 1.o 1.gcno
2.cpp 2.o 2.lo
3.cpp 3.o 3.lo
.libc/***.a ***.la

But there isn't the gcno files to be generated for 2.cpp and 3.cpp and I cannot
get the code coverage data for 2.cpp and 3.cpp.


[Bug gcov-profile/51807] Fail to generate .gcno file when use libtool to compile la library

2012-01-10 Thread beanflowersh at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51807

lei  changed:

   What|Removed |Added

 Status|RESOLVED|CLOSED
 Resolution|INVALID |FIXED

--- Comment #3 from lei  2012-01-11 01:45:34 UTC 
---
Thanks your advice, will check libtool.