Re: code coverage patch - Mailing list pgsql-hackers

From Peter Eisentraut
Subject Re: code coverage patch
Date
Msg-id 48B6A8FD.6020402@gmx.net
Whole thread Raw
In response to Re: code coverage patch  (Gregory Stark <stark@enterprisedb.com>)
List pgsql-hackers
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.


pgsql-hackers by date:

Previous
From: Gregory Stark
Date:
Subject: Re: code coverage patch
Next
From: Korry Douglas
Date:
Subject: Re: code coverage patch