undefined reference to `__gcov_init' when using FLAGS+='-fprofile-arcs -ftest-coverage'

Michael Stahl mstahl at redhat.com
Wed Dec 12 03:28:13 PST 2012


On 12/12/12 11:49, John Smith wrote:
> On Wed, Dec 12, 2012 at 11:36 AM, Michael Stahl <mstahl at redhat.com> wrote:
>>
>> setup_native still uses the old dmake based build system, most likely
>> that does not support those *FLAGS variables.  you can check with "make
>> setup_native VERBOSE=t" if that stuff is actually used.
>>
> Thanks. But I have no idea what to look for in the output when using VERBOSE=t.
> :(

well obviously check that the flags you want to add are actually on the
command line...

> Compiling: setup_native/scripts/source/getuid.c
> gcc -fprofile-arcs -ftest-coverage  -fmessage-length=0 -c -Os

      ^^^ ok so CFLAGS seem to work

> gcc -Wl,-z,noexecstack -Wl,-z,combreloc -Wl,-z,defs
> -Wl,-Bsymbolic-functions -Wl,--dynamic-list-cpp-new
> -Wl,--dynamic-list-cpp-typeinfo -Wl,--hash-style=gnu -Wl,-z,origin
> -Wl,-rpath,'$ORIGIN:$ORIGIN/../ure-link/lib',--enable-new-dtags
> -shared -L../../unxlngi6.pro/lib -L../lib
> -L/usr/local/src/libreoffice/solenv/unxlngi6/lib
> -L/usr/local/src/libreoffice/solver/unxlngi6.pro/lib
> -L/usr/local/src/libreoffice/solenv/unxlngi6/lib
> .../../unxlngi6.pro/slo/getuid.o -o ../../unxlngi6.pro/lib/getuid.so
> -ldl -Wl,--as-needed -ldl -lpthread -lm -Wl,--no-as-needed

but apparently LDFLAGS don't

hmmm... you could try editing these and adding your options there:

solenv/inc/unxgcc.mk:LINKFLAGSSHLGUI= -shared
solenv/inc/unxgcc.mk:LINKFLAGSSHLCUI= -shared

of course the best would be to convert the module to the new build
system and send a patch :)



More information about the LibreOffice mailing list