Re: Makefile patch to make gcov work on Postgres contrib modules - Mailing list pgsql-hackers

From Greg Stark
Subject Re: Makefile patch to make gcov work on Postgres contrib modules
Date
Msg-id 87zm5abje6.fsf@stark.xeocode.com
Whole thread Raw
In response to Re: Makefile patch to make gcov work on Postgres contrib modules  (Peter Eisentraut <peter_e@gmx.net>)
Responses Re: Makefile patch to make gcov work on Postgres contrib modules
List pgsql-hackers
Peter Eisentraut <peter_e@gmx.net> writes:

> Am Donnerstag, 12. April 2007 17:08 schrieb Gregory Stark:
> > Unless there's a makefile variable that is included in both CFLAGS and
> > LDFLAGS that the user could use instead? But then that wouldn't work on
> > architectures where ld is used instead of gcc for linking.
> 
> Perhaps you should start by defining which situation you want to achieve.

There are two ways to get gcov to work. Either you add -lcov to the end of the
linking step or you use the same -f flags that you use at the compile stage.

So what I would like to happen is something like:

CFLAGS='-fprofile-arcs -ftest-coverage -O0 -g'  ./configure --enable-debug --enable-cassert --enable-depend
make
make check
gcov src/backend/access/common/heaptuple.c

Perhaps the flags need to be in a separate variable instead of CFLAGS
specifically advertised to ensure the flags will show up in both compile and
linking lines.

-- 
greg



pgsql-hackers by date:

Previous
From: "Simon Riggs"
Date:
Subject: Re: choose_bitmap_and again (was Re: [PERFORM] StrangelyVariable Query Performance)
Next
From: Tatsuo Ishii
Date:
Subject: Re: Server-side support of all encodings