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

From Gregory Stark
Subject Makefile patch to make gcov work on Postgres contrib modules
Date
Msg-id 87d52biqyu.fsf@stark.xeocode.com
Whole thread Raw
Responses Re: Makefile patch to make gcov work on Postgres contrib modules  (Peter Eisentraut <peter_e@gmx.net>)
Re: Makefile patch to make gcov work on Postgres contrib modules  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
I was trying to use gcov on Postgres and ran into a problem where some contrib
modules were missing the key libcov symbols and failed to load. Korry very
helpfully tracked down the missing bit: the broken modules were ones built
using "gcc -shared" according to the rule in Makefile.linux which doesn't have
-lcov.

Actually better than adding -lcov, I think this rule really ought to have
CFLAGS in it in case there are other CFLAGS that are necessary at link time.


Index: src/makefiles/Makefile.linux
===================================================================
RCS file: /home/stark/src/REPOSITORY/pgsql/src/makefiles/Makefile.linux,v
retrieving revision 1.22
diff -c -r1.22 Makefile.linux
*** src/makefiles/Makefile.linux    9 Dec 2005 21:19:36 -0000    1.22
--- src/makefiles/Makefile.linux    11 Apr 2007 00:34:43 -0000
***************
*** 11,16 **** endif  %.so: %.o
!     $(CC) -shared -o $@ $<  sqlmansect = 7
--- 11,16 ---- endif  %.so: %.o
!     $(CC) $(CFLAGS) -shared -o $@ $<  sqlmansect = 7


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



pgsql-hackers by date:

Previous
From: Koichi Suzuki
Date:
Subject: Re: [PATCHES] Full page writes improvement, code update
Next
From: Gregory Stark
Date:
Subject: Re: [mux@FreeBSD.org: Re: Anyone interested in improving postgresql scaling?]