This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Questions related to creation of libgcov.so
Hi,
On Tue, 14 Aug 2018, Martin Liška wrote:
> I'm sending second version of the patch candidate. I was able to create
> a mapfile and generate versioned symbols for libgcov.so file.
>
> Unresolved issues:
> 1) I still see linking with static library:
>
> $ find /home/marxin/bin/gcc -name libgcov*
> /home/marxin/bin/gcc/lib64/libgcov.so.1
> /home/marxin/bin/gcc/lib64/gcc/x86_64-pc-linux-gnu/9.0.0/libgcov.a
> /home/marxin/bin/gcc/lib64/libgcov.so
The .so softlink needs to go into into the same directory as libgcov.a.
See how libgcc_s is installed using the SHLIB_INSTALL macro (defined in
libgcc/config/t-slibgcc). In fact, with the right substitutions you
should be able to use that macro directly without writing your own (you
need to subst @shlib_base_name@, @multilib_dir@ and @shlib_slibdir_qual@).
> 3) I added t-libgcov t-libgcov-gld t-libgcov-elf-ver into *-linux for now. Am I right that it should be added
> basically to all places where e.g. 't-slibgcc-elf-ver' is?
I think you only need to add further makefile includes if you need new
macros. I don't think you should need any? Also for linking you
probably should be able to reuse the SHLIB_LINK macro (maybe a bit
extending it is required).
Ciao,
Michael.