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

From: Gregory Stark <gsstark(at)mit(dot)edu>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: PostgreSQL Development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Makefile patch to make gcov work on Postgres contrib modules
Date: 2007-04-12 15:08:28
Message-ID: 87odltd40j.fsf@stark.xeocode.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> writes:

> Gregory Stark <stark(at)enterprisedb(dot)com> writes:
> > %.so: %.o
> > ! $(CC) -shared -o $@ $<
>
> > sqlmansect = 7
> > --- 11,16 ----
> > endif
>
> > %.so: %.o
> > ! $(CC) $(CFLAGS) -shared -o $@ $<
>
> Surely CFLAGS should be irrelevant at link time. Maybe LDFLAGS?

Does LDFLAGS contain flags that can be passed to $(CC) or are they expecting
to be passed to $(LD)?

It would be less convenient for the user who would have to do

CFLAGS='-fprofile-arcs -ftest-coverage' LDFLAGS='-fprofile-arcs -ftest-coverage' ./configure

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.

--
Gregory Stark
EnterpriseDB http://www.enterprisedb.com

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Stephan Szabo 2007-04-12 15:09:21 Re: Eliminating unnecessary left joins
Previous Message Ron 2007-04-12 14:59:10 Re: Slow Postgresql server