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

From Gregory Stark
Subject Re: Makefile patch to make gcov work on Postgres contrib modules
Date
Msg-id 87odltd40j.fsf@stark.xeocode.com
Whole thread Raw
In response to Re: Makefile patch to make gcov work on Postgres contrib modules  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Makefile patch to make gcov work on Postgres contrib modules
List pgsql-hackers
Tom Lane <tgl@sss.pgh.pa.us> writes:

> Gregory Stark <stark@enterprisedb.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



pgsql-hackers by date:

Previous
From: Gregory Stark
Date:
Subject: Re: elog(FATAL) vs shared memory
Next
From: Stephan Szabo
Date:
Subject: Re: Eliminating unnecessary left joins