Re: [HACKERS] Makefile patch to make gcov work on Postgres contrib modules
Greg Stark wrote: > 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. CFLAGS ordinarily does show up in both of these places. Where it doesn't, it should be added. -- Peter Eisentraut http://developer.postgresql.org/~petere/ ---(end of broadcast)--- TIP 9: In versions below 8.0, the planner will ignore your desire to choose an index scan if your joining column's datatypes do not match
Re: [HACKERS] Makefile patch to make gcov work on Postgres contrib modules
Peter Eisentraut <[EMAIL PROTECTED]> 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 ---(end of broadcast)--- TIP 1: if posting/reading through Usenet, please send an appropriate subscribe-nomail command to [EMAIL PROTECTED] so that your message can get through to the mailing list cleanly
Re: [HACKERS] Makefile patch to make gcov work on Postgres contrib modules
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. -- Peter Eisentraut http://developer.postgresql.org/~petere/ ---(end of broadcast)--- TIP 5: don't forget to increase your free space map settings
Re: [HACKERS] Makefile patch to make gcov work on Postgres contrib modules
Tom Lane <[EMAIL PROTECTED]> writes: > Gregory Stark <[EMAIL PROTECTED]> 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 ---(end of broadcast)--- TIP 4: Have you searched our list archives? http://archives.postgresql.org
Re: [HACKERS] Makefile patch to make gcov work on Postgres contrib modules
Gregory Stark <[EMAIL PROTECTED]> 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? regards, tom lane ---(end of broadcast)--- TIP 6: explain analyze is your friend
Re: [HACKERS] Makefile patch to make gcov work on Postgres contrib modules
Gregory Stark wrote: > 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. But why would -lcov appear in CFLAGS? If it's a library it should be in LIBS and perhaps in SHLIB_LINK. -- Peter Eisentraut http://developer.postgresql.org/~petere/ ---(end of broadcast)--- TIP 3: Have you checked our extensive FAQ? http://www.postgresql.org/docs/faq