any ideas on how to get libgcov.a working?

Discuss the development of new homebrew software, tools and libraries.

Moderators: cheriff, TyRaNiD

Post Reply
Heimdall
Posts: 245
Joined: Thu Nov 10, 2005 1:29 am
Location: Netherlands
Contact:

any ideas on how to get libgcov.a working?

Post by Heimdall »

gcc builds by default builds gcov but although the pc side of gcov works the linking library as empty functions, or so it seems, does anyone got it to work or knows how to?
theHobbit
Posts: 65
Joined: Sat Sep 30, 2006 5:26 am

Post by theHobbit »

I posted about this the other day, here in the forums http://forums.ps2dev.org/viewtopic.php?t=12533 but i haven´t got any answer.

If you use -fprofile-arcs and -ftest-coverage the code compiles ok, but no gcda files are generated. I tryied to modify the gcda paths in the object files manually but it doesn´t work either.

But i will keep my eyes on this one, because i think it could be really helpfull to optimize emulators and code in general.
Heimdall
Posts: 245
Joined: Thu Nov 10, 2005 1:29 am
Location: Netherlands
Contact:

Post by Heimdall »

I've managed to build libgcov.a as expected. However I haven't tested it yet. Since we are using newlib as our c lib implementation gcc assumes we are lot using glibc (and that is correct) but gcov takes this assumption further and assumes that if we do not have glibc we cannot write files, to "fix" it all we need to to pass the with-headers on the second stage of gcc build.
theHobbit
Posts: 65
Joined: Sat Sep 30, 2006 5:26 am

Post by theHobbit »

Hi, just wondering if you had any luck with getting -fprofile-generate working. Please let me know if i can help with anything.
Post Reply