build with code coverage

John Smith lbalbalba at gmail.com
Mon Jul 8 01:02:16 PDT 2013


Hi,


Thanks, but ....


Looking at 'solenv/gbuild/platform/com_GCC_defs.mk', setting
gb_GCOV=YES seemingly sets the same options as I do (apart from '-O0',
but that doesnt really matter all that much) :


ifeq ($(strip $(gb_GCOV)),YES)
gb_CFLAGS_COMMON += -fprofile-arcs -ftest-coverage
gb_CXXFLAGS_COMMON += -fprofile-arcs -ftest-coverage
gb_LinkTarget_LDFLAGS += -fprofile-arcs -lgcov
gb_COMPILERDEFAULTOPTFLAGS := -O0


So, not surprisingly, doing this :


gb_GCOV=YES ./configure --disable-online-update --with-system-libs
--without-doxygen --with-system-mdds=no
gb_GCOV=YES make build-nocheck


Gives me the same result and the same errors. What 'make' target does
your script run ?



Regards,


John Smith


On Mon, Jul 8, 2013 at 9:35 AM, Miklos Vajna <vmiklos at suse.cz> wrote:
> Hi,
>
> On Sun, Jul 07, 2013 at 11:00:12PM +0200, John Smith <lbalbalba at gmail.com> wrote:
>> Im trying to build libreoffice with gcov/lcov code coverage. Im
>> following these steps :
>> https://wiki.documentfoundation.org/Development/Lcov
>>
>> But im getting this error: http://pastebin.com/ugnMJsyd
>>
>> I tried adding  '-lgcov' for ENVLINKFLAGS and LDFLAGS, but that doesnt help.
>>
>> Any thoughts and pointers appreciated.
>
> I'm regularly building part of the code with gcov options using this
> script:
>
> http://cgit.freedesktop.org/libreoffice/contrib/dev-tools/tree/lcov/coverage.sh
>
> So, setting gb_GCOV does the right thing here. If you want to do that
> for the whole build, try using:
>
> ----
> make bootstrap fetch
> make -j <num> -rs -f Makefile.gbuild gb_GCOV=YES
> ----
>
> instead of plain "make".
>
> HTH,
>
> Miklos


More information about the LibreOffice mailing list