Lists: | pgsql-hackers |
---|
From: | Gregory Stark <stark(at)enterprisedb(dot)com> |
---|---|
To: | PostgreSQL-development Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Earlier suggestion to get gcov to work by adding $(CFLAGS) to module link line |
Date: | 2007-07-17 05:58:02 |
Message-ID: | 87k5szd11x.fsf@oxford.xeocode.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-hackers |
Was there any consensus on this change? It or something like it is necessary
to get gcov to work for contrib modules. I think adding all of $(CFLAGS) is
the correct thing to do on linux because if we're going to use $(CC) to link
then you don't know which of $(CFLAGS) might be necessary at link time as
well. I think -pg will suffer from the same problems for example.
Index: Makefile.linux
===================================================================
RCS file: /home/stark/src/REPOSITORY/pgsql/src/makefiles/Makefile.linux,v
retrieving revision 1.22
diff -u -r1.22 Makefile.linux
--- Makefile.linux 9 Dec 2005 21:19:36 -0000 1.22
+++ Makefile.linux 17 Jul 2007 05:52:43 -0000
@@ -11,6 +11,6 @@
endif
%.so: %.o
- $(CC) -shared -o $@ $<
+ $(CC) $(CFLAGS) -shared -o $@ $<
sqlmansect = 7
--
Gregory Stark
EnterpriseDB http://www.enterprisedb.com
From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Gregory Stark <stark(at)enterprisedb(dot)com> |
Cc: | PostgreSQL-development Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Earlier suggestion to get gcov to work by adding $(CFLAGS) to module link line |
Date: | 2007-07-17 13:31:25 |
Message-ID: | 21253.1184679085@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-hackers |
Gregory Stark <stark(at)enterprisedb(dot)com> writes:
> Was there any consensus on this change?
The implicit .so rule sucks on nearly every port, not only Linux.
We should be getting rid of the things in favor of using the much more
complete rules in Makefile.shlib.
regards, tom lane