Re: Makefile patch to make gcov work on Postgres contrib modules

From: Greg Stark <gsstark(at)mit(dot)edu>
To: Peter Eisentraut <peter_e(at)gmx(dot)net>
Cc: pgsql-hackers(at)postgresql(dot)org, Gregory Stark <gsstark(at)mit(dot)edu>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Subject: Re: Makefile patch to make gcov work on Postgres contrib modules
Date: 2007-04-14 23:56:01
Message-ID: 87zm5abje6.fsf@stark.xeocode.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Peter Eisentraut <peter_e(at)gmx(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tatsuo Ishii 2007-04-15 02:15:34 Re: Server-side support of all encodings
Previous Message Steve 2007-04-14 22:55:45 Re: [HACKERS] choose_bitmap_and again (was Re: [PERFORM] Strangely Variable Query Performance)