Thursday, August 28, 2008

Re: [HACKERS] code coverage patch

Gregory Stark wrote:
> Peter Eisentraut <peter_e@gmx.net> writes:
>
>> The reason for that problem is that the shared object needs to be linked
>> with -fprofile-arcs -ftest-coverage. (One of these causes -lgcov to be
>> linked, which includes the missing symbol.) This is not done because the
>> shared object link rules don't use CFLAGS.
>
> Shared object link rules should use another variable (LDFLAGS?) and those
> options should be added that variable as well.

When linking executables, we already use both CFLAGS and LDFLAGS. This
is the standard way in the GNU-enabled world. And it does exactly the
right thing in this gcov case. If we invented another variable, we
would disrupt that system and would further differentiate between
different types of linking, while we should ultimately aim to make it
less different.

--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

No comments: