-fprofile-generate

Nathan Sidwell nathan@codesourcery.com
Sat Aug 14 17:03:00 GMT 2004


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




More information about the Gcc mailing list