summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Lane2000-04-21 03:28:17 +0000
committerTom Lane2000-04-21 03:28:17 +0000
commit3ddeba7403f5ce04195578295b53b04c28c33545 (patch)
treee2923fee4fda9e4c425ca6486d12eb607a52ad8c
parentef6c33f3b98d4ade568fd4669961ec2c00c7a16a (diff)
pltcl didn't work well at all when Tcl had been built with a different
compiler than the one selected to build Postgres with. It was trying to feed Postgres-compiler switches to Tcl's compiler. (Seen this before with the perl5 interface...) Fix to use only CFLAGS taken from Tcl's configure information, plus -I which is pretty universal.
-rw-r--r--src/pl/tcl/Makefile25
1 files changed, 14 insertions, 11 deletions
diff --git a/src/pl/tcl/Makefile b/src/pl/tcl/Makefile
index 085baeb5924..afd014b061e 100644
--- a/src/pl/tcl/Makefile
+++ b/src/pl/tcl/Makefile
@@ -4,7 +4,7 @@
# Makefile for the pltcl shared object
#
# IDENTIFICATION
-# $Header: /cvsroot/pgsql/src/pl/tcl/Makefile,v 1.11 2000/03/08 01:58:46 momjian Exp $
+# $Header: /cvsroot/pgsql/src/pl/tcl/Makefile,v 1.12 2000/04/21 03:28:17 tgl Exp $
#
#-------------------------------------------------------------------------
@@ -59,6 +59,19 @@ endif
$(TCL_SHLIB_LD) -o $@ $< $(TCL_LIB_SPEC) $(SHLIB_EXTRA_LIBS)
+CC = $(TCL_CC)
+
+# Since we are using Tcl's choice of C compiler, which might not be the
+# same one selected for Postgres, do NOT use CFLAGS from Makefile.global.
+# Instead use TCL's CFLAGS plus necessary -I directives.
+
+# Can choose either TCL_CFLAGS_OPTIMIZE or TCL_CFLAGS_DEBUG here, as needed
+CFLAGS= $(TCL_CFLAGS_OPTIMIZE)
+
+CFLAGS+= $(TCL_SHLIB_CFLAGS) $(TCL_DEFS)
+
+CFLAGS+= -I$(SRCDIR)/include -I$(SRCDIR)/backend
+
#
# Uncomment the following to enable the unknown command lookup
# on the first of all calls to the call handler. See the doc
@@ -67,16 +80,6 @@ endif
#CFLAGS+= -DPLTCL_UNKNOWN_SUPPORT
-CC = $(TCL_CC)
-CFLAGS+= -I$(LIBPQDIR) -I$(SRCDIR)/include $(TCL_SHLIB_CFLAGS)
-
-# For fmgr.h
-CFLAGS+= -I$(SRCDIR)/backend
-
-CFLAGS+= $(TCL_DEFS)
-
-LDADD+= $(LIBPQ)
-
#
# DLOBJS is the dynamically-loaded object file.
#