Building ada with gcov option

398 Views Asked by At

I have some trouble to compile an Ada project with gcov.

There are my options :

gprbuild -P project.gpr -XOS=Linus -j2 -s -k -p -cargs --coverage -largs --coverage

Compilation is ok (I see --coverage when the adb are compiled) but the linking is ko :

hidden symbol '-gcov_init' in [...]/libgcov.a(_gcov.o) is referenced by DSO

I'm new to ada, I don't know what information you need to help me, ask me for more.

Thank you.

EDIT:

On my .gpr I have some linked library (I paste here one example) :

package Compiler is 
    for Default_Switches ("C") use Rules.Compiler'Default_Switches ("C") &
    (
        "I" & external ("VOB_HOME") & "[path_to_folder]"
    )
end Compiler

package Linker is 
    for Default_Switches ("Ada") use Rules.Compiler'Default_Switches ("Ada") &
    (
        "L" & external ("VOB_HOME") & "[path_to_folder]" & Path_Lib
    )
end Linker

I think that theses libraries are not compiled with gcov, but I don't know how rebuild theses.

0

There are 0 best solutions below