This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: -fprofile-generate
Rajkishore Barik wrote:
Hi,
I made some changes to libgcov.c and gcov-io.h by adding a new function
named "__gcov_merge_range".
GCC compiles successfully without any error/warning.
However, when I run any sample c program(x.c) using the following command
"gcc -fprofile-generate x.c", it says
undefined reference to "__gcov_merge_range" in the linking phase and it
does not produce x.gcda file.
I also tried compiling and linking separately using "-fprofile-generate".
All the time I get this error.
Can someone help?
regards,
Raj
You'll need to modify libgcc.mk (IIRC) to compile libgcov.c with
the correct #define enabled. Look at how the other merge functions are
done.
nathan
--
Nathan Sidwell :: http://www.codesourcery.com :: CodeSourcery LLC
nathan@codesourcery.com :: http://www.planetfall.pwp.blueyonder.co.uk